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

Has path #952

Merged
merged 9 commits into from
Aug 4, 2023
Merged

Has path #952

merged 9 commits into from
Aug 4, 2023

Conversation

eliotheinrich
Copy link
Contributor

Addresses #934.

Added a function has_path() which uses graph_dijkstra_shortest_paths() or digraph_dijkstra_shortest_paths() to check if a path between a source and target node exists for a PyGraph or PyDiGraph, respectively.

@coveralls
Copy link

coveralls commented Jul 31, 2023

Pull Request Test Coverage Report for Build 5758489008

  • 25 of 25 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 96.46%

Totals Coverage Status
Change from base Build 5729907350: 0.006%
Covered Lines: 15313
Relevant Lines: 15875

💛 - 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, just removing some details from internals on docstrings as we probably should have options for different algorithms in the future. Also, I simplified the tests a bit

tests/rustworkx_tests/graph/test_dijkstra.py Outdated Show resolved Hide resolved
releasenotes/notes/has_path-1addf94c4d29d455.yaml Outdated Show resolved Hide resolved
rustworkx/__init__.py Outdated Show resolved Hide resolved
src/shortest_path/mod.rs Outdated Show resolved Hide resolved
src/shortest_path/mod.rs Outdated Show resolved Hide resolved
tests/rustworkx_tests/digraph/test_dijkstra.py Outdated Show resolved Hide resolved
@IvanIsCoding IvanIsCoding added the automerge Queue a approved PR for merging label Aug 4, 2023
@mergify mergify bot merged commit c77c4b4 into Qiskit:main Aug 4, 2023
27 checks passed
raynelfss pushed a commit to raynelfss/rustworkx that referenced this pull request Aug 10, 2023
* Added has_path for PyGraph and PyDiGraph

* Fixed linting errors and added release notes

* Fixed doc type

* Fixed cargo fmt problem

* Fixed clippy problem

* Typo in release notes

* Apply suggestions from code review

* Remove whitespace

---------

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