Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename FLRW to HasDistanceFunctions #38

Merged
merged 6 commits into from
Mar 15, 2023
Merged

Conversation

nstarman
Copy link
Contributor

@nstarman nstarman commented Mar 8, 2023

TODO:

Some methods need to be broken out.

  • move Otot0 (will also be renamed to Omega_tot0)
  • move critical_density0?
  • move Otot
  • move critical_density?

Also:

  • rename to HasDistanceMeasures ?

PR Checklist

  • Give a detailed description of the PR above.
  • Document changes in the CHANGES.rst file. See existing changelog for examples.
  • Add tests, if applicable, to ensure code coverage never decreases.
  • Make sure the docs are up to date, if applicable, particularly the docstrings and RST files in docs folder.
  • Ensure linear history by rebasing, when requested by the maintainer.

@nstarman nstarman added this to the v0.1 milestone Mar 8, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2023

Codecov Report

Merging #38 (a946a0a) into main (980e06c) will increase coverage by 0.16%.
The diff coverage is 82.60%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   76.61%   76.78%   +0.16%     
==========================================
  Files          13       13              
  Lines         278      280       +2     
==========================================
+ Hits          213      215       +2     
  Misses         65       65              
Impacted Files Coverage Δ
src/cosmology/api/_components.py 84.74% <66.66%> (-2.05%) ⬇️
src/cosmology/api/_extras.py 88.00% <83.33%> (ø)
src/cosmology/api/_distances.py 70.58% <85.71%> (ø)
src/cosmology/api/__init__.py 100.00% <100.00%> (ø)
src/cosmology/api/_standard.py 92.85% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nstarman nstarman force-pushed the rename-FLRW-to-Distances branch 3 times, most recently from 41a5879 to 202035c Compare March 9, 2023 18:11
@nstarman nstarman requested a review from ntessore March 10, 2023 16:02
@nstarman
Copy link
Contributor Author

nstarman commented Mar 11, 2023

@ntessore, where do you think we should move the non-distance measure attributes/methods?
Should any go to the base class?

@nstarman
Copy link
Contributor Author

nstarman commented Mar 15, 2023

I'm hesitant to put anything on Cosmology.
Omega_tot can go to something called HasTotalComponent. Not sure yet about the others.

@ntessore
Copy link
Contributor

I think one more doesn't hurt, HasCriticalDensity? That's actually one of the lesser supported, so we will get some use out of that isinstance check.

Signed-off-by: nstarman <[email protected]>
Signed-off-by: nstarman <[email protected]>
Signed-off-by: nstarman <[email protected]>
@nstarman
Copy link
Contributor Author

Done. Also, I folded HasTcmb into the distance measures.

ntessore
ntessore previously approved these changes Mar 15, 2023
Copy link
Contributor

@ntessore ntessore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting to look finished. I think we could stick all of the HasX protocols into a single module (even just _components) if that made future classification easier (is that a component? distance-related? extra? see Tcmb) but that's an infinitesimal change.

@nstarman
Copy link
Contributor Author

nstarman commented Mar 15, 2023

Starting to look finished.

Agreed! I think we need some documentation and a meeting to go over everything and make sure we're happy with v0.1.

I think we could stick all of the HasX protocols into a single module (even just _components) if that made future classification easier (is that a component? distance-related? extra? see Tcmb) but that's an infinitesimal change.

I agree _extra is a bad categorization, and stuff should be re-arranged. Thankfully, the module location is private (all the Protocols should be accessed from cosmology.api or cosmology.api.compat) and we are free to re-arrange to whatever makes the most internal sense, even after v0.1.
On a related note, should we public scope cosmology.api.components, and move all the HasXComponents
from cosmology.api.__all__ to cosmology.api.components.__all__. Also, I think we should rename the compat
module to wrapper since, though the classes are used for the compat modules, these are really wrappers and can be used more generally.

@nstarman nstarman marked this pull request as ready for review March 15, 2023 18:07
@nstarman
Copy link
Contributor Author

I forgot to add HasTotalComponent to the top module. I'll import it and then merge.

Signed-off-by: nstarman <[email protected]>
@nstarman nstarman mentioned this pull request Mar 15, 2023
5 tasks
@nstarman nstarman merged commit 749b7da into main Mar 15, 2023
@nstarman nstarman deleted the rename-FLRW-to-Distances branch March 15, 2023 18:24
@nstarman nstarman mentioned this pull request Mar 15, 2023
5 tasks
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.

3 participants