Visitar URL original
Add to docstrings in `plasmapy/formulary/magnetostatics.py` by TrestanSimon · Pull Request #1695 · PlasmaPy/PlasmaPy · GitHub
Skip to content

Add to docstrings in plasmapy/formulary/magnetostatics.py - #1695

Merged
namurphy merged 11 commits into
PlasmaPy:mainfrom
TrestanSimon:eqs_in_magnetostatics_docstring
Sep 12, 2022
Merged

namurphy merged 11 commits into
PlasmaPy:mainfrom
TrestanSimon:eqs_in_magnetostatics_docstring

Conversation

@TrestanSimon

@TrestanSimon TrestanSimon commented Aug 25, 2022 •

Copy link
Copy Markdown
Contributor

This PR fixes and adds to/rewrites the Notes sections of the docstrings associated with the magnetic_field functions within plasmapy/formulary/magnetostatics.py. Previously, the Notes sections were either incomplete and/or incorporated broken math directives. Here I have added to them so that the equations used (and approximation if present) are explained somewhat briefly and the style used is maintained between docstrings.

  • I have added a changelog entry for this pull request.

  • I have fixed any newly failing tests.

@github-actions github-actions Bot added the plasmapy.formulary Related to the plasmapy.formulary subpackage label Aug 25, 2022
@codecov

codecov Bot commented Aug 25, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #1695 (88e42da) into main (4342b08) will increase coverage by 0.88%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1695      +/-   ##
==========================================
+ Coverage   97.21%   98.09%   +0.88%     
==========================================
  Files          83       87       +4     
  Lines        7961     8098     +137     
==========================================
+ Hits         7739     7944     +205     
+ Misses        222      154      -68     
Impacted Files Coverage Δ
plasmapy/formulary/magnetostatics.py 100.00% <ø> (ø)
plasmapy/formulary/relativity.py 99.21% <0.00%> (-0.79%) ⬇️
plasmapy/particles/ionization_state.py 94.04% <0.00%> (-0.16%) ⬇️
plasmapy/particles/atomic.py 100.00% <0.00%> (ø)
plasmapy/formulary/__init__.py 100.00% <0.00%> (ø)
plasmapy/particles/__init__.py 95.83% <0.00%> (ø)
plasmapy/particles/_factory.py 100.00% <0.00%> (ø)
plasmapy/formulary/parameters.py 100.00% <0.00%> (ø)
plasmapy/formulary/dimensionless.py 100.00% <0.00%> (ø)
plasmapy/particles/data/test/__init__.py 100.00% <0.00%> (ø)
... and 18 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@TrestanSimon

TrestanSimon commented Aug 25, 2022 •

Copy link
Copy Markdown
Contributor Author

FYI, I began this PR prior to becoming aware of #1688 (comment). Perhaps merging--provided this PR passes review--should wait until a decision has been made regarding the magnetostatics functionality.

@namurphy namurphy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this, @TrestanSimon! I read through the changes, and only had a few slight suggestions and one place where I was wondering if a rewording would help. Overall this will be a significant improvement!

Even given the discussion in #1688 (comment), I think it'll still be very much worth merging, in particular since it will only require a few more changes. We haven't officially decided to deprecate plasmapy.magnetostatics, and even if we did, we would probably keep it around with a deprecation warning for ∼2 releases before finally removing it.

Thank you again!

Comment thread changelog/1695.doc.rst Resolved
Comment thread plasmapy/formulary/magnetostatics.py Resolved
Comment thread plasmapy/formulary/magnetostatics.py Outdated
Comment on lines +318 to +321
:math:`p_1`, and :math:`p_2` as vertices. The foot of
perpendicular opposite the vertex :math:`p_0`, which will be
used to find the unit vector in the direction of the magnetic
field, can be expressed as

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got a little confused here what "foot of perpendicular opposite the vertex" means. Would you be able to clarify or reword it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the triangle with vertices p0, p1, and p2, the "foot of perpendicular opposite the vertex p0" the "vector from the vertex p0 to the perpendicular foot opposite the vertex p0" (amended in 88e42da) refers to the vector from the vertex p0 to the opposite side of the triangle (the line formed between p1 and p2) and perpendicular to this opposite side.

I made a slight adjustment to the wording in 88e42da making it clearer to me, but let me know if it is still unclear for you. Thanks for looking over this.

TrestanSimon and others added 3 commits September 12, 2022 11:45
Co-authored-by: Nick Murphy <namurphy@cfa.harvard.edu>
Co-authored-by: Nick Murphy <namurphy@cfa.harvard.edu>

@namurphy namurphy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for doing this! I'm happy to approve and merge it.

@namurphy
namurphy merged commit 1868efd into PlasmaPy:main Sep 12, 2022
namurphy added a commit to namurphy/PlasmaPy that referenced this pull request Oct 25, 2022
@TrestanSimon
TrestanSimon deleted the eqs_in_magnetostatics_docstring branch June 9, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plasmapy.formulary Related to the plasmapy.formulary subpackage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants