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

Move cycle_graph generator to rustworkx-core #758

Merged
merged 8 commits into from
Jan 5, 2023

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Dec 10, 2022

This commit migrates the cycle-graph generator to rustworkx-core. It makes the function generic so that it can be used with any petgraph graph that's buildable and node indexable. This is primarily to serve as a pattern for migrating all the generator functions we currently have to rustworkx-core. This pattern should be usable for any generator function we have.

Part of #751

TODO:

  • Preserve IndexError for python wrapper function
  • Add release note about new rustworkx-core module and function
  • Tests for rustworkx-core function
  • Docs for rustworkx-core function

@mtreinish mtreinish added this to the 0.13.0 milestone Dec 10, 2022
This commit migrates the cycle-graph generator to rustworkx-core. It
makes the function generic so that it can be used with any petgraph
graph that's buildable and node indexable. This is primarily to serve as
a pattern for migrating all the generator functions we currently have to
rustworkx-core. This pattern should be usable for any generator function
we have.

Part of Qiskit#751
@mtreinish mtreinish changed the title [WIP] Move cycle_graph generator to rustworkx-core Move cycle_graph generator to rustworkx-core Dec 12, 2022
@mtreinish mtreinish removed the on hold label Dec 12, 2022
@coveralls
Copy link

coveralls commented Dec 14, 2022

Pull Request Test Coverage Report for Build 3850211525

  • 71 of 75 (94.67%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 96.955%

Changes Missing Coverage Covered Lines Changed/Added Lines %
rustworkx-core/src/generators/mod.rs 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
src/shortest_path/all_pairs_bellman_ford.rs 1 98.88%
Totals Coverage Status
Change from base Build 3788047570: 0.03%
Covered Lines: 13658
Relevant Lines: 14087

💛 - 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.

Overall looks good to me, it is a good framework to migrate the generators. I just made a minor suggestion on imports to avoid having to import every generator by hand given we will have a large amount.

src/generators.rs Outdated Show resolved Hide resolved
src/generators.rs Outdated Show resolved Hide resolved
src/generators.rs Outdated Show resolved Hide resolved
src/generators.rs Outdated Show resolved Hide resolved
mtreinish and others added 2 commits January 5, 2023 15:28
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
automerge Queue a approved PR for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants