Skip to content

Commit

Permalink
Unpin, to see what happens (#531)
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
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [ ] (If applicable) Tests have been added.
- [x] This PR does not seem to break the templates.
- [ ] 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?

* Unpin xarray, dask and zarr to see what happens.
* Change "<" pin of xESMF to "=!" as the bug is resolved in xESMF's
master.

### Does this PR introduce a breaking change?


### Other information:
  • Loading branch information
aulemahal authored Feb 26, 2025
2 parents 4fbe0ce + fdf4339 commit 69c42f6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
3 changes: 1 addition & 2 deletions docs/notebooks/6_config.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@
"\n",
"# Create a dummy dataset\n",
"time = pd.date_range(\"1951-01-01\", \"2100-01-01\", freq=\"YS-JAN\")\n",
"da = xr.DataArray([0] * len(time), coords={\"time\": time})\n",
"da.name = \"test\"\n",
"da = xr.DataArray([0] * len(time), coords={\"time\": time}, name=\"test\")\n",
"ds = da.to_dataset()\n",
"\n",
"# Call climatological_op using no argument other than what's in CONFIG\n",
Expand Down
8 changes: 4 additions & 4 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: xscen-dev
channels:
- conda-forge
dependencies:
- python >=3.10,<3.13
- python >=3.10,<3.14
- pip >=25.0
# Don't forget to sync changes between environment.yml, environment-dev.yml, and pyproject.toml!
# Also consider updating the list in xs.utils.show_versions if you add a new package.
Expand All @@ -11,7 +11,7 @@ dependencies:
- cftime
- cf_xarray >=0.7.6
- clisops >=0.15
- dask >=2024.8.1,<2024.11 # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
- dask >=2024.8.1,<2024.12 # FIXME: Remove upper pin when https://github.com/pangeo-data/rechunker/pull/156 is merged
- flox !=0.9.14 # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
- fsspec
- geopandas
Expand All @@ -31,10 +31,10 @@ dependencies:
- shapely >=2.0
- sparse
- toolz
- xarray >=2023.11.0, !=2024.6.0, <2024.10.0 # FIXME: 2024.10.0 breaks rechunker with zarr, https://github.com/pangeo-data/rechunker/issues/154
- xarray >=2023.11.0, !=2024.6.0
- xclim >=0.55, <0.56
- xesmf >=0.7, !=0.8.8
- zarr >=2.13, <3.0 # FIXME: xarray is compatible with zarr 3.0 from 2025.01.1, but we pin xarray below that version
- zarr >=2.13, <3
# Opt
- nc-time-axis >=1.3.1
- pyarrow >=10.0.1
Expand Down
8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: xscen
channels:
- conda-forge
dependencies:
- python >=3.10,<3.13
- python >=3.10,<3.14
- pip >=25.0
# Don't forget to sync changes between environment.yml, environment-dev.yml, and pyproject.toml!
# Also consider updating the list in xs.utils.show_versions if you add a new package.
Expand All @@ -11,7 +11,7 @@ dependencies:
- cftime
- cf_xarray >=0.7.6
- clisops >=0.15
- dask >=2024.8.1,<2024.11 # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
- dask >=2024.8.1,<2024.12 # FIXME: Remove upper pin when https://github.com/pangeo-data/rechunker/pull/156 is merged
- flox !=0.9.14 # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
- fsspec
- geopandas
Expand All @@ -31,10 +31,10 @@ dependencies:
- shapely >=2.0
- sparse
- toolz
- xarray >=2023.11.0, !=2024.6.0, <2024.10.0 # FIXME: 2024.10.0 breaks rechunker with zarr
- xarray >=2023.11.0, !=2024.6.0
- xclim >=0.55, <0.56
- xesmf >=0.7, !=0.8.8
- zarr >=2.13, <3.0 # FIXME: xarray is compatible with zarr 3.0 from 2025.01.1, but we pin xarray below that version
- zarr >=2.13, <3
# To install from source
- flit >=3.10.1,<4.0
# Opt
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies = [
"cftime",
"cf_xarray >=0.7.6",
"clisops >=0.15",
"dask >=2024.8.1,<2024.11", # FIXME: https://github.com/Ouranosinc/xclim/issues/1992
"dask >=2024.8.1,<2024.12.0", # FIXME: Remove upper pin when https://github.com/pangeo-data/rechunker/pull/156 is merged
"flox !=0.9.14", # FIXME: 0.9.14 is a broken version. This pin could be removed eventually.
"fsspec",
"geopandas",
Expand All @@ -61,9 +61,9 @@ dependencies = [
"shapely >=2.0",
"sparse",
"toolz",
"xarray >=2023.11.0, !=2024.6.0, <2024.10.0", # FIXME: 2024.10.0 breaks rechunker with zarr
"xarray >=2023.11.0, !=2024.6.0",
"xclim >=0.55, <0.56",
"zarr >=2.13, <3.0" # FIXME: xarray is compatible with zarr 3.0 from 2025.01.1, but we pin xarray below that version"
"zarr >=2.13,<3"
]

[project.optional-dependencies]
Expand Down Expand Up @@ -110,7 +110,7 @@ docs = [
"sphinxcontrib-napoleon"
]
extra = [
"xesmf >=0.7, !=0.8.8"
"xesmf >=0.7, !=0.8.8" # FIXME: 0.8.8 currently creates segfaults on ReadTheDocs.
]
all = ["xscen[dev]", "xscen[docs]", "xscen[extra]"]

Expand Down
5 changes: 5 additions & 0 deletions src/xscen/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,11 @@ def rechunk(
ds = xr.open_dataset(path_in)
else:
ds = path_in
# Remove all input chunks information, avoids an error with rechunker and xarray >= 2024.10
# TODO: Remove this and pin rechunker when https://github.com/pangeo-data/rechunker/pull/156 is merged and released
for var in ds.variables.values():
var.encoding.pop("chunks", None)

variables = list(ds.data_vars)
if chunks_over_var:
chunks = chunks_over_var
Expand Down

0 comments on commit 69c42f6

Please sign in to comment.