Reproducible deps: declare cosmo_numba + numba, commit uv.lock, install image from lock#266
Merged
Conversation
…Rs reviewed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KpaRHk3QwN13myduQ3hJyf
…-file layout, per-part blinding at birth) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KpaRHk3QwN13myduQ3hJyf
…mage from lock Make sp_validation's environment reproducible so an image build can never re-resolve numpy past numba's ceiling — the drift that silently upgraded numpy to 2.5 and broke numba/ngmix. - Declare cosmo-numba (aguinot/cosmo-numba@main; not on PyPI) — the numba B-mode kernels b_modes.py imports. main carries numpy-2 FFT support via its rocket-fft dep and declares its own deps, so numba's numpy window reaches the resolver. Also pin numba directly: the one load-bearing constraint, made visible and resilient to cosmo-numba's dep metadata (which has emptied out between refs). - Declare the other imported-but-undeclared deps the audit found: matplotlib, pandas, pyyaml (core, src/); fitsio (glass extra); a new `workflow` extra for snakemake + mpi4py. cv_runner and unions_wl left undeclared (no resolvable source) with a NOTE. - requires-python and ruff target -> 3.12 (the container's Python; cosmo-numba's floor). - Commit uv.lock (un-ignored) as the SSOT; scope it to Linux via [tool.uv]. numpy resolves to 2.4.6, inside numba 0.66's <2.5 window. - Dockerfile installs from the lock: `uv sync --frozen --inexact` into the base image's /app/.venv (--inexact keeps the ShapePipe stack). Drops the ad-hoc snakemake layer and the cs_util `--upgrade` workaround — the lock pins cs_util 0.2.2 (with cs_util.size), decoupling us from the base image's cs_util. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vtw1qcgTrQ6YuMvxwYzNup
…mba gotcha finding Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vtw1qcgTrQ6YuMvxwYzNup
…gins uv sync installs a newer pytest than the base ShapePipe image's pytest-pydocstyle/pytest-pycodestyle (>=2.4) expect; their pytest_collect_file hooks use the removed `path` arg and crash collection. sp_validation lints with ruff, so disable both via addopts (`-p no:`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vtw1qcgTrQ6YuMvxwYzNup
# Conflicts: # .felt/sp-validation-restructuring.md
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.
Closes #265.
Makes sp_validation's environment reproducible so an image build can never re-resolve numpy past numba's ceiling — the drift that upgraded numpy to 2.5 and broke numba/ngmix.
What changed
Dependencies (
pyproject.toml)cosmo-numba(aguinot/cosmo-numba@main; not on PyPI).maincarries numpy-2 FFT support via itsrocket-fftdependency and declares its own deps fromrequirements.txt, so numba's numpy window reaches the resolver.numbadirectly too. It's the one load-bearing constraint of this environment (numba 0.66 →numpy<2.5); pinning it here makes it visible and resilient to cosmo-numba's dependency metadata (which has silently emptied out between refs). We pin numba, never numpy directly.matplotlib,pandas,pyyaml(core,src/);fitsio(glass extra); a newworkflowextra (snakemake+mpi4py) for theworkflow/scripts/runners.requires-pythonand ruff target → 3.12 (the container's Python; cosmo-numba's floor).Lockfile
uv.lock(un-ignored) as the SSOT, scoped to Linux via[tool.uv]. numpy resolves to 2.4.6, inside numba's window; cs_util to 0.2.2 (hascs_util.size).Dockerfile
uv sync --frozen --inexactinto the base image's/app/.venv(--inexactkeeps the inherited ShapePipe stack). Drops the ad-hocsnakemakelayer and thecs_util --upgradeworkaround — the lock now governs cs_util, decoupling us from the base image's cs_util version.Validation
Pushing this branch triggers the image build (
import numba, cosmo_numbasmoke + fast unit suite). Green build = the numpy/numba window holds in the rebuilt image, which is the condition that lets the image-sims.smkdrop its two-imagesif_pipelineworkaround.Notes / open items
cv_runner(imported inworkflow/scripts/cv_*.py) andunions_wl(one footprint script) are left undeclared — no resolvable source found. Flagged in apyprojectNOTE.numbainsurance pin is deliberate but droppable if you'd rather lean entirely on cosmo-numba@main carrying it.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vtw1qcgTrQ6YuMvxwYzNup