From 515cc810e6e5bf479ad7091cbf0a73b3a865456c Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Tue, 5 Nov 2024 16:12:55 -0500 Subject: [PATCH 1/5] change upstream CI dependency --- ci/upstream.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/upstream.yml b/ci/upstream.yml index 2c2680bc..035d76f8 100644 --- a/ci/upstream.yml +++ b/ci/upstream.yml @@ -3,6 +3,7 @@ channels: - conda-forge - nodefaults dependencies: + - xarray>=2024.10.0 - h5netcdf - h5py - hdf5 @@ -25,6 +26,5 @@ dependencies: - pip - pip: - icechunk # Installs zarr v3 as dependency - - git+https://github.com/pydata/xarray@zarr-v3 # zarr-v3 compatibility branch - git+https://github.com/zarr-developers/numcodecs@zarr3-codecs # zarr-v3 compatibility branch # - git+https://github.com/fsspec/kerchunk@main # kerchunk is currently incompatible with zarr-python v3 (https://github.com/fsspec/kerchunk/pull/516) From 631ba315566df90a31f0c1388669e8a1da4e6449 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Tue, 5 Nov 2024 16:13:15 -0500 Subject: [PATCH 2/5] change non-upstream CI dependencies --- ci/environment.yml | 2 +- ci/min-deps.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/environment.yml b/ci/environment.yml index 883463a2..0bb5b366 100644 --- a/ci/environment.yml +++ b/ci/environment.yml @@ -7,7 +7,7 @@ dependencies: - h5py - hdf5 - netcdf4 - - xarray>=2024.6.0 + - xarray>=2024.10.0 - kerchunk>=0.2.5 - numpy>=2.0.0 - ujson diff --git a/ci/min-deps.yml b/ci/min-deps.yml index 7ca8c0b3..05778382 100644 --- a/ci/min-deps.yml +++ b/ci/min-deps.yml @@ -7,7 +7,7 @@ dependencies: - h5py - hdf5 - netcdf4 - - xarray>=2024.6.0 + - xarray>=2024.10.0 - numpy>=2.0.0 - numcodecs - packaging From 709f17acc22a7bec4f8120412d3191c190d15bdb Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Tue, 5 Nov 2024 16:13:29 -0500 Subject: [PATCH 3/5] change entire project depedendency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d216b269..749afb94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ requires-python = ">=3.10" dynamic = ["version"] dependencies = [ - "xarray>=2024.06.0", + "xarray>=2024.10.0", "numpy>=2.0.0", "packaging", "universal-pathlib", From 97b43afbade5f0859ab356f035848c2a9e913ba4 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Tue, 5 Nov 2024 16:15:57 -0500 Subject: [PATCH 4/5] use explicit import of xarray.DataTree for type hint --- virtualizarr/readers/common.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/virtualizarr/readers/common.py b/virtualizarr/readers/common.py index 646d26ca..1ad24629 100644 --- a/virtualizarr/readers/common.py +++ b/virtualizarr/readers/common.py @@ -4,7 +4,6 @@ from collections.abc import Iterable, Mapping, MutableMapping from io import BufferedIOBase from typing import ( - TYPE_CHECKING, Any, Hashable, Optional, @@ -14,6 +13,7 @@ from xarray import ( Coordinates, Dataset, + DataTree, Index, IndexVariable, Variable, @@ -26,12 +26,6 @@ XArrayOpenT = str | os.PathLike[Any] | BufferedIOBase | AbstractDataStore -if TYPE_CHECKING: - try: - from xarray import DataTree # type: ignore[attr-defined] - except ImportError: - DataTree = Any - def open_loadable_vars_and_indexes( filepath: str, @@ -194,5 +188,5 @@ def open_virtual_datatree( decode_times: bool | None = None, indexes: Mapping[str, Index] | None = None, reader_options: Optional[dict] = None, - ) -> "DataTree": + ) -> DataTree: raise NotImplementedError() From 926f5fc634872f1aec70b6b04e95d11cf326d1e6 Mon Sep 17 00:00:00 2001 From: TomNicholas Date: Tue, 5 Nov 2024 16:18:09 -0500 Subject: [PATCH 5/5] release note --- docs/releases.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/releases.rst b/docs/releases.rst index 93a5fec9..1ca594a1 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -42,6 +42,8 @@ Breaking changes - VirtualiZarr's `ZArray`, `ChunkEntry`, and `Codec` no longer subclass `pydantic.BaseModel` (:pull:`210`) - `ZArray`'s `__init__` signature has changed to match `zarr.Array`'s (:pull:`210`) +- Minimum required version of Xarray is now v2024.10.0. + (:pull:`284`) By `Tom Nicholas `_. Deprecations ~~~~~~~~~~~~