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

Feat/latency store #2474

Merged
merged 14 commits into from
Dec 13, 2024
Merged

Feat/latency store #2474

merged 14 commits into from
Dec 13, 2024

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Nov 8, 2024

This PR adds a new store class, WrapperStore, that implements Store but wraps an existing store instance and delegates all of its methods to those of the wrapped store. I then use WrapperStore to define a store class that exists for performance testing, called LatencyStore, which (at the moment) adds parametric latency to the set and get methods.

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)

@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 8, 2024

anyone interested in implementing n5 in zarr-python 3 might find a use for WrapperStore (cc @dstansby )

@d-v-b d-v-b marked this pull request as ready for review November 12, 2024 16:59
@jhamman jhamman added the V3 label Nov 29, 2024
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.

Looks good. Need to sort out the AsyncIterator type question but otherwise this looks great.

src/zarr/storage/wrapper.py Outdated Show resolved Hide resolved
src/zarr/storage/logging.py Outdated Show resolved Hide resolved
src/zarr/testing/store.py Outdated Show resolved Hide resolved
@d-v-b
Copy link
Contributor Author

d-v-b commented Dec 3, 2024

@jhamman the type annotations and docstrings are ironed out

@dstansby dstansby removed the V3 label Dec 12, 2024
@d-v-b d-v-b merged commit 122760f into zarr-developers:main Dec 13, 2024
27 checks passed
@d-v-b d-v-b deleted the feat/latency-store branch December 13, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants