Repository navigation
Add examples to ForceFreeFluxRope docstring - #3234
yassineAlouini wants to merge 3 commits into
Conversation
Adds an Examples section to the ForceFreeFluxRope class docstring showing how to instantiate the class and call B_z, B_theta, and B_magnitude. Values at r=0 are exact (J0(0)=1, J1(0)=0). Closes PlasmaPy#2531 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix alpha and B0 type hints in __init__ (were untyped/float, now correctly annotated as Quantity with appropriate units) - Add import for astropy.units needed by the new type hints - Add towncrier changelog entry (2531.doc.rst) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thank you for submitting this pull request (PR)! ✨ Below are checks that are being run for this PR. Click on the name of a check to learn why it didn't pass. ✅ Don't worry if something broke! We break stuff all the time. 😅 PlasmaPy's contributor guide has pages on:
Tip 📚 For a documentation preview, click on docs/readthedocs.org:plasmapy below. For cryptic documentation errors, see the documentation troubleshooting guide. Tip 🧹 Automatically fix most pre-commit.ci failures by commenting We thank you once again! 🌌 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3234 +/- ##
==========================================
- Coverage 95.36% 94.59% -0.77%
==========================================
Files 108 108
Lines 9872 9873 +1
Branches 1501 1501
==========================================
- Hits 9414 9339 -75
- Misses 262 332 +70
- Partials 196 202 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Closes #2531.
Examplessection to theForceFreeFluxRopeclass docstring showing how to instantiate the class and callB_z,B_theta, andB_magnituder=0are mathematically exact (J0(0)=1,J1(0)=0), making the doctests unambiguous__init__:B0andalphaare now correctly annotated asu.Quantitywith appropriate units (wasalpha: float)import astropy.units as ufor the type hintsTest plan
pytest --doctest-modules src/plasmapy/plasma/cylindrical_equilibria.pypytest tests/plasma/🤖 Generated with Claude Code