From f4b2c4ba825440207af763c3aa42f7396179540d Mon Sep 17 00:00:00 2001 From: Cail Daley Date: Sat, 20 Jun 2026 14:31:23 +0200 Subject: [PATCH 1/2] chore: pin mutable git deps to SHAs, add camb floor, relax jupytext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make dependency resolution deterministic on the things that bite, since the container installs via `uv pip install -e .[test,glass]` which resolves fresh from pyproject and never reads a lockfile — pyproject is the source of truth. - SHA-pin the two mutable git deps so builds are reproducible: - shear_psf_leakage @develop -> 48e5756 (branch is mutable, highest drift risk) - getdist @upper_triangle_whisker -> 113cd22 - Add a `camb>=1.6` floor (hygiene); no cap, since we want the eventual scipy-1.18 fix release. - Sharpen the `scipy<1.18` comment with the precise root cause (FITPACK Fortran->C return-shape change breaking camb's BBN Y_He predictor) and a cap-lift trigger. - Relax the stale exact pin `jupytext==1.15.1` -> `jupytext>=1.15`. No in-code breakage from scipy 1.18 / numpy 2 exists in sp_validation source; the only victim of the scipy change is camb's internal BBN predictor, so the scipy cap is the correct and sufficient fix. Co-Authored-By: Claude Opus 4.8 --- pyproject.toml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4717cd34..dc9d2e8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,12 +19,16 @@ classifiers = [ dependencies = [ "adjustText", "astropy>=5.0", - "camb", + # Floor at the current latest release; do not cap — we want the eventual + # scipy-1.18 fix release. Revisit the scipy cap below when camb ships + # > 1.6.6 with the scipy-1.18 / BBN fix. + "camb>=1.6", "clmm", "colorama", "cs_util>=0.2.1", "emcee", - "getdist @ git+https://github.com/benabed/getdist.git@upper_triangle_whisker", + # SHA-pinned snapshot of getdist branch `upper_triangle_whisker`. + "getdist @ git+https://github.com/benabed/getdist.git@113cd22a9a0d013b6f72fe734be81f260f3d3be5", "h5py", "healpy", "healsparse", @@ -32,7 +36,7 @@ dependencies = [ "joblib>=0.13", "jupyter", "jupyterlab", - "jupytext==1.15.1", + "jupytext>=1.15", "lenspack", "lmfit", "numexpr", @@ -43,13 +47,19 @@ dependencies = [ "pymaster", "regions", "reproject", - # scipy 1.18 (py3.12+) changed interpolators to return arrays for scalar - # input, which breaks camb's BBN Y_He predictor inside set_cosmology - # (`TypeError: only 0-dimensional arrays can be converted to Python - # scalars`), failing all get_cosmo-backed tests. Cap until camb ships a fix. + # scipy 1.18 ported FITPACK from Fortran to C, changing the return shape of + # RectBivariateSpline(scalar, scalar, grid=False) from 0-d `array(x)` to + # shape-(1,) `array([x])`. camb's BBN Y_He predictor (bbn.py) wraps the + # result in np.float64(), which collapses a 0-d array to a scalar but leaves + # a (1,) array as (1,); set_cosmology then fails at the ctypes float + # assignment `self.YHe = YHe` with `TypeError: only 0-dimensional arrays can + # be converted to Python scalars`, failing all get_cosmo-backed tests. camb + # 1.6.6 (latest on PyPI) and current master are both unfixed. Lift this cap + # when camb ships > 1.6.6 with the scipy-1.18 fix. "scipy<1.18", "seaborn", - "shear_psf_leakage @ git+https://github.com/CosmoStat/shear_psf_leakage.git@develop", + # SHA-pinned snapshot of shear_psf_leakage branch `develop` (mutable branch). + "shear_psf_leakage @ git+https://github.com/CosmoStat/shear_psf_leakage.git@48e5756f557fc586b7dc7773c7a4bcf3c256b4fa", "skyproj", "statsmodels", "treecorr>=5.0", From 7b6fa887e6ba5cda109bf58a9dde30200d41f487 Mon Sep 17 00:00:00 2001 From: Cail Daley Date: Sat, 20 Jun 2026 14:44:01 +0200 Subject: [PATCH 2/2] deps: keep shear_psf_leakage on @develop (co-developed, not SHA-pinned) shear_psf_leakage is actively co-developed CosmoStat code; SHA-pinning it would only create bump-churn. Track the mutable develop branch instead. getdist stays SHA-pinned (external feature-branch fork, pinned for repro). Co-Authored-By: Claude Opus 4.8 --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dc9d2e8f..c05b9606 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,8 +58,11 @@ dependencies = [ # when camb ships > 1.6.6 with the scipy-1.18 fix. "scipy<1.18", "seaborn", - # SHA-pinned snapshot of shear_psf_leakage branch `develop` (mutable branch). - "shear_psf_leakage @ git+https://github.com/CosmoStat/shear_psf_leakage.git@48e5756f557fc586b7dc7773c7a4bcf3c256b4fa", + # Intentionally tracks the mutable `develop` branch (NOT SHA-pinned): + # shear_psf_leakage is actively co-developed CosmoStat code we want to stay + # current with, so freezing it would only create bump-churn. (Contrast the + # getdist feature-branch below, which is an external fork we pin for repro.) + "shear_psf_leakage @ git+https://github.com/CosmoStat/shear_psf_leakage.git@develop", "skyproj", "statsmodels", "treecorr>=5.0",