-
Notifications
You must be signed in to change notification settings - Fork 9
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
gh-124: use cosmology.api
over the cosmology
package
#397
Draft
paddyroddy
wants to merge
20
commits into
main
Choose a base branch
from
paddy/issue-124
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2455fe0
gh-124: use `cosmology.api` over the `cosmology` package
paddyroddy e600795
Merge branch 'main' into paddy/issue-124
paddyroddy 0621f3d
Change docstring
paddyroddy cf52194
Merge branch 'main' into paddy/issue-124
paddyroddy 88428cb
Rename mock
paddyroddy 2b8912f
Format
paddyroddy 96b7030
Add typing to `StandardCosmology`
paddyroddy c4221b3
Change critical density
paddyroddy 187063a
Switch to `import cosmology.api`
paddyroddy 16087c8
Use critical density
paddyroddy 0a83b2e
Revert "NLA model for intrinsic alignments (#21)"
paddyroddy 663f80a
Go back to `from` syntax
paddyroddy c8e5ddd
Use Hubble length
paddyroddy 55854dc
Add docstring
paddyroddy d88aa44
Fix linting
paddyroddy 44011dc
Merge branch 'main' into paddy/issue-124
paddyroddy ff590a9
Change the badge
paddyroddy c7745ef
Revert "Change the badge"
paddyroddy 83f6c12
Merge branch 'main' into paddy/issue-124
paddyroddy d5e47ac
Merge branch 'main' into paddy/issue-124
paddyroddy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
from glass.shells import RadialWindow | ||
|
||
if typing.TYPE_CHECKING: | ||
from cosmology import Cosmology | ||
from cosmology.api import StandardCosmology | ||
|
||
|
||
@pytest.fixture | ||
|
@@ -31,7 +31,7 @@ def shells() -> list[RadialWindow]: | |
|
||
|
||
@pytest.fixture | ||
def cosmo() -> Cosmology: | ||
def cosmo() -> StandardCosmology: | ||
class MockCosmology: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed the mock to match the names from |
||
@property | ||
def omega_m(self) -> float: | ||
|
@@ -97,7 +97,7 @@ def test_deflect_many(rng: np.random.Generator) -> None: | |
|
||
def test_multi_plane_matrix( | ||
shells: list[RadialWindow], | ||
cosmo: Cosmology, | ||
cosmo: StandardCosmology, | ||
rng: np.random.Generator, | ||
) -> None: | ||
mat = multi_plane_matrix(shells, cosmo) | ||
|
@@ -119,7 +119,7 @@ def test_multi_plane_matrix( | |
|
||
def test_multi_plane_weights( | ||
shells: list[RadialWindow], | ||
cosmo: Cosmology, | ||
cosmo: StandardCosmology, | ||
rng: np.random.Generator, | ||
) -> None: | ||
w_in = np.eye(len(shells)) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cosmology
is still used in the notebooks currently