-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 new SI prefixes #14046
Add new SI prefixes #14046
Conversation
👋 Thank you for your draft pull request! Do you know that you can use |
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.
Ha, that's news! I think it is all OK -- there don't seem to be any units starting with Q
or q
, and only the various radii, radian and Rayleigh with R. So, no confusion with, say a duration in units of "Ra".
I think we should backport this, so that all supported versions fully support SI.
I know, right? Now we can say that Earth's mass is
That's right — I did a check to see if there would be any namespace conflicts and I didn't find any: >>> [unit for unit in dir(astropy.units) if unit[0] in "qQrR"]
['Quantity', 'QuantityInfo', 'QuantityInfoBase', 'R', 'R_earth', 'R_jup', 'R_jupiter', 'R_sun', 'Rayleigh', 'Rearth', 'Rjup', 'Rjupiter', 'Rsun', 'Ry', 'quantity', 'quantity_helper', 'quantity_input', 'rad', 'radian', 'rayleigh', 'rydberg']
Cool! Is that something the maintainers will take care of, or should I submit separate PRs to the relevant branches? |
Sounds all good! The backport should be automatic -- which we will see whether it works in a second, because I think I should just press that nice "merge" button! Thanks, @namurphy! |
Power of 27? Why? 🤯 |
…046-on-v5.0.x Backport PR #14046 on branch v5.0.x (Add new SI prefixes)
…046-on-v5.2.x Backport PR #14046 on branch v5.2.x (Add new SI prefixes)
Description
For the first time since 1991, new SI prefixes have been created. 🎆 ⚖️ 🎉 🎂 🎈 🌍
This PR adds these prefixes to
astropy.units.core
, as well as to the corresponding table in the documentation forastropy.units
. Here's hoping that there aren't any namespace clashes...Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
Extra CI
label. Codestyle issues can be fixed by the bot.no-changelog-entry-needed
label. If this is a manual backport, use theskip-changelog-checks
label unless special changelog handling is necessary.astropy-bot
check might be missing; do not let the green checkmark fool you.backport-X.Y.x
label(s) before merge.