Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpin, to see what happens #531

Merged
merged 6 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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