fix: support xarray v2025.x#883
Conversation
- Remove xarray version pin (<2025.3.0) from dependencies - Fix pytest-lazy-fixtures import conflict - Prepare for xarray v2025 breaking changes
- Remove <2025.3.0 pin from minimum-tests.yml and maximum-tests.yml - Allow testing with latest xarray versions
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## updates-2025 #883 +/- ##
===============================================
Coverage ? 91.51%
===============================================
Files ? 59
Lines ? 6273
Branches ? 0
===============================================
Hits ? 5741
Misses ? 532
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Coordinate ordering changed in xarray v2025 - Updated expected outputs in utils.py and classes.py to match new ordering
for more information, see https://pre-commit.ci
- PerfectModelEnsemble.verify: fix coordinate ordering (skill before lead) - PerfectModelEnsemble.bootstrap: update data values for new random state
- Add explicit np.random.seed(42) for reproducibility (attempt)
b7d0b9b to
9cc0f1e
Compare
for more information, see https://pre-commit.ci
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
for more information, see https://pre-commit.ci
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
…to fix-xarray-v2025
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
for more information, see https://pre-commit.ci
|
#884 may fix src/climpred/tests/test_bootstrap.py::test_bootstrap_PM_lazy_result in py3.12 https://github.com/pangeo-data/climpred/actions/runs/21221428782/job/61056950903?pr=883 |
|
how about deprecating all below python 3.11 the same way as Xarray? |
If you think that's fine, we could do that both here and in |
Avoid xarray bug with partial chunk dicts like {'iteration': 'auto'}
by only chunking non-dask arrays and object-dtype variables.
…an-centered data The test was failing for with because: - The test data is mean-centered (anomalies) - The climatology reference = mean of observations ≈ 0 (a constant) - pearson_r = covariance / (std_forecast * std_climatology) - std(climatology) = 0 when data is mean-centered, causing division by zero -> NaN This is a mathematical limitation, not a bug. The fix excludes from the CI variance check when using metric, while other metrics (, ) still check all skills.
|
all green ticks. AWESOME @Zeitsperre |
|
is uv.lock needed? did that spill over from my uv migration attempt? |
I think it's an artifact, actually. We could look into trying that out later, as you mentioned. I'd love to get this and the bot updates in, then we can release and make more significant changes. Thrilled to see this working as well! |
|
deleted the AI generated md files. anything missing? anything to do here? @Zeitsperre |
|
I'll give it a final review to be certain! |
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
|
I'm going to do some final finagling here for the |
Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
|
great. can be merged but not released before fixing #885 |
Summary
This PR removes xarray version pins to support v2025.x releases and fixes related compatibility issues.
Closes #880
Changes Made
Dependencies
Test Infrastructure
Analysis
Breaking changes in xarray v2025.x:
Testing
References