-
Notifications
You must be signed in to change notification settings - Fork 340
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
Cleanup quantum.py docstrings #951
Conversation
Codecov Report
@@ Coverage Diff @@
## master #951 +/- ##
==========================================
+ Coverage 96.29% 96.82% +0.53%
==========================================
Files 62 69 +7
Lines 5715 6737 +1022
==========================================
+ Hits 5503 6523 +1020
- Misses 212 214 +2
Continue to review full report at Codecov.
|
I'm going to reply to your original #935 (comment) here to keep all the associated discussion in one location.
Yes, the You can also see the CI built version of the docs here, https://plasmapy--951.org.readthedocs.build/en/951/. Also, we use |
Hi, @rocco8773. Thank you for your helpful comments. I made the change you suggested in addition to some formatting fixes in the most recent commit. A question about the function And a question about formatting. I notice that there is some inconsistency in whether there is a blank line after the docstring of each function. According to PEP8, there should be no blank line, but since our docstrings are so long, I think an exception may be warranted. Either way, is this something we can automate with Black? |
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.
This is looking good, there are just a few minor things to do.
- Except for in the "Raises" section, whenever you see something like
~astropy.units.Quantity
,~plasmapy.particles.Particle
, etc. they need to be surrounded by back ticks like`~astropy.units.Quantity`
. This causesintersphinx
to do the appropriate linking. (For this PR only worry about adding the back ticks`
to the de Broglie functionality and not all ofquantum.py
.) - There are few more cases in the docstrings, warning messages, and raises messages that used
'deBroglie'
instead of'de Broglie'
. Can you go through and update those cases? Thanks.
Co-authored-by: Erik Everson <[email protected]>
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.
Looking good! Just a few more minor tweaks and it'll be there.
Can you review the "Warns" section in all the docstrings? Currently, most of them are not properly formatted. They should follow the pattern...
Warns
-----
: `~some.type`
a proper desription
Co-authored-by: Erik Everson <[email protected]>
@rocco8773 - Ok, I made the requested changes, and I think this PR is mergeable now. What do you think? |
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.
Alright, looks good to me! Thank you for making these improvements!
docstrings.