Skip to content

Handle zarr 3.1.0 #766

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

Merged
merged 38 commits into from
Aug 12, 2025
Merged

Handle zarr 3.1.0 #766

merged 38 commits into from
Aug 12, 2025

Conversation

d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Jul 17, 2025

Implements a data type adapter layer for numcodecs.zarr3. Ensures that zarr data structures get the right data type.

this hopefully fixes the breakage caused by the zarr 3.1 release.

TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

Copy link

codecov bot commented Jul 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (506c89b) to head (80fb4d2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #766      +/-   ##
===========================================
+ Coverage   99.96%   100.00%   +0.03%     
===========================================
  Files          64        64              
  Lines        2789      2804      +15     
===========================================
+ Hits         2788      2804      +16     
+ Misses          1         0       -1     
Files with missing lines Coverage Δ
numcodecs/zarr3.py 100.00% <100.00%> (+0.60%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

LGTM - the new API should definitely be made private, and it would be good to see at least one CI run against Zarr 3.0.x to make sure we're retaining support there.

@d-v-b
Copy link
Contributor Author

d-v-b commented Jul 19, 2025

LGTM - the new API should definitely be made private, and it would be good to see at least one CI run against Zarr 3.0.x to make sure we're retaining support there.

what's the easiest way to set up a test matrix that includes multiple zarr versions that can be run locally easily? Maybe we need to bite the bullet and bring in #704

@dstansby
Copy link
Contributor

For now, can we not just have one test run on the GH Actions CI that tests against zarr-python 3.0.x?

@d-v-b
Copy link
Contributor Author

d-v-b commented Jul 28, 2025

For now, can we not just have one test run on the GH Actions CI that tests against zarr-python 3.0.x?

sure! can you write it?

@d-v-b
Copy link
Contributor Author

d-v-b commented Jul 29, 2025

I added pixi + hatch to pyproject.toml exclusively for running the zarr-python tests against two different versions of zarr-python. We can always add to this later.

Copy link
Contributor

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

Big 👍 for pixi here. A couple of things:

  • I think we shouldn't commit a lockfile, see inline comment
  • In the test logs the version of Zarr the tests are run with isn't printed, meaning it's not possible to verify tests are being run against 3.0.x and latest zarr. Can you print the Zarr version somehow?

@d-v-b
Copy link
Contributor Author

d-v-b commented Aug 12, 2025

In the test logs the version of Zarr the tests are run with isn't printed, meaning it's not possible to verify tests are being run against 3.0.x and latest zarr. Can you print the Zarr version somehow?

437689f adds a step in CI that lists the deps

@d-v-b d-v-b requested a review from dstansby August 12, 2025 14:37
Copy link
Member

@TomNicholas TomNicholas 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 important to get in because currently there is zarr data written in the wild that cannot be read with recent zarr-python versions without this PR.

@d-v-b d-v-b requested review from a team and removed request for dstansby August 12, 2025 15:27
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.

Thanks for making this critical fix. Currently, lots of data that was written by Zarr 3.0 is unreadably by 3.1. That needs to be resolved urgently.

This PR reveals something well known already, which is that the interface between Zarr and Numcodecs is not well defined anymore.

However, I think it's critical to get this PR out asap and deal with that broader question later.

@d-v-b d-v-b merged commit f42a233 into zarr-developers:main Aug 12, 2025
46 of 47 checks passed
@d-v-b d-v-b deleted the handle-zarr-3.1.0 branch August 12, 2025 17:19
@d-v-b d-v-b mentioned this pull request Aug 13, 2025
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.

5 participants