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

Default zarr.open to open_group if shape is not provided #2158

Open
wants to merge 9 commits into
base: v3
Choose a base branch
from

Conversation

agoodm
Copy link

@agoodm agoodm commented Sep 8, 2024

[Description of PR] Closes #2143

This change makes the v3 zarr.open more consistent with v2 by defaulting to open_group if shape isn't provided, which now allows for initializing a group in a non-existent path if mode="a".

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

src/zarr/api/asynchronous.py Outdated Show resolved Hide resolved
tests/v3/test_api.py Show resolved Hide resolved
@agoodm agoodm requested a review from jhamman September 12, 2024 18:03
@jhamman jhamman added the V3 Related to compatibility with V3 spec label Sep 13, 2024
jni pushed a commit to napari/napari that referenced this pull request Sep 16, 2024
# References and relevant issues
closes #7270

# Description
as zarr-developers/zarr-python#2143 is not
resolved yet we need to block next alpha release. But there is
zarr-developers/zarr-python#2158 opened, so it
should be resolved shortly.
Copy link
Member

@jhamman jhamman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good @agoodm -- thanks for working out the logic in a clean way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3 Related to compatibility with V3 spec
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

zarr.open do not allow creating group file [v3]
3 participants