Skip to content
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

Add symbol attribute to CustomParticle and DimensionlessParticle #1015

Merged
merged 6 commits into from
Feb 15, 2021

Conversation

namurphy
Copy link
Member

To help CustomParticle and DimensionlessParticle behave a little bit more like Particle, I've added a symbol attribute to both of these. This will give users the opportunity to define a symbol for particles that can be used in, say, plotting.

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.65%. Comparing base (f52b2a8) to head (099e1be).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1015      +/-   ##
==========================================
+ Coverage   96.62%   96.65%   +0.02%     
==========================================
  Files          64       64              
  Lines        6249     6271      +22     
==========================================
+ Hits         6038     6061      +23     
+ Misses        211      210       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@namurphy namurphy added the plasmapy.particles Related to the plasmapy.particles subpackage label Feb 15, 2021
@namurphy namurphy requested a review from a team February 15, 2021 04:50
Copy link
Member

@StanczakDominik StanczakDominik left a comment

Choose a reason for hiding this comment

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

LGTM! Nice looking tests, btw! 😉

@@ -1922,23 +1961,26 @@ def json_dict(self) -> dict:

Examples
--------
>>> custom_particle = CustomParticle(mass=5.12 * u.kg, charge=6.2 * u.C)
>>> custom_particle = CustomParticle(mass=5.12 * u.kg, charge=6.2 * u.C, symbol="ξ")
Copy link
Member

Choose a reason for hiding this comment

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

👌

@StanczakDominik StanczakDominik merged commit 0d69024 into PlasmaPy:master Feb 15, 2021
@StanczakDominik StanczakDominik added this to the 0.6.0 milestone Mar 12, 2021
@namurphy namurphy deleted the custom-particle-symbol branch September 10, 2021 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.particles Related to the plasmapy.particles subpackage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants