-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Updates for Zarr 3 Dtypes #10456
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
base: main
Are you sure you want to change the base?
Updates for Zarr 3 Dtypes #10456
Changes from all commits
47359bd
218098b
841ed36
99cfd78
5da1124
cb18495
3e035a6
7a037f1
c597782
3877091
6d3e9cd
fde770d
5da6cca
f8a45ba
12c4943
f2e917a
b1c6809
8ee46b1
05c8aa6
3f7a557
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -820,7 +820,9 @@ def open_store_variable(self, name): | |||||||||
attributes["_FillValue"], zarr_array.dtype | ||||||||||
) | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this code is correct and should be restored |
||||||||||
|
||||||||||
return Variable(dimensions, data, attributes, encoding) | ||||||||||
variable = Variable(dimensions, data, attributes, encoding) | ||||||||||
|
||||||||||
return variable | ||||||||||
Comment on lines
+823
to
+825
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
def get_variables(self): | ||||||||||
return FrozenDict((k, self.open_store_variable(k)) for k in self.array_keys()) | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,20 @@ def _importorskip( | |
has_rasterio, requires_rasterio = _importorskip("rasterio") | ||
has_zarr, requires_zarr = _importorskip("zarr") | ||
has_zarr_v3, requires_zarr_v3 = _importorskip("zarr", "3.0.0") | ||
has_zarr_v3_dtypes, requires_zarr_v3_dtypes = _importorskip("zarr", "3.1.0") | ||
if has_zarr_v3: | ||
import zarr | ||
|
||
# manual update by checking attrs for now | ||
# TODO: use version specifier | ||
# installing from git main is giving me a lower version than the | ||
# most recently released zarr | ||
has_zarr_v3_dtypes = hasattr(zarr.core, "dtype") | ||
|
||
requires_zarr_v3_dtypes = pytest.mark.skipif( | ||
not has_zarr_v3_dtypes, reason="requires zarr>3.1.0" | ||
) | ||
|
||
Comment on lines
+134
to
+146
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this be removed now? |
||
has_fsspec, requires_fsspec = _importorskip("fsspec") | ||
has_iris, requires_iris = _importorskip("iris") | ||
has_numbagg, requires_numbagg = _importorskip("numbagg") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An attempt to get upstream tests to run on this PR