-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deprecate Cirq-Rigetti #7176
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
Deprecate Cirq-Rigetti #7176
Conversation
Adapt similar module from quantumlib#6362
Skip deprecations for internal functions.
Deprecated cirq objects are not allowed in tests otherwise.
Turn off README adjustments for development releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a trivial typo in the readme and a question in setup.py.
cirq-rigetti/README.md
Outdated
| <div align="center"> | ||
| | ⚠️ WARNING | | ||
| |:----------:| | ||
| | **Cirq-Rigetti is deprecated. For more details or to provide feedback see https://github.com/quantumlib/Cirq/issues/7058 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The closing ** seems to be missing. Was it meant to go after the word "deprecated"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not supposed to be there at all, thanks for catching that. The table was also not rendering correctly on GH. Should be fixed by 295cb65.
| "unstable. For the latest stable release of `cirq-rigetti`,<br>" | ||
| "please visit** <https://pypi.org/project/cirq-rigetti>.|\n" | ||
| "\n</div>\n\n" + long_description | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this removed because we will not provide a cirq-rigetti package on PyPI with the Cirq 1.5 release?
(If there will still be a cirq-rigetti, maybe it would be best to include a notice about deprecation here instead?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This notice goes to dev releases of cirq-rigetti and gets inserted to the beginning of their README. It would be confusing for those releases to state "This is a development version" followed by "Cirq-Rigetti is deprecated". This just leaves it with the deprecation notice every time.
|
Also, thank you for doing this PR. |
|
In trying to run check/doctest after creating a virtualenv using dev_tools/requirements/dev-np2.env.txt, I found I had to modify check/doctest to make it ignore the rigetti module: diff --git a/dev_tools/docs/run_doctest.py b/dev_tools/docs/run_doctest.py
index 903f8f46..e4bac541 100755
--- a/dev_tools/docs/run_doctest.py
+++ b/dev_tools/docs/run_doctest.py
@@ -228,6 +228,7 @@ def main():
file_names = glob.glob('cirq**/cirq**/**/*.py', recursive=True)
assert file_names
excluded = [
+ 'cirq-rigetti/',
'cirq-google/cirq_google/api/',
'cirq-google/cirq_google/cloud/',
'cirq-web/cirq_ts/node_modules/',Is there a way to conditionalize this using the deprecation classes you created? |
cirq_rigetti is deprecated and does not define doctests anyway. Avoid having to install cirq-rigetti for doctests.
cirq-rigetti does not define any doctest so we can hardcode it. Done in fac1c4b, thanks for the suggestion! |
Mark up cirq_rigetti classes as deprecated.
Exclude deprecated cirq_rigetti classes from testing.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7176 +/- ##
========================================
Coverage 98.13% 98.13%
========================================
Files 1095 1096 +1
Lines 95649 95806 +157
========================================
+ Hits 93867 94024 +157
Misses 1782 1782 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Add deprecation helper module for cirq_rigetti Adapt similar module from quantumlib#6362 * Add deprecation warnings for public functions and classes Skip deprecations for internal functions. * Let deprecation wrappers detect cirq_rigetti tests * Suppress Cirq-Rigetti deprecation warnings in cirq_rigetti tests Deprecated cirq objects are not allowed in tests otherwise. * Add deprecation note to Cirq-Rigetti README Turn off README adjustments for development releases. * Fix rendering of deprecation notice in Rigetti README * Exclude cirq-rigetti when searching for doctests cirq_rigetti is deprecated and does not define doctests anyway. Avoid having to install cirq-rigetti for doctests. * Address deprecation errors in JSON serialization tests Mark up cirq_rigetti classes as deprecated. * Avoid deprecation errors in hash_from_pickle_test.py Exclude deprecated cirq_rigetti classes from testing. * Fix pylint (consider-using-f-string)
cirq_rigetti.deprecationcirq_rigettitestscirq_rigettitestsPartially implements #7058