refactor(cosmology): move cosmology into cs_util.cosmo; delete local module#223
Open
cailmdaley wants to merge 2 commits into
Open
refactor(cosmology): move cosmology into cs_util.cosmo; delete local module#223cailmdaley wants to merge 2 commits into
cailmdaley wants to merge 2 commits into
Conversation
…module Companion to CosmoStat/cs_util#76, which brings sp_validation's cosmology theory-curve machinery into cs_util.cosmo (the single home for the collaboration's cosmology primitives, per a conversation with Martin). Deletes src/sp_validation/cosmology.py and repoints every consumer to cs_util.cosmo: - package: b_modes.py, cosmo_val/core.py, cosmo_val/pseudo_cl.py - scripts: papers/bmodes/scripts/precompute_pure_eb_chunk.py, scratch/guerrini/namaster_utils.py - docs/comments: workflow/common.py, papers/bmodes/config/covariance.md Drops "cosmology" from sp_validation.__all__ and removes the now-duplicated tests/test_cosmology.py (moved to cs_util alongside the code). No call sites change -- the functions are byte-identical, only their home moved. Temporarily sources cs_util from #76's branch so this PR validates before #76 merges; restore "cs_util>=0.2.2" once #76 merges and 0.2.2 ships to PyPI. Part of CosmoStat/cs_util#75. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013NCc4BHtZ4Lx6n9zuUwEeP
cs_util releases are infrequent while the two repos iterate together, so sp_validation tracks cs_util's develop branch directly as a git dependency rather than a version pin. Replaces the temporary pointer at #76's feature branch (which would break when that branch is deleted on merge). This PR's cosmology repoint goes green once CosmoStat/cs_util#76 merges into develop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013NCc4BHtZ4Lx6n9zuUwEeP
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Companion to CosmoStat/cs_util#76 and part of CosmoStat/cs_util#75 — the two-PR consolidation of the collaboration's cosmology into
cs_util.cosmo(the library home), per a conversation with Martin.What this does
Deletes
src/sp_validation/cosmology.py(its theory-curve machinery now lives incs_util.cosmovia #76) and repoints every consumer:b_modes.pyfrom cs_util.cosmo import get_theo_xicosmo_val/core.pyfrom cs_util.cosmo import get_cosmocosmo_val/pseudo_cl.pyfrom cs_util.cosmo import get_theo_c_ellpapers/bmodes/scripts/precompute_pure_eb_chunk.pyfrom cs_util.cosmo import get_theo_xiscratch/guerrini/namaster_utils.pyfrom cs_util.cosmo import get_cosmo, get_theo_c_ellAlso drops
"cosmology"fromsp_validation.__all__, updates two doc/comment references, and removes the now-duplicatedtests/test_cosmology.py(moved to cs_util). No call sites change — the functions are byte-identical, only their home moved.Dependency
sp_validation now tracks cs_util's
developbranch directly (git dependency) rather than a PyPI pin — cs_util releases are infrequent while the two repos iterate together:cs_util @ git+https://github.com/CosmoStat/cs_util.git@developThis repoint needs the new cosmology functions, which land via #76, so this goes green once #76 merges into cs_util
develop— merge order is simply #76 → this. No release step, no version retarget.Locally: all changed files compile, the repoint targets resolve in
cs_util.cosmo, and no references to the old module remain.— Claude on behalf of Cail