Skip to content

Commit b824b2c

Browse files
authored
Merge branch 'master' into fsspec_kwargs_bugfix
2 parents 4ee7d00 + 4b03dfe commit b824b2c

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

docs/release.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,33 @@ Release notes
66
Unreleased
77
----------
88

9+
.. _release_2.9.2:
10+
11+
2.9.2
12+
-----
13+
14+
Maintenance
15+
~~~~~~~~~~~
16+
17+
* Correct conda-forge deployment of Zarr by fixing some Zarr tests.
18+
By :user:`Ben Williams <benjaminhwilliams>`; :issue:`821`.
19+
20+
21+
.. _release_2.9.1:
22+
23+
2.9.1
24+
-----
25+
26+
Maintenance
27+
~~~~~~~~~~~
28+
29+
* Correct conda-forge deployment of Zarr.
30+
By :user:`Josh Moore <joshmoore>`; :issue:`XXX`.
31+
932
.. _release_2.9.0:
1033

34+
2.9.0
35+
-----
1136

1237
This release of Zarr Python is the first release of Zarr to not support Python 3.6.
1338

zarr/storage.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,17 +1255,6 @@ def __init__(self, suffix='', prefix='zarr', dir=None, normalize_keys=False,
12551255
_prog_number = re.compile(r'^\d+$')
12561256

12571257

1258-
def _nested_map_ckey(key):
1259-
segments = list(key.split('/'))
1260-
if segments:
1261-
last_segment = segments[-1]
1262-
if _prog_ckey.match(last_segment):
1263-
last_segment = last_segment.replace('.', '/')
1264-
segments = segments[:-1] + [last_segment]
1265-
key = '/'.join(segments)
1266-
return key
1267-
1268-
12691258
class NestedDirectoryStore(DirectoryStore):
12701259
"""Storage class using directories and files on a standard file system, with
12711260
special handling for chunk keys so that chunk files for multidimensional

zarr/tests/test_dim_separator.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import pathlib
2+
13
import pytest
24
from numpy.testing import assert_array_equal
35

@@ -29,18 +31,19 @@ def dataset(tmpdir, request):
2931
kwargs = {}
3032

3133
if which.startswith("static"):
34+
project_root = pathlib.Path(zarr.__file__).resolve().parent.parent
3235
if which.endswith("nested"):
33-
return "fixture/nested"
36+
return str(project_root / "fixture/nested")
3437
else:
35-
return "fixture/flat"
38+
return str(project_root / "fixture/flat")
3639

3740
if which.startswith("directory"):
3841
store_class = DirectoryStore
3942
elif which.startswith("nested"):
4043
store_class = NestedDirectoryStore
4144
else:
4245
if have_fsspec is False:
43-
pytest.skip("no fsspec")
46+
pytest.skip("no fsspec") # pragma: no cover
4447
store_class = FSStore
4548
kwargs["mode"] = "w"
4649
kwargs["auto_mkdir"] = True
@@ -60,9 +63,10 @@ def verify(array):
6063

6164

6265
def test_open(dataset):
63-
verify(zarr.open(dataset))
66+
verify(zarr.open(dataset, "r"))
6467

6568

69+
@pytest.mark.skipif(have_fsspec is False, reason="needs fsspec")
6670
def test_fsstore(dataset):
6771
verify(Array(store=FSStore(dataset)))
6872

0 commit comments

Comments
 (0)