Skip to content

Conversation

@aaronspring
Copy link
Collaborator

This PR migrates climpred to use uv for package management, following the uv-migration plan. It includes updates to GitHub workflows, documentation, and adds the necessary configuration files.

- tutorial.py: use engine=h5netcdf to avoid netCDF4 segfaults on Python 3.14
- README.rst: add Testing section with uv run pytest commands
- docs/source/index.rst: add Testing section with uv run pytest commands
- docs/source/contributing.rst: replace conda with uv, update pytest commands
This fixes the trapezoid/roc test failures that occurred because
xskillscore v0.0.27 uses np.trapezoid (NumPy 2.0+ API).

Changes:
- Main dependency: numpy >=1.25.0 -> numpy >=2.0.0
- bias-correction extra: numpy >=1.25.0,<2.0.0 -> numpy >=2.0.0

Results:
- 56 trapezoid-related tests now pass
- All roc metric tests pass

Remaining issues (14 failures):
- 10 bootstrap lazy_results tests: xarray/dask zip() strict issue
- 4 pearson_r_eff_p_value tests: numpy 2.x nonzero() behavior change

These are separate upstream compatibility issues in xarray/dask/xskillscore.
@aaronspring
Copy link
Collaborator Author

aaronspring commented Jan 16, 2026

Summary

Fixed the trapezoid issue by upgrading numpy to >=2.0.0.

Changes made to :

  • "numpy >=1.25.0" → "numpy >=2.0.0"
  • "numpy >=1.25.0,<2.0.0" → "numpy >=2.0.0" (bias-correction extra)

Test Results:

  • Before: 70 failed (63 trapezoid + 7 bootstrap)
  • After: 14 failed (10 bootstrap lazy + 4 pearson_r_eff_p_value)
  • Improvement: 56 tests now pass ✓

All roc metric tests now pass.

Remaining Issues (14 failures):

These are separate numpy 2.x compatibility issues in upstream dependencies:

  1. 10 bootstrap lazy_results tests -

    • Related to xarray/dask chunking with strict=True zip
  2. 4 pearson_r_eff_p_value tests -

    • numpy 2.x changed behavior on 0d arrays

These need fixes from xarray, dask, or xskillscore upstream.

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.

2 participants