-
Notifications
You must be signed in to change notification settings - Fork 339
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
Add symbol attribute to CustomParticle and DimensionlessParticle #1015
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
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.
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="ξ") |
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.
👌
To help
CustomParticle
andDimensionlessParticle
behave a little bit more likeParticle
, I've added asymbol
attribute to both of these. This will give users the opportunity to define a symbol for particles that can be used in, say, plotting.