Repository navigation
Add "latex_inline" unit format representation with negative powers instead of fractions - #2622
Conversation
latex_inline unit format representation with negative powers instead of fractions|
I tried to reduce code duplication by changing the behaviour of the |
|
👍 for the functionality. I'm not sure that testing on the specific name of the class is a great idea, though. It will break if the class is ever further subclassed, for example. I would instead add a new private method, e.g. |
|
I had not thought about further subclassing, your suggestion is definitely better. I updated the PR with a |
|
Great. This is 👍 from me. The only thing that's missing is an entry in CHANGES.rst, but I think this will end up in 0.4.1 (which we don't have a section for yet). We can clean that up/finalize it after the impending 0.4.0 release. |
|
@mdboom - should this be included in 1.0 since it's technically a new feature? |
|
Yeah -- you're probably right. Remilestoning to 1.0 |
|
@zblz - could you rebase this to include the latest changelog changes, and add an entry to the 1.0 section? |
|
@astrofrog @mdboom: Done |
There was a problem hiding this comment.
Somehow, the hash to astropy_helpers is changed by this PR. Since that's unrelated to the problem at hand, we probably shouldn't do that here.
There was a problem hiding this comment.
I've seen this happen several times. I wonder what workflow leads to this happening and what would avoid it? We should add instructions to the CONTRIBUTING.md file.
There was a problem hiding this comment.
The only way this would happen if someone wrote git add astropy_helpers, which they shouldn't unless they intended to.
There was a problem hiding this comment.
Ah, then it could also be git commit -a, or maybe the GitHub Mac client which I've seen do the equivalent of git commit -a. I guess what I'm curious about is why the hash is changing in the first place?
There was a problem hiding this comment.
I indeed used git commit -a, so that might be the reason. I will roll back this change. This should probably be added to CONTRIBUTING.md.
There was a problem hiding this comment.
Thanks @zblz sorry for the confusion. I'm looking into ways to make this less problematic when committing changes.
|
This looks good. I've merged #2852 and restarted Travis here. I'm find with merging once all Travis failures are resolved. |
8944678 to
20f9c48
Compare
|
Rebased to use new formatting register, now everything should work fine. |
Add "latex_inline" unit format representation with negative powers instead of fractions
There was a problem hiding this comment.
This is under "Bug Fixes" but it should probably be under "New Features"
This PR adds a new unit format representation called
latex_inlinewhich uses negative powers instead of fractions for expressions of rate. It is otherwise equivalent to thelatexformat. This format is the one used in the IAU Style Manual and required by some publications (e.g., ApJ and AJ).