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

Fix pickle/deepcopy node hole handling #888

Merged
merged 5 commits into from
Jun 7, 2023

Conversation

mtreinish
Copy link
Member

This commit fixes an issue introduced by #589 where in certain cases node holes in a graph would result in a panic being raised. This was caused by a logic bug in trying to recreate the holes. Additionally, there were several places where graph methods removed nodes that the flag to indicate there were removals would no be set. This commit fixes all of these issues so that deepcopy/pickle works as expected.

This commit fixes an issue introduced by Qiskit#589 where in certain cases
node holes in a graph would result in a panic being raised. This was
caused by a logic bug in trying to recreate the holes. Additionally,
there were several places where graph methods removed nodes that the
flag to indicate there were removals would no be set. This commit
fixes all of these issues so that deepcopy/pickle works as expected.
@mtreinish mtreinish added this to the 0.13.0 milestone Jun 5, 2023
src/digraph.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5179511686

  • 28 of 28 (100.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 96.449%

Files with Coverage Reduction New Missed Lines %
rustworkx-core/src/connectivity/find_cycle.rs 3 94.34%
Totals Coverage Status
Change from base Build 5177125344: -0.02%
Covered Lines: 14993
Relevant Lines: 15545

💛 - Coveralls

src/graph.rs Show resolved Hide resolved
src/graph.rs Show resolved Hide resolved
src/graph.rs Show resolved Hide resolved
Copy link
Contributor

@enavarro51 enavarro51 left a comment

Choose a reason for hiding this comment

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

Ok. LGTM. Thanks.

@enavarro51 enavarro51 merged commit 629d04e into Qiskit:main Jun 7, 2023
@mtreinish mtreinish deleted the fix-deepcopy branch June 7, 2023 10:46
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