Skip to content

[do not merge] test new dtypes in zarr-python #10332

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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3bff90d
use new dtypes branch of zarr python
d-v-b May 19, 2025
bc97329
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b May 19, 2025
3dc64fc
special-case for zarr in module_available
d-v-b May 20, 2025
3c40a04
try declaring git dep in environment.yml
d-v-b May 20, 2025
a7826fe
try another dep site
d-v-b May 20, 2025
5aa685b
fix zarr version detection
d-v-b May 20, 2025
5aca9c1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 20, 2025
8ecd633
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b May 23, 2025
3463015
use numpy dtype exposed by zarr array instead of metadata.data_type
d-v-b May 23, 2025
3a264d1
use new dtypes branch of zarr python
d-v-b May 19, 2025
9808a79
special-case for zarr in module_available
d-v-b May 20, 2025
356811b
try declaring git dep in environment.yml
d-v-b May 20, 2025
19f4636
try another dep site
d-v-b May 20, 2025
52dfd50
fix zarr version detection
d-v-b May 20, 2025
bf1cf51
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 20, 2025
ea67a78
Merge branch 'zarr-new-dtypes-compat' of https://github.com/d-v-b/xar…
d-v-b May 23, 2025
ee69539
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b May 30, 2025
0e5bdda
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b Jun 7, 2025
5ddedcb
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b Jun 20, 2025
633a054
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b Jul 3, 2025
a92cb5a
Merge branch 'main' into zarr-new-dtypes-compat
d-v-b Jul 3, 2025
601e5ea
Update install-upstream-wheels.sh
d-v-b Jul 3, 2025
ce7a181
Update install-upstream-wheels.sh
d-v-b Jul 3, 2025
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
2 changes: 1 addition & 1 deletion ci/install-upstream-wheels.sh
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ python -m pip install \
git+https://github.com/dask/dask \
git+https://github.com/dask/dask-expr \
git+https://github.com/dask/distributed \
git+https://github.com/zarr-developers/zarr-python \
git+https://github.com/zarr-developers/zarr-python.git@main \
git+https://github.com/Unidata/cftime \
git+https://github.com/pypa/packaging \
git+https://github.com/hgrecco/pint \
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ complete = ["xarray[accel,etc,io,parallel,viz]"]
io = [
"netCDF4>=1.6.0",
"h5netcdf",
"pydap",
"scipy>=1.13",
"zarr>=2.18",
'pydap',
"zarr @ git+https://github.com/d-v-b/zarr-python.git@feat/fixed-length-strings",
"fsspec",
"cftime",
"pooch",
10 changes: 8 additions & 2 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@
from xarray.core.variable import Variable
from xarray.namedarray.parallelcompat import guess_chunkmanager
from xarray.namedarray.pycompat import integer_types
from xarray.namedarray.utils import module_available

if TYPE_CHECKING:
from xarray.backends.common import AbstractDataStore
@@ -106,7 +105,14 @@ def _choose_default_mode(


def _zarr_v3() -> bool:
return module_available("zarr", minversion="3")
# don't use the module_available function because it doesn't report zarr v3 correctly.
try:
import zarr
from packaging.version import Version

return Version(zarr.__version__).major == 3
except ImportError:
return False


# need some special secret attributes to tell us the dimensions
1 change: 0 additions & 1 deletion xarray/namedarray/utils.py
Original file line number Diff line number Diff line change
@@ -51,7 +51,6 @@ def module_available(module: str, minversion: str | None = None) -> bool:
"""
if importlib.util.find_spec(module) is None:
return False

if minversion is not None:
version = importlib.metadata.version(module)

Loading
Oops, something went wrong.