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

Zarr v3 #404

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open

Zarr v3 #404

wants to merge 25 commits into from

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Nov 7, 2024

Work in progress to update to Zarr v3.
This is currently focussed on getting existing Zarr v2 tests to pass...

Most of the tests are now passing using a recent commit on main branch of zarr-python.

 = 4 failed, 384 passed, 3 skipped, 6 xfailed, 1832 warnings in 86.38s (0:01:26) =

4 failing tests are:

  • TestWriter.test_writer[3D-scale-True-from_array-V01]
  • TestWriter.test_writer[3D-scale-True-from_array-V02]
  • TestWriter.test_writer[3D-scale-True-from_array-V03]
  • TestWriter.test_writer[3D-scale-True-from_array-V04]
          # check memory is contiguous, if so flatten
          if arr.flags.c_contiguous or arr.flags.f_contiguous:
              if flatten:
                  # can flatten without copy
                  arr = arr.reshape(-1, order="A")
          else:
  >           raise ValueError("an array with contiguous memory is required")
  E           ValueError: an array with contiguous memory is required
  
  .tox/py311/lib/python3.11/site-packages/numcodecs/compat.py:113: ValueError

These tests were passing before
* 109f71f6 (HEAD) Refactors v2 codec handling (#2425) (zarr-developers/zarr-python#2425)

This PR is just reading & writing zarr v2 data.
In several places I've hard-coded zarr_version=2. This works because you can do zarr.open_group(store=self.__store, path="/", zarr_version=2) in parse_url() to create a group to write into, or find a group to read from without specifying whether you expect the group to already exist.

Without the zarr_version=2, zarr will create zarr.json if the mode of the store is w.

@will-moore
Copy link
Member Author

Zarr v3 is not supported on python 3.9 or 3.10. I'll remove them from the build...

Build on python 3.12 is failing tests with:

  = 106 failed, 282 passed, 3 skipped, 6 xfailed, 2270 warnings in 75.86s (0:01:15) =

@imagesc-bot
Copy link

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/ome-zarr-py-development-status/104671/4

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.

2 participants