-
-
Notifications
You must be signed in to change notification settings - Fork 325
Fix: respect config
when opening an existing array
#2933
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
Discussed with @jhamman at the dev meeting and we came to the following conclusion:
This keeps better consistency with zarr-python 2 and is more explicit in what the user is passing rather a layer of obfuscation by wrapping in |
Motivated by pydata/xarray#10177 cc @d-v-b |
@@ -746,6 +746,43 @@ def test_resize_2d(store: MemoryStore, zarr_format: ZarrFormat) -> None: | |||
assert new_shape == z[:].shape | |||
|
|||
|
|||
@pytest.mark.parametrize("store", ["local"], indirect=True) | |||
@pytest.mark.parametrize("open", ["open", "open_array"]) | |||
def test_append_config_passed(store: LocalStore, open: str, zarr_format: ZarrFormat) -> None: |
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.
Why do our existing write_empty_chunks
tests not work here?
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.
for context, it would probably be preferable to expand the scope of an existing test instead of adding a new one
Fixes #2931
Previously there were edge cases with open which would result in the
write_empty_chunks
config was being ignored. This PR has two separate fixes.1st: for
zarr.open
line 3272nd:
zarr.open_array
required some config parsing as well as a change to the api ofAsyncArray.open
docs/user-guide/*.rst
changes/