Repository navigation
Update docstrings and annotations in formulary length calculations - #2356
Conversation
|
Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱 Our contributor guide has information on:
The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:
If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder. Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples. We thank you once again! |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2356 +/- ##
=======================================
Coverage 98.35% 98.35%
=======================================
Files 101 101
Lines 8580 8582 +2
=======================================
+ Hits 8439 8441 +2
Misses 141 141
☔ View full report in Codecov by Sentry. |
| Vperp: u.Quantity[u.m / u.s] = np.nan * u.m / u.s, | ||
| T: u.Quantity[u.K] = None, |
There was a problem hiding this comment.
Excited that these Quantity annotations are working! Now these can be true type hints.
There was a problem hiding this comment.
Will these have to be altered in all other modules?
There was a problem hiding this comment.
Yep! This is a first try to see if the new capability of @validate_quantities to deal with Quantity[Unit] style is working in action. I'm hoping to figure out a way to automate this...which might end up meaning I'll need to delve into regular expressions.
|
|
||
| @validate_quantities( | ||
| Vperp={"can_be_nan": True}, | ||
| Vperp={"can_be_nan": True}, # none_shall_pass |
| Vperp: u.Quantity[u.m / u.s] = np.nan * u.m / u.s, | ||
| T: u.Quantity[u.K] = None, |
There was a problem hiding this comment.
Will these have to be altered in all other modules?
Description
I'm updating the docstring of
gyroradius, including some reorganization and more narrative examples.Motivation and context
I was looking through the online documentation and noticed that some of the symbols in the docstring for
gyroradiuswere specific to ions.