Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preliminary support for qml.labs module sandboxing #6369

Merged
merged 24 commits into from
Oct 10, 2024
Merged

Conversation

mlxd
Copy link
Member

@mlxd mlxd commented Oct 9, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    test directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the doc/releases/changelog-dev.md file, summarizing the
    change, and including a link back to the PR.

  • The PennyLane source code conforms to
    PEP8 standards.
    We check all of our code against Pylint.
    To lint modified files, simply pip install pylint, and then
    run pylint pennylane/path/to/file.py.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context: This PR adds tach as a development dependency to ensure qml.labs additions do not migrate into mainline PennyLane.

Description of the Change: Configs are added to restrict this library wide, with pre-commit hook support added to prevent additions going upstream.

Benefits: Prevents qml.labs additions entering into the main PennyLane library.

Possible Drawbacks: Currently requires explicit use of pre-commit hooks. CI settings and partitioning to follow.

Related GitHub Issues:

requirements-dev.txt Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@mlxd
Copy link
Member Author

mlxd commented Oct 9, 2024

[sc-75512]

@mlxd mlxd marked this pull request as ready for review October 9, 2024 15:05
.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.39%. Comparing base (222dd4b) to head (5bf8028).
Report is 327 commits behind head on master.

Files with missing lines Patch % Lines
pennylane/labs/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6369      +/-   ##
==========================================
- Coverage   99.40%   99.39%   -0.01%     
==========================================
  Files         446      447       +1     
  Lines       42366    42365       -1     
==========================================
- Hits        42112    42109       -3     
- Misses        254      256       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

requirements-dev.txt Outdated Show resolved Hide resolved
@mlxd mlxd requested a review from rashidnhm October 9, 2024 18:57
@mudit2812 mudit2812 self-requested a review October 9, 2024 20:02
.github/workflows/module-validation.yml Outdated Show resolved Hide resolved
.github/workflows/module-validation.yml Show resolved Hide resolved
.github/workflows/module-validation.yml Outdated Show resolved Hide resolved
.github/workflows/module-validation.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@mudit2812 mudit2812 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Lee, just a few comments/suggestions.

.github/workflows/module-validation.yml Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
requirements-ci.txt Outdated Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
tach.toml Show resolved Hide resolved
mlxd and others added 3 commits October 10, 2024 12:23
Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
@mlxd mlxd requested review from mudit2812 and rashidnhm October 10, 2024 16:58
.github/workflows/module-validation.yml Outdated Show resolved Hide resolved
mlxd and others added 2 commits October 10, 2024 16:38
@mlxd mlxd enabled auto-merge (squash) October 10, 2024 20:38
@mlxd mlxd merged commit dbb64fb into master Oct 10, 2024
37 checks passed
@mlxd mlxd deleted the labs_sandbox branch October 10, 2024 20:59
austingmhuang pushed a commit that referenced this pull request Oct 23, 2024
### Before submitting

Please complete the following checklist when submitting a PR:

- [x] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to
the
      test directory!

- [x] All new functions and code must be clearly commented and
documented.
If you do make documentation changes, make sure that the docs build and
      render correctly by running `make docs`.

- [x] Ensure that the test suite passes, by running `make test`.

- [x] Add a new entry to the `doc/releases/changelog-dev.md` file,
summarizing the
      change, and including a link back to the PR.

- [x] The PennyLane source code conforms to
      [PEP8 standards](https://www.python.org/dev/peps/pep-0008/).
We check all of our code against [Pylint](https://www.pylint.org/).
      To lint modified files, simply `pip install pylint`, and then
      run `pylint pennylane/path/to/file.py`.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Context:** This PR adds `tach` as a development dependency to ensure
`qml.labs` additions do not migrate into mainline PennyLane.

**Description of the Change:** Configs are added to restrict this
library wide, with pre-commit hook support added to prevent additions
going upstream.

**Benefits:** Prevents `qml.labs` additions entering into the main
PennyLane library.

**Possible Drawbacks:** Currently requires explicit use of pre-commit
hooks. CI settings and partitioning to follow.

**Related GitHub Issues:**

---------

Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
mudit2812 added a commit that referenced this pull request Nov 11, 2024
### Before submitting

Please complete the following checklist when submitting a PR:

- [x] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to
the
      test directory!

- [x] All new functions and code must be clearly commented and
documented.
If you do make documentation changes, make sure that the docs build and
      render correctly by running `make docs`.

- [x] Ensure that the test suite passes, by running `make test`.

- [x] Add a new entry to the `doc/releases/changelog-dev.md` file,
summarizing the
      change, and including a link back to the PR.

- [x] The PennyLane source code conforms to
      [PEP8 standards](https://www.python.org/dev/peps/pep-0008/).
We check all of our code against [Pylint](https://www.pylint.org/).
      To lint modified files, simply `pip install pylint`, and then
      run `pylint pennylane/path/to/file.py`.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Context:** This PR adds `tach` as a development dependency to ensure
`qml.labs` additions do not migrate into mainline PennyLane.

**Description of the Change:** Configs are added to restrict this
library wide, with pre-commit hook support added to prevent additions
going upstream.

**Benefits:** Prevents `qml.labs` additions entering into the main
PennyLane library.

**Possible Drawbacks:** Currently requires explicit use of pre-commit
hooks. CI settings and partitioning to follow.

**Related GitHub Issues:**

---------

Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants