Skip to content
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

Pin Zarr >=2.13.6 so we use new FSStore objects (instead of KVStore) #65

Merged
merged 5 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions activestorage/active.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ def _get_selection(self, *args):
stripped_indexer = [(a, b, c) for a,b,c in indexer]
drop_axes = indexer.drop_axes # not sure what this does and why, yet.

# yes this next line is bordering on voodoo ...
fsref = self.zds.chunk_store._mutable_mapping.fs.references
# yes this next line is bordering on voodoo ...
# this returns a nested dictionary with the full file FS reference
# ie all the gubbins: chunks, data structure, types, etc
# if using zarr<=2.13.3 call with _mutable_mapping ie
# fsref = self.zds.chunk_store._mutable_mapping.fs.references
fsref = self.zds.chunk_store.fs.references

return self._from_storage(stripped_indexer, drop_axes, out_shape,
out_dtype, compressor, filters, missing, fsref)
Expand Down
4 changes: 3 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ dependencies:
- pip !=21.3
- pytest
- xarray
- zarr <=2.13.3 # github.com/valeriupredoi/PyActiveStorage/issues/62
# pin Zarr to avoid using old KVStore interface
# see github.com/zarr-developers/zarr-python/issues/1362
- zarr >=2.13.6 # KVStore to FSStore
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
'netcdf4',
'pytest',
'xarray',
'zarr<=2.13.3', # github.com/valeriupredoi/PyActiveStorage/issues/62
# pin Zarr to use new FSStore instead of KVStore
'zarr>=2.13.3', # github.com/zarr-developers/zarr-python/issues/1362
# for testing
'pytest-cov>=2.10.1',
'pytest-xdist',
Expand Down