-
-
Notifications
You must be signed in to change notification settings - Fork 334
forward write_empty_chunks kwarg in group.require_dataset #1051
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
Conversation
looks like CI is failing for python 3.7 due to some type annotation stuff... do we need to support 3.7 still? |
|
…ble assignment from tests
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1051 +/- ##
=======================================
Coverage 99.94% 99.94%
=======================================
Files 34 34
Lines 13846 13865 +19
=======================================
+ Hits 13839 13858 +19
Misses 7 7
|
mypy is almost happy. A few things that I would appreciate input on:
|
My guess is that they should throw on
Extracting the entire contents of |
@grlee77 can you shed some light on whether the |
That is how |
I'm going to close this as stale. Folks should feel free to reopen if there is interest in continuing this work. |
Currently when using a
Group
to get an existingArray
viaGroup.require_dataset
, there's no way to control the "write_empty_chunksness" of the array (sinceArray.write_empty_chunks
is not part of the array metadata). This means that you cannot callgroup.require_dataset('foo', shape=10, dtype='i4', write_empty_chunks=False)
and get an array that has the desired.write_empty_chunks
property (instead thewrite_empty_chunks
kwarg is ignored).A few other array properties are similar (
synchronizer
,cache_metadata
, andcache_attrs
), and in main these keyword arguments are extracted from the **kwargs argument toGroup.require_dataset
before being passed to theArray
constructor. This PR expands this behavior to includewrite_empty_chunks
, thereby enabling the control of thewrite_empty_chunks
property of the arrays returned byGroup.require_dataset
.I also added a lot of type annotations.
TODO: