Skip to content

Commit

Permalink
Pin xarray to deal with polyfit/polyval regression (#1978)
Browse files Browse the repository at this point in the history
<!--Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #xyz
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features)
- [x] CHANGELOG.rst has been updated (with summary of main changes)
- [ ] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added

### What kind of change does this PR introduce?

* Pins `xarray` such that version 2024.10.0 is not compatible with
`xclim`.

### Does this PR introduce a breaking change?

Yes. `xarray` v2024.10.0 is considered to be broken according to our
configurations. The pin will stay in place until we drop `xarray` newer
than this version.

### Other information:

pydata/xarray#9690
pydata/xarray#9691

The issue is currently fixed upstream, so the next release of `xarray`
should have no issues.
  • Loading branch information
Zeitsperre authored Oct 30, 2024
2 parents 8a361e6 + 576927f commit 7e4b1ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Changelog

v0.54.0 (unreleased)
--------------------
Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`).
Contributors to this version: Éric Dupuis (:user:`coxipi`), Pascal Bourgault (:user:`aulemahal`), Trevor James Smith (:user:`Zeitsperre`).

Breaking changes
^^^^^^^^^^^^^^^^
* Due to a regression affecting symmetry of ``polyfit`` and ``polyval`` in `xarray`, `xclim` now requires `xarray>=2023.11.0,!=2024.10.0` (see: `pydata/xarray PR/9691 <https://github.com/pydata/xarray/pull/9691>`_. (:pull:`1978`).

Bug fixes
^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- scikit-learn >=1.1.0
- scipy >=1.9.0
- statsmodels >=0.14.2
- xarray >=2023.11.0
- xarray >=2023.11.0,!=2024.10.0
- yamale >=5.0.0
# Extras
- fastnanquantile >=0.0.2
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies = [
"scikit-learn >=1.1.0",
"scipy >=1.9.0",
"statsmodels >=0.14.2",
"xarray >=2023.11.0",
"xarray >=2023.11.0,!=2024.10.0",
"yamale >=5.0.0"
]

Expand Down

0 comments on commit 7e4b1ab

Please sign in to comment.