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

Rename retworkx to rustworkx #644

Merged
merged 10 commits into from Aug 1, 2022
Merged

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Jul 25, 2022

This commit renames the retworkx project to rustworkx. The maintainers of
NetworkX requested that we change the name of the library because they
viewed networkx as being too similar to retworkx. Out of respect for
this request and the NetworkX library which inspired retworkx we are
renaming the library to rustworkx. Rustworkx is a similar name to
retworkx and enables us to keep using the rx abbreviation for imports
which is commonly used.

This commit, migrates all the internal usage and names from retworkx to
rustworkx. This includes the retworkx-core crate which has similarly been
renamed to rustworkx-core. However, for backwards compatibility and to
ease the migration of our existing user base the retworkx package is
still included in rustworkx. An import redirect is added so that
import retworkx.foo will return return rustworkx.foo. Additionally, the
README and documentation are updated to mention the rename.

The migration plan this commit takes is that for the pending 0.12.0
release we'll migrate to rustworkx for everything but keep the backwards
compatibility shim in place with no warning. In the 0.13.0 release we'll
emit a DeprecationWarning (or a FutureWarning) that the name is
deprecated (this waits a release to ensure there is upgrade path where
more than 1 version works without raising a warning to ease migration). We can
then remove the deprecated retworkx name as part of the 1.0.0 release.
During the transition period we'll continue to publish releases to both
the rustworkx and retworkx names through at least 0.14.0 (but with the option
to keep publishing both until 1.0.0) so that users will see the deprecation
warnings when importing retworkx.

Closes #641

@mtreinish mtreinish added this to the 0.12.0 milestone Jul 25, 2022
This commit renames the retworkx project to rustworkx. The maintainers of
NetworkX requested that we change the name of the library because they
viewed networkx as being too similar to retworkx. Out of respect for
this request and the NetworkX library which inspired retworkx we are
renaming the library to rustworkx. Rustworkx is a similar name to
retworkx and enables us to keep using the rx abbreviation for imports
which is commonly used.

This commit, migrates all the internal usage and names from retworkx to
rustworkx. This includes the retworkx-core crate which has similarly been
renamed to rustworkx-core. However, for backwards compatibility and to
ease the migration of our existing user base the retworkx package is
still included in rustworkx. An import redirect is added so that
import retworkx.foo will return return rustworkx.foo. Additionally, the
README and documentation are updated to mention the rename.

The migration plan this commit takes is that for the pending 0.12.0
release we'll migrate to rustworkx for everything but keep the backwards
compatibility shim in place with no warning. In the 0.13.0 release we'll
emit a DeprecationWarning (or a FutureWarning) that the name is
deprecated (this waits a release to ensure there is upgrade path where
> 1 version works without raising a warning to ease migration). We can
then remove the deprecated retworkx name as part of the 1.0.0 release.
During the transition period we'll continue to publish releases to both
the rustworkx and retworkx names through at least 0.14.0 (but with the option
to keep publishing both until 1.0.0) so that users will see the deprecation
warnings when importing retworkx.

Closes Qiskit#641
mtreinish and others added 3 commits July 25, 2022 12:43
This commit splits out the retworkx component from the rustworkx
package. This makes the new rustworkx package solely contain the
rustworkx piece and the retworkx piece becomes an independent package
that depends on rustworkx (and will internally redirect everything to
rustworkx).

Co-authored-by: Ivan Carvalho <ivancarv@student.ubc.ca>
It turns out that adding a dependency is not going to work prior to the
rustworkx package being released because pip won't be able to resolve
the rustworkx dependency. This commit reverts this structure for the
time being. Closer to the 0.12.0 release we can revisit this and plan to
do this structure (maybe by releasing rustworkx first, making this
change and then releasing retworkx with the dependency).

This reverts commit 2ae3ffd.
@coveralls
Copy link

coveralls commented Jul 25, 2022

Pull Request Test Coverage Report for Build 2750474154

  • 54 of 55 (98.18%) changed or added relevant lines in 8 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.009%) to 97.142%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/union.rs 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/shortest_path/all_pairs_bellman_ford.rs 2 98.88%
Totals Coverage Status
Change from base Build 2691937771: 0.009%
Covered Lines: 12540
Relevant Lines: 12909

💛 - Coveralls

tox.ini Outdated Show resolved Hide resolved
@IvanIsCoding
Copy link
Collaborator

IvanIsCoding commented Jul 26, 2022

I think if we install rustworkx locally before installing retworkx we will not need to relly on rustworkx being on PyPI, as pip will find it is already installed. I commented a possible workaround.

tox.ini Outdated Show resolved Hide resolved
Co-authored-by: georgios-ts <45130028+georgios-ts@users.noreply.github.com>
@laurencap
Copy link

sgtm

@IvanIsCoding IvanIsCoding merged commit 7d253ce into Qiskit:main Aug 1, 2022
@mtreinish mtreinish deleted the renase-retworkx branch August 2, 2022 21:02
mtreinish added a commit to mtreinish/qiskit that referenced this pull request Aug 5, 2022
The retworkx project was recently renamed rustworkx (see
Qiskit/rustworkx#644) however the documentation is still being published
to the retworkx url. The project will soon start uploading builds to
qiskit.org/documentation/rustworkx in order to prepare for that this
commit adds the path to the exlude list so syncs of the main qiskit
documentation do not accidently delete the rustworkx documentation.
mtreinish added a commit to mtreinish/retworkx that referenced this pull request Aug 5, 2022
In Qiskit#644 we added the build/install of the rust coreutils package to the
retworkx backwards compat CI job  to have a consistent cross platform
way to set environment variables between different OSes. However, this
adds significant time to the CI job while we build this package. This
commit reconfigures the job to leverage github actions native
environment variable handling and drops the coreutils usage. This should
speed up the backwards compat jobs since we no longer are compiling
coreutils from source.
mergify bot pushed a commit to Qiskit/qiskit-metapackage that referenced this pull request Aug 5, 2022
The retworkx project was recently renamed rustworkx (see
Qiskit/rustworkx#644) however the documentation is still being published
to the retworkx url. The project will soon start uploading builds to
qiskit.org/documentation/rustworkx in order to prepare for that this
commit adds the path to the exlude list so syncs of the main qiskit
documentation do not accidently delete the rustworkx documentation.
mergify bot pushed a commit that referenced this pull request Aug 5, 2022
In #644 we added the build/install of the rust coreutils package to the
retworkx backwards compat CI job  to have a consistent cross platform
way to set environment variables between different OSes. However, this
adds significant time to the CI job while we build this package. This
commit reconfigures the job to leverage github actions native
environment variable handling and drops the coreutils usage. This should
speed up the backwards compat jobs since we no longer are compiling
coreutils from source.

Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
mtreinish added a commit to mtreinish/retworkx that referenced this pull request Jan 8, 2024
The rustworkx mpl_draw() function was originally adapted from networkx's
matplotlib based drawer and heavily modified to work with rustworkx and
also conform more to rustworkx's interface style. Attribution to the
original source and the license terms of the original networkx code are
present in a comment at a top of the module. This port was originally
done when rustworkx was still called retworkx. As part of the name
migration in Qiskit#644 an overzealous find/replace broke the URL to the
permalink to the original networkx source code that the mpl_draw()
function was based on. This commit corrects this oversight so that the
link correctly resolves to the proper url.
mergify bot pushed a commit that referenced this pull request Jan 8, 2024
The rustworkx mpl_draw() function was originally adapted from networkx's
matplotlib based drawer and heavily modified to work with rustworkx and
also conform more to rustworkx's interface style. Attribution to the
original source and the license terms of the original networkx code are
present in a comment at a top of the module. This port was originally
done when rustworkx was still called retworkx. As part of the name
migration in #644 an overzealous find/replace broke the URL to the
permalink to the original networkx source code that the mpl_draw()
function was based on. This commit corrects this oversight so that the
link correctly resolves to the proper url.

Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
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.

Proposal Plan To Rename Library
5 participants