Skip to content

ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5)#70

Merged
cailmdaley merged 1 commit into
developfrom
ci/pin-pytest-9.1
Jun 30, 2026
Merged

ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5)#70
cailmdaley merged 1 commit into
developfrom
ci/pin-pytest-9.1

Conversation

@cailmdaley

@cailmdaley cailmdaley commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Two pre-existing CI breakages on develop, both dependency drift — neither a source change.

1. pytest-pydocstyle is archived and breaks under pytest 9.1

CI aborted at pytest startup:

PluginValidationError: Plugin 'pydocstyle' for hook 'pytest_collect_file'
... Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

pytest-pydocstyle's pytest_collect_file still declares the legacy path arg that pytest 9.1 removed from the hookspec. The plugin's upstream is archived, so it will never be fixed — remove it rather than pin pytest back. Docstring linting, if wanted, should move to a maintained tool (ruff's pydocstyle D rules), ideally folded into the project-wide ruff effort.

2. test_xipm_theo fails under numpy ≥ 2.5

With pytest running again, test_cosmo.py::test_xipm_theo fails on Python 3.12 (numpy 2.5.0): pyccl 3.3.4 calls float() on a non-0-d array in boltzmann.py:119, which numpy ≥ 2.5 turns into a hard TypeError. 3.10 passes (numpy 2.2.6). xfail it (conditioned on numpy ≥ 2.5, non-strict) as a stopgap.

The real fix — and the broader question of where cosmology code should live (cs_util.cosmo vs sp_validation's inline re-implementation; note cs_util.cosmo is consumed by shear_psf_leakage) — is tracked in #71.

Verified locally: full suite green under latest pytest with the plugin removed; the numpy ≥ 2.5 xfail path exercised.

— Claude on behalf of Cail

Two pre-existing CI breakages, both dependency drift, neither a source bug:

1. pytest-pydocstyle is archived upstream and its pytest_collect_file hook
   still declares the legacy `path` arg that pytest 9.1 removed from the
   hookspec, so pytest aborted at startup with PluginValidationError.
   Since the plugin will never be updated, remove it rather than pin pytest
   back. Docstring linting, if wanted, should move to a maintained tool
   (ruff's pydocstyle `D` rules).

2. With pytest running again, test_cosmo::test_xipm_theo fails on Python
   3.12 (numpy 2.5.0): pyccl 3.3.4 calls float() on a non-0-d array in
   boltzmann.py, which numpy>=2.5 turns into a hard TypeError. xfail it
   (conditioned on numpy>=2.5, non-strict) as a stopgap. The real fix and
   the broader "where should cosmology code live" question are tracked in
   #71.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BXY93SBtDvLLrxWX8Vh4KW
@cailmdaley cailmdaley changed the title ci: pin pytest<9.1 (unbreak CI; pytest-pydocstyle 2.4.0 vs 9.1 hookspec) ci: drop archived pytest-pydocstyle; xfail test_xipm_theo (numpy>=2.5) Jun 30, 2026
@cailmdaley cailmdaley merged commit ff8fa2b into develop Jun 30, 2026
5 checks passed
@cailmdaley cailmdaley deleted the ci/pin-pytest-9.1 branch June 30, 2026 07:40
cailmdaley added a commit that referenced this pull request Jul 3, 2026
…ry into cs_util.cosmo

Move the cosmology theory-curve machinery from sp_validation.cosmology into
cs_util.cosmo so cs_util is the single home for the collaboration's cosmology
primitives (per a conversation with M. Kilbinger). Additive: no existing
cs_util.cosmo symbol changes, so shear_psf_leakage (get_cosmo_default,
xipm_theo) is unaffected.

Adds:
- PLANCK18 fiducial-cosmology dict
- get_cosmo: flexible Planck18-default cosmology builder (individual, CCL,
  CAMB, or CosmoCov parameter formats)
- get_theo_c_ell, c_ell_to_xi, get_theo_xi: angular power spectra and shear
  correlation functions, CCL and CAMB backends
- _ccl_to_camb / _camb_to_ccl / _cosmocov_to_ccl parameter converters
- tests/test_cosmology.py, ported from sp_validation

Caps scipy < 1.18 (mirroring sp_validation): scipy 1.18's FITPACK-to-C port
changed a RectBivariateSpline return shape that breaks camb's BBN Y_He
predictor in set_cosmology (and pyccl's Boltzmann spline path likewise). With
the cap the full cosmo suite passes for real on py3.10 AND py3.12 (numpy 2.5):
31/31. This also removes the numpy>=2.5 xfail on test_xipm_theo -- a stopgap
for the same root cause (#70/#71) -- which now passes.

Bumps version 0.2.1 -> 0.2.2. No new dependency (camb, pyccl already required).

Part of #75; the sp_validation delete + repoint follows in a companion PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013NCc4BHtZ4Lx6n9zuUwEeP
cailmdaley added a commit that referenced this pull request Jul 6, 2026
…ry into cs_util.cosmo (#76)

Move the cosmology theory-curve machinery from sp_validation.cosmology into
cs_util.cosmo so cs_util is the single home for the collaboration's cosmology
primitives (per a conversation with M. Kilbinger). Additive: no existing
cs_util.cosmo symbol changes, so shear_psf_leakage (get_cosmo_default,
xipm_theo) is unaffected.

Adds:
- PLANCK18 fiducial-cosmology dict
- get_cosmo: flexible Planck18-default cosmology builder (individual, CCL,
  CAMB, or CosmoCov parameter formats)
- get_theo_c_ell, c_ell_to_xi, get_theo_xi: angular power spectra and shear
  correlation functions, CCL and CAMB backends
- _ccl_to_camb / _camb_to_ccl / _cosmocov_to_ccl parameter converters
- tests/test_cosmology.py, ported from sp_validation

Caps scipy < 1.18 (mirroring sp_validation): scipy 1.18's FITPACK-to-C port
changed a RectBivariateSpline return shape that breaks camb's BBN Y_He
predictor in set_cosmology (and pyccl's Boltzmann spline path likewise). With
the cap the full cosmo suite passes for real on py3.10 AND py3.12 (numpy 2.5):
31/31. This also removes the numpy>=2.5 xfail on test_xipm_theo -- a stopgap
for the same root cause (#70/#71) -- which now passes.

Bumps version 0.2.1 -> 0.2.2. No new dependency (camb, pyccl already required).

Part of #75; the sp_validation delete + repoint follows in a companion PR.


Claude-Session: https://claude.ai/code/session_013NCc4BHtZ4Lx6n9zuUwEeP

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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