-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow rechunking to groups #144
Conversation
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
===========================================
+ Coverage 70.03% 96.12% +26.09%
===========================================
Files 11 11
Lines 554 568 +14
Branches 106 113 +7
===========================================
+ Hits 388 546 +158
+ Misses 149 14 -135
+ Partials 17 8 -9
|
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.
It would be nice to add some tests against the new error states. Other than that, this looks nice and clean.
rechunker/api.py
Outdated
@@ -287,6 +289,10 @@ def rechunk( | |||
* python | |||
* pywren | |||
|
|||
array_name: str, optional | |||
Required when rechunking an array if the any of the targets is a group |
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.
Required when rechunking an array if the any of the targets is a group | |
Required when rechunking an array if any of the targets are a group |
rechunker/api.py
Outdated
@@ -142,12 +142,13 @@ def _encode_zarr_attributes(attrs): | |||
|
|||
def _zarr_empty(shape, store_or_group, chunks, dtype, name=None, **kwargs): | |||
# wrapper that maybe creates the array within a group | |||
if name is not None: | |||
assert isinstance(store_or_group, zarr.hierarchy.Group) | |||
if isinstance(store_or_group, zarr.hierarchy.Group): |
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.
Is there a difference between zarr.hierarchy.Group
and zarr.Group
? Later on you use the latter.
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.
No difference.
This PR allows
target_store
andtemp_store
to be existing Zarr groups rather than store objects.