Repository navigation
split cosmology classes from realizations - #11345
Conversation
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
|
4860350 to
1b5ed97
Compare
|
I can do general review but unfortunately I am uncomfortable with doing a detail review of the science content. |
Much appreciated! I think this PR only requires a general review, anyway. I'm just shifting code from the file |
9baed78 to
a3ed89b
Compare
|
Thanks for the ping. Unfortunately, I am not qualified to review this, so I'll have to recuse myself. |
a3ed89b to
8d4b871
Compare
mhvk
left a comment
There was a problem hiding this comment.
@nstarman - as you actually promised in the PR, this is really just a technical one that does what I agree is a very logical split -- I'm afraid I had missed that sufficiently to worry this would take me a lot of time, while it turned out to be just 10 minutes.
Anyway, I like this very much - we really should be starting to use entrypoints more -- and I have only one request for a comment about the commented-out code (which I think, contrary to almost anytime else, is worth having here). Approving in the meantime.
| cosmo.__doc__ = docstr.format(key, par["reference"]) | ||
| else: | ||
| warnings.warn("Please open a PR for your added cosmology realization.") | ||
| # cosmo = LambdaCDM( |
There was a problem hiding this comment.
Could you add a comment here explaining that for a non-flat LCDM model, it would look like this?
There was a problem hiding this comment.
Thanks. Good suggestion. Done!
# For a non-flat LCDM realization, the following is the code necessary
# to create the realization, given the parameters. We comment this out
# as there are not currently any such built-in realizations.
* there are no non-flat realizations, so raise warning if 3rd party adds one. * test realizations * changelog Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
8d4b871 to
7a43459
Compare
|
Great, thanks. Merging! |
Description
Part of #10673
All this PR does is separate the class definitions of a cosmology with its realization(s).
As both the classes and realizations are intended to be accessed from the top-level namespace of the
cosmologypackage, this PR should have no/minimal/very-easily-fixed impact on users.Looking forward, this separation will make it easier to add separate entry points for both the classes and realizations so that 3rd party packages can augment
cosmology's offerings.