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

Ramp up deprecation of retworkx package and remove tests #1004

Merged
merged 1 commit into from
Oct 15, 2023

Conversation

mtreinish
Copy link
Member

Since it's been > 1 year since we renamed retworkx to rustworkx, this commit starts actively emitting DeprecationWarnings for importing retworkx. Previously we had only documented the name as being deprecated, however we still ~54k downloads per month. The warning should hopefully encourage more people to move to the new name.

While we prepare to drop support for the retworkx name in the lead up to rustworkx 1.0 eventually (see #1000) this commit also prepares us to stop publishing updates in the future. Besides removing the warning it decreases the prominence of the rename warning from the rustworkx package documentation. This commit also remove the retworkx legacy tests from the test suite as we've been running them for > 1 year now and have not enountered any issues with the import redirect. The benefits of keeping around a duplicated test suite for validating the redirects has outlived it's usefulness, and is just wasted CPU resources (both locally and more importantly in CI).

As for the final step of the retworkx name, to eventually drop support for the legacy name, a comment is added to the setup.py about how we make that migration. For the final 0.X release of rustworkx we should change the rustworkx== pin in retworkx's setup.py to rustworkx<1. We do have the option to do this at anytime because the retworkx package source code is basically frozen and just redirecting imports from retworkx to rustworkx. However, if the retworkx package wasn't pinned to a fixed version then current users would potentially get a different experience when installing the same version of the retworkx package (i.e. if a user installed retworkx 0.14.0 tomorrow and then again 6 months later they could be using different rustworkx versions and encounter different API bugs or deprecation warnings).

@mtreinish mtreinish force-pushed the prepare-last-retworkx-release branch from 3dc0d51 to fdd328d Compare October 15, 2023 15:07
Since it's been > 1 year since we renamed retworkx to rustworkx, this
commit starts actively emitting `DeprecationWarning`s for importing
retworkx. Previously we had only documented the name as being
deprecated, however we still ~54k downloads per month. The warning should
hopefully encourage more people to move to the new name.

While we prepare to drop support for the retworkx name in the lead up to
rustworkx 1.0 eventually (see Qiskit#1000) this commit also prepares us to
stop publishing updates in the future. Besides removing the warning it
decreases the prominence of the rename warning from the rustworkx
package documentation. This commit also remove the retworkx legacy tests
from the test suite as we've been running them for > 1 year now and have
not enountered any issues with the import redirect. The benefits of
keeping around a duplicated test suite for validating the redirects has
outlived it's usefulness, and is just wasted CPU resources (both locally
and more importantly in CI).

As for the final step of the retworkx name, to eventually drop support
for the legacy name, a comment is added to the setup.py about how we
make that migration. For the final 0.X release of rustworkx we should
change the `rustworkx==` pin in retworkx's setup.py to `rustworkx<1`.
We do have the option to do this at anytime because the retworkx package
source code is basically frozen and just redirecting imports from
retworkx to rustworkx. However, if the retworkx package wasn't pinned to
a fixed version then current users would potentially get a different
experience when installing the same version of the retworkx package
(i.e. if a user installed retworkx 0.14.0 tomorrow and then again 6
months later they could be using different rustworkx versions and
encounter different API bugs or deprecation warnings).
@mtreinish mtreinish force-pushed the prepare-last-retworkx-release branch from fdd328d to b694d1f Compare October 15, 2023 15:18
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6524905884

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.5%

Totals Coverage Status
Change from base Build 6511882414: 0.0%
Covered Lines: 15466
Relevant Lines: 16027

💛 - Coveralls

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

LGTM, it's been a year since we switched the name. The downloads for retworkx are steady but they (fortunately) have started becoming a smaller fraction of the total rustworkx download count.

I also suspect that many projects have retworkx pinned to an older version, 0.12 specifically. For those cases the warning is a reminder to do the simple change of retworkx -> rustworkx

@IvanIsCoding IvanIsCoding merged commit 674044f into Qiskit:main Oct 15, 2023
25 checks passed
@mtreinish mtreinish deleted the prepare-last-retworkx-release branch October 15, 2023 20:29
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.

None yet

3 participants