Repository navigation
Ensure that the CDS unit parser can deal with '[-]' - #11250
Conversation
taldcroft
left a comment
There was a problem hiding this comment.
Apart from the trivial change log suggestion, this looks great from the ascii.io perspective. I can't really comment on the units code itself.
3edf4de to
5a24873
Compare
|
This introduced a regression into the astroquery tests. Probably not a big deal and we have to fix it in our tests, but others may run into it, too: Prior to this: After: The raw votable returns can be accessed as e.g. (which is then parsed with astropy.io.votable.parse): |
|
Is |
|
|
|
Of course, we should not forget the advantage of the change: now |
|
I'm not saying it's not an improvement, but I had a hard time to find which change actually caused this, just by reading the changelogs (first I assumed it's because of the votable unit parsing change in io.votable, but in fact it was due to this (did I mention yet that I really love |
| - For ``Quantity.to_string()``, ensure that the precision argument is also | ||
| used when the format is not latex. [#11145] | ||
|
|
||
| - For CDS units and tables, recognize ``-`` as indicating dimensionless and |
There was a problem hiding this comment.
@bsipocz - changelog entries are always so darn tricky. Would it have helped to include --- here? Happy to make quick PR to change it.
There was a problem hiding this comment.
yes, it would have helped. I started with the changelog, then tried to grep for it in the diff before falling back to the heavy machinery of git bisect.
|
@astrofrog - Given that not having #9971 meant that logarithmic units didn't work properly in LTS anyway, I think we should just not backport this one either. Should have seen that at the time.... |
|
Ok thanks for the quick reply! |
Ensure that the CDS unit parser can deal with '[-]'
|
Now seeing #11418, should the changelog entry be moved to 4.2.1 in master too!? |
Manual backport of #11250 (Ensure that the CDS unit parser can deal with '[-]')
In #11239, it became clear that while the CDS unit parser recognizes
dexunits with the[...]signature, it does not parse[-]foru.dex(u.one). This PR fixes that bug, meaning that CDS readme for tables that have these units can now be read (more) correctly.