Skip to content

Commit 7a037f1

Browse files
committed
cleanup
1 parent 3e035a6 commit 7a037f1

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ io = [
4545
"cftime",
4646
"pooch",
4747
]
48-
# "zarr @ git+https://github.com/zarr-developers/zarr-python.git",
4948
etc = ["sparse>=0.15"]
5049
parallel = ["dask[complete]"]
5150
viz = ["cartopy>=0.23", "matplotlib", "nc-time-axis", "seaborn"]

xarray/backends/zarr.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,7 @@ def _choose_default_mode(
107107

108108

109109
def _zarr_v3() -> bool:
110-
# hack for this test only
111-
# version being pickd up as 3.0.0b which is apparently not greater than 3
112-
# return True
113-
return module_available("zarr", minversion="3.0.0a0")
110+
return module_available("zarr", minversion="3")
114111

115112

116113
# need some special secret attributes to tell us the dimensions
@@ -1068,7 +1065,6 @@ def _open_existing_array(self, *, name) -> ZarrArray:
10681065
def _create_new_array(
10691066
self, *, name, shape, dtype, fill_value, encoding, attrs
10701067
) -> ZarrArray:
1071-
# STRING ERROR FOR OBJECT HERE
10721068
if coding.strings.check_vlen_dtype(dtype) is str:
10731069
dtype = str
10741070

xarray/tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _importorskip(
129129
has_bottleneck, requires_bottleneck = _importorskip("bottleneck")
130130
has_rasterio, requires_rasterio = _importorskip("rasterio")
131131
has_zarr, requires_zarr = _importorskip("zarr")
132-
has_zarr_v3, requires_zarr_v3 = _importorskip("zarr", "3.0.0a01")
132+
has_zarr_v3, requires_zarr_v3 = _importorskip("zarr", "3.0.0")
133133
has_fsspec, requires_fsspec = _importorskip("fsspec")
134134
has_iris, requires_iris = _importorskip("iris")
135135
has_numbagg, requires_numbagg = _importorskip("numbagg")

xarray/tests/test_backends.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,14 @@ def create_store(self):
369369
def roundtrip(
370370
self, data, save_kwargs=None, open_kwargs=None, allow_cleanup_failure=False
371371
):
372+
print("INT ROUNDTRIP")
372373
if save_kwargs is None:
373374
save_kwargs = {}
374375
if open_kwargs is None:
375376
open_kwargs = {}
376377
with create_tmp_file(allow_cleanup_failure=allow_cleanup_failure) as path:
378+
print(path)
379+
print(save_kwargs)
377380
self.save(data, path, **save_kwargs)
378381
with self.open(path, **open_kwargs) as ds:
379382
yield ds
@@ -848,8 +851,16 @@ def test_outer_indexing_reversed(self) -> None:
848851
{"z": (("t", "p", "y", "x"), np.ones((1, 1, 31, 40)))},
849852
)
850853

854+
print("jsda;lkjasdlfk")
855+
print(f"Test class: {self.__class__.__name__}")
856+
print(f"Dataset: {ds}")
851857
with self.roundtrip(ds) as on_disk:
858+
print(f"on_disk type: {type(on_disk)}")
859+
print(f"on_disk.z type: {type(on_disk.z)}")
852860
subset = on_disk.isel(t=[0], p=0).z[:, ::10, ::10][:, ::-1, :]
861+
print(f"subset sizes: {subset.sizes}")
862+
loaded = subset.load()
863+
print(f"loaded sizes: {loaded.sizes}")
853864
assert subset.sizes == subset.load().sizes
854865

855866
def test_isel_dataarray(self) -> None:
@@ -2996,11 +3007,6 @@ def test_append_with_append_dim_no_overwrite(self) -> None:
29963007
original2["lon"] = lon
29973008
assert_identical(original2, actual)
29983009

2999-
def test_minimal_round(self) -> None:
3000-
ds = create_test_data()
3001-
with self.roundtrip(ds) as ds_reload:
3002-
assert_identical(ds, ds_reload)
3003-
30043010
@requires_dask
30053011
def test_to_zarr_compute_false_roundtrip(self) -> None:
30063012
from dask.delayed import Delayed

0 commit comments

Comments
 (0)