-
Notifications
You must be signed in to change notification settings - Fork 193
Consolidate docstrings in generators.rs #1397
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
db9b2a4
to
2caa71d
Compare
Pull Request Test Coverage Report for Build 13937689195Details
💛 - Coveralls |
I will review this more carefully either tomorrow or on Monday, but one of the things that I just remembered: we are missing the Karate Club generator in this file! https://github.com/Qiskit/rustworkx/blob/main/docs/source/api/generators.rst We documented it in the release notes: https://www.rustworkx.org/dev/release_notes.html#relnotes-0-16-0. If you add a line to that file it will include it in the docs. Thanks again for starting this initiative! Our docstrings are improving a lot. All users will appreciate these changes |
2caa71d
to
745f251
Compare
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.
Two things:
- Our docstrings are partially correct. I don't think we enforce that it is a list, any sequence works. Moreover, for generators we don't know the type of node/edge objects so it is
Any
. Here is the "source" of truth: https://github.com/Qiskit/rustworkx/blob/main/rustworkx/generators/__init__.pyi - In #1280 I indented the docstring wrong. It was never getting built so it never got caught. But now that it is included CI is failing to build the docs 🤦
And again, thanks for highlighting this. I don't think we'd have caught the discrepancy between the type annotations and the docstring. https://pyo3.rs/v0.23.5/conversions/tables.html is the reference that any |
84f846c
to
f35fb4a
Compare
* Consolidate docstrings in generators.rs * Try to fix identation in generators.rs --------- Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
Another bunch of docstrings reviewed.