Skip to content

[v3] Feature: Store open mode - #1911

Merged
d-v-b merged 3 commits into
zarr-developers:v3from
jhamman:feature/store-open-mode
May 29, 2024
Merged

[v3] Feature: Store open mode#1911
d-v-b merged 3 commits into
zarr-developers:v3from
jhamman:feature/store-open-mode

Conversation

@jhamman

@jhamman jhamman commented May 25, 2024

Copy link
Copy Markdown
Member

This adds a new required attribute/property to the store API (Store.mode). Enforcing read/write permissions at the store is a much cleaner way of managing access than at the Group/Array level (as it is done in v2). I haven't pushed any test changes yet (waiting on #1900) but those will come next.

Xref: #1686 (comment)
Toward #1755

Design note: Think of this as the MVP, with the main focus on the Store.mode property and the most basic functionality. I think we can continue to explore how to help stores enforce permissions (e.g. via a decorator or something else) later.

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)

@jhamman jhamman changed the title wip [v3] Feature: Store open model May 25, 2024
@jhamman jhamman added this to the 3.0.0.alpha milestone May 25, 2024
@jhamman
jhamman requested a review from d-v-b May 26, 2024 17:04
@jhamman jhamman changed the title [v3] Feature: Store open model [v3] Feature: Store open mode May 26, 2024
Comment thread src/zarr/store/memory.py

@jeromekelleher jeromekelleher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lgtm!

@d-v-b
d-v-b merged commit ef15e20 into zarr-developers:v3 May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants