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

Support Block (Chunk) Indexing #1428

Merged
merged 11 commits into from Jul 10, 2023
Merged

Conversation

tasansal
Copy link
Contributor

@tasansal tasansal commented Jun 8, 2023

Closes #518, #543, #545, #991.

This feature has been requested many times.
This adds the basic functionality of Dask's dask.array.Array.blocks indexing.

I explained the implementation in detail in #991. Please see details there.

This PR implements #991 and adds tests, tutorial, and docs.

This does allow integer and slice (with step of 1) block indexing, or a mix of the two, for Zarr arrays.

QUESTION

  • I wasn't exactly sure where to put it in the change log. Currently its in 2.15.0, however, should I move that to Unreleased section??

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)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jun 8, 2023
@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #1428 (257c903) into main (4132f36) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              main     #1428    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           37        37            
  Lines        14866     15017   +151     
==========================================
+ Hits         14866     15017   +151     
Impacted Files Coverage Δ
zarr/core.py 100.00% <100.00%> (ø)
zarr/indexing.py 100.00% <100.00%> (ø)
zarr/tests/test_core.py 100.00% <100.00%> (ø)
zarr/tests/test_indexing.py 100.00% <100.00%> (ø)

@tasansal tasansal marked this pull request as ready for review June 8, 2023 22:47
@joshmoore
Copy link
Member

  • I wasn't exactly sure where to put it in the change log. Currently its in 2.15.0, however, should I move that to Unreleased section??

Yes please, and update your comments of 2.15 to be 2.16? Huge thanks!

@tasansal
Copy link
Contributor Author

  • I wasn't exactly sure where to put it in the change log. Currently its in 2.15.0, however, should I move that to Unreleased section??

Yes please, and update your comments of 2.15 to be 2.16? Huge thanks!

Done! Seems like all the CI passed too.

@tasansal
Copy link
Contributor Author

@joshmoore ready to merge?

@joshmoore
Copy link
Member

In general, this looks really well done. I'd still ping a few daskanistas (daskonauts?) for some feedback.

cc: @jrbourbeau @jni but of course others welcome!

Copy link
Contributor

@rabernat rabernat left a comment

Choose a reason for hiding this comment

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

This is a great new feature.

@rabernat rabernat merged commit 98f74d5 into zarr-developers:main Jul 10, 2023
21 checks passed
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.

Enhancement: Chunk level access api / indexing by chunk rather than voxel
4 participants