Repository navigation
Add Metadata Attribute to Cosmology - #11542
Conversation
|
Hello @nstarman 👋! It looks like you've made some changes in your pull request, so I've checked the code again for style. There are no PEP8 style issues with this pull request - thanks! 🎉 Comment last updated at 2021-05-25 00:38:48 UTC |
|
👋 Thank you for your draft pull request! Do you know that you can use |
97841ef to
237e4c0
Compare
|
@pllim, not v4.3 critical, but IMO this is ready for merge. Hopefully if someone reviews, they'll agree and then this would be nice in v4.3 |
|
Not sure who should review here... |
|
The cosmology maintainer 😢 |
5d81158 to
ba1286f
Compare
|
On first glance, looks good, but won't have time to review carefully today. OK to move milestone to 5.0? (unless someone else has time to review today!) |
|
I tentatively moved the milestone as requested. I'd rather this gets a proper review than to rush things in last minute. If the situation changes, please move the milestone back. Thanks! |
|
ping @adrn. I'm not sure if the 4.3 feature freeze is still in effect, but if it isn't... Thanks! |
|
Branching happened, so you can merge 5.0 stuff now. FYI. |
mhvk
left a comment
There was a problem hiding this comment.
This looks very nice! I really only have one rather nitpicky comment, about __all_subclasses__, which seems a bit out of scope here (and possibly not the ideal way to go about it). If we can keep this as a short function for now where it is needed, then I'm happy to get it in.
| ba = self._init_signature.bind_partial(**new_init) | ||
| except TypeError as e: | ||
| # for backward compatibility, map TypeError to AttributeError | ||
| warnings.warn("Starting in Astropy v5.0, passing an unrecognized " |
There was a problem hiding this comment.
For follow-up, we can now get rid of this...
000017e to
4990186
Compare
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
also simplify recursion Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
Co-authored-by: Adrian Price-Whelan <[email protected]> Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
mhvk
left a comment
There was a problem hiding this comment.
OK, thanks, looks all good now! Merging...
Description
Adds metadata to cosmologies. The original motivation was that all the parameter dictionaries for built-in realizations have all this extra info that isn't being used. Let's just stick the extra info in metadata! Seems generically useful for e.g. adding references to user-defined cosmologies.
Should the metadata be mutable? yes, I think this should be the one mutable thing on a cosmology. It is never used by the cosmology.
Ready for review!
But plz merge #11540 first. Then I can rebase this since there's some overlap.🎉request review: @adrn @mhvk @embray @dhomeier