Skip to content

Conversation

@mhvk
Copy link

@mhvk mhvk commented Oct 19, 2013

See main thread

alexrudy and others added 30 commits October 6, 2013 15:57
get_format could fail in weird ways because it would check if 'get_format' was a valid format.
This fix simply ignores the last two entries in the ``__all__`` list ('get_format', and the just added 'has_format')
to prevent this issue. An alternative solution could be to use introspection.

has_format returns a boolean as to whether the passed in format would work or not.
The format method can accept a format specifier name, and calls that formatter instead.
If the specifier does not correspond to a valid unit formatter, then the generic string version is used,
and the format code applied to that generic string.
get_format would fail when a format didn't exist, as __all__ contained the function get_format itself.
This squashes that bug using inspect.isclass instead of a cludgy slice of __all__
Thanks to @mdbooms suggestion, I realized I fixed a single bug, but
added some poor code for others. This relies on error catching in
__format__ to determine if a specified format exists or not, instead
of a new `has_format` method
Units can use format codes in new-style format strings to set the desired formatting builder.
It is a list of formats that can be found by get_format()
embray and others added 6 commits October 18, 2013 09:12
Add a "show_in_browser" feature for tables
Rebased in eteq/expand-flux-conv to clean up commit log a bit
…n-doc-issue-1567

Remove incorrect description of setting a configuration value at runtime
update nduncertainty for multiple/divide
@mhvk
Copy link
Author

mhvk commented Oct 19, 2013

Sorry, I rebased when introducing the ST and AB flux density units, and now this becomes very messy. Definitely rebase before considering this...

@pllim
Copy link
Owner

pllim commented Oct 21, 2013

Thanks, @mhvk . I am guessing the commits that I should look at are the last 5 done by you?

pllim pushed a commit that referenced this pull request Feb 11, 2014
@pllim
Copy link
Owner

pllim commented Apr 15, 2014

Not needed anymore.

@pllim pllim closed this Apr 15, 2014
pllim pushed a commit that referenced this pull request Aug 4, 2014
@mhvk mhvk deleted the mag-math branch September 26, 2014 16:38
pllim pushed a commit that referenced this pull request Jun 1, 2016
Finalizes attribute and frame naming conventions for AstrometricFrame and subclasses.
pllim pushed a commit that referenced this pull request Jan 10, 2017
fixes for test_wcs. Yields removed to get rid of deprecation warnings in pytest3 and be compatible with pytest4
pllim pushed a commit that referenced this pull request Jan 23, 2017
Remove unit checks that are irrelevant for the bug fix.
pllim pushed a commit that referenced this pull request Apr 26, 2017
pllim pushed a commit that referenced this pull request Jan 15, 2019
pllim added a commit that referenced this pull request Oct 31, 2020
pllim pushed a commit that referenced this pull request Feb 3, 2021
Updated docstring of autopower in core.py
pllim pushed a commit that referenced this pull request Mar 30, 2022
break out into test_constellation_edge_cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.