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

add find_predecessor_node_by_edge. #756

Merged
merged 15 commits into from
Dec 13, 2022
Merged

add find_predecessor_node_by_edge. #756

merged 15 commits into from
Dec 13, 2022

Conversation

ewinston
Copy link
Contributor

@ewinston ewinston commented Dec 1, 2022

add function to get immediate predecessor of node by edge.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Overall I think this looks good, thanks for writing this. The only thing I think missing (besides the two nits on the docstring inline) is a negative test that tests we raise the appropriate error if there is no matching inbound edge found

src/digraph.rs Outdated Show resolved Hide resolved
src/digraph.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Dec 6, 2022

Pull Request Test Coverage Report for Build 3688141711

  • 21 of 21 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 96.929%

Totals Coverage Status
Change from base Build 3686610686: 0.02%
Covered Lines: 13350
Relevant Lines: 13773

💛 - Coveralls

ewinston and others added 3 commits December 6, 2022 20:27
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@ewinston
Copy link
Contributor Author

ewinston commented Dec 7, 2022

@mtreinish Thanks for the tip on how to implement this.

@ewinston ewinston changed the title [WIP] add find_adjacent_predecessor_node_by_edge. add find_adjacent_predecessor_node_by_edge. Dec 7, 2022
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

The code LGTM now thanks. I just left inline comments to remove "adjacent" from the function name. I think it's a bit redundant with predecessor in the name already

The other thing I think we should have is a reno release note documenting the new feature.

src/digraph.rs Outdated Show resolved Hide resolved
tests/rustworkx_tests/digraph/test_edges.py Outdated Show resolved Hide resolved
tests/rustworkx_tests/digraph/test_edges.py Outdated Show resolved Hide resolved
tests/rustworkx_tests/digraph/test_edges.py Outdated Show resolved Hide resolved
tests/rustworkx_tests/digraph/test_edges.py Outdated Show resolved Hide resolved
src/digraph.rs Outdated Show resolved Hide resolved
ewinston and others added 7 commits December 13, 2022 09:37
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
@mtreinish mtreinish added the automerge Queue a approved PR for merging label Dec 13, 2022
@ewinston ewinston changed the title add find_adjacent_predecessor_node_by_edge. add find_predecessor_node_by_edge. Dec 13, 2022
@mergify mergify bot merged commit b8360df into Qiskit:main Dec 13, 2022
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.

3 participants