Skip to content

refactor(cosmology): move cosmology into cs_util.cosmo; delete local module#223

Open
cailmdaley wants to merge 2 commits into
developfrom
refactor/cosmology-to-cs_util
Open

refactor(cosmology): move cosmology into cs_util.cosmo; delete local module#223
cailmdaley wants to merge 2 commits into
developfrom
refactor/cosmology-to-cs_util

Conversation

@cailmdaley

@cailmdaley cailmdaley commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

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 in cs_util.cosmo via #76) and repoints every consumer:

Consumer import now
b_modes.py from cs_util.cosmo import get_theo_xi
cosmo_val/core.py from cs_util.cosmo import get_cosmo
cosmo_val/pseudo_cl.py from cs_util.cosmo import get_theo_c_ell
papers/bmodes/scripts/precompute_pure_eb_chunk.py from cs_util.cosmo import get_theo_xi
scratch/guerrini/namaster_utils.py from cs_util.cosmo import get_cosmo, get_theo_c_ell

Also drops "cosmology" from sp_validation.__all__, updates two doc/comment references, and removes the now-duplicated tests/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 develop branch 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@develop

This 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

…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
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.

1 participant