-
Notifications
You must be signed in to change notification settings - Fork 191
Consolidate Python docstrings in graph.rs #1395
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
Conversation
Pull Request Test Coverage Report for Build 13842244785Details
💛 - Coveralls |
Firstly, thanks for your second contribution! This is higly appreciated. I think for Moreover, when we initially wrote our documentation Sphinx did not support type annotations. I need to get up to date on sphinx-doc/sphinx#7630 and Sphinx support. When writing the docs, take a look at https://github.com/Qiskit/rustworkx/blob/main/rustworkx/rustworkx.pyi. The docstrings should agree with the |
Thanks, @IvanIsCoding , I hope I could update everything from your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Thank you.
* Consolidate Python docstrings in graph.rs * Updates from the first review
As a beginner in rustworkx, when I followed the API docs, sometimes I was not quite sure whether the argument or the return value was the int node indices or the attached objects.
Unfortunately it looks like it is not possible to add Python type hints to the PyO3 signatures. Therefore I reviewed the src/graph.rs and added them wherever possible in the docstrings. I also tried to consolidate the description of the same parameters across the functions.
If this is a good way to go, I'll be happy to tackle the rest of the docstrings in the near future.