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 some unicode particle aliases #1036

Merged
merged 3 commits into from
Feb 24, 2021

Conversation

namurphy
Copy link
Member

Because I'd apparently rather play with unicode than make the increasingly wise life decision of going to bed, this pull request adds a few additional unicode particle aliases (e.g., we would be able to do Particle("α") for an alpha particle). This could be useful for code and examples that will be read much more frequently than they are written.

At present a lot of the aliases are not documented. I wonder if it would be helpful to have an aliases attribute to Particle that could list all of the valid aliases for the different particles. I've also been thinking about unicode_symbol, mathml, and latex_str attributes too for different representations, but that's not for this PR.

@namurphy namurphy added the plasmapy.particles Related to the plasmapy.particles subpackage label Feb 24, 2021
@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.82%. Comparing base (1503043) to head (7f198bc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1036   +/-   ##
=======================================
  Coverage   96.82%   96.82%           
=======================================
  Files          69       69           
  Lines        6737     6737           
=======================================
  Hits         6523     6523           
  Misses        214      214           

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

@namurphy
Copy link
Member Author

I still need to add tests, which is presently giving me much-needed motivation to go to bed.

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.

Nice and short! Looking forward to the tests, but, seal of approval for now :D

@StanczakDominik
Copy link
Member

Looks Good To Me Conditional On Tests Passing, But For The Changelog Entry. LGTMCOTPBFTCE. Think I'll need a macro for this...

@namurphy namurphy enabled auto-merge (squash) February 24, 2021 15:30
@namurphy namurphy merged commit 7c1a451 into PlasmaPy:master Feb 24, 2021
@namurphy namurphy deleted the moar-particle-aliases branch February 24, 2021 16:04
StanczakDominik added a commit that referenced this pull request Mar 9, 2021
@StanczakDominik StanczakDominik added this to the 0.6.0 milestone Mar 12, 2021
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