Skip to content

Conversation

@pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Aug 8, 2025

This enables Zarr v3 with Python
versions that are compatible.

Disable the failing memreader Zarr test on Zarr v3 for now.

Also add a commit that adds black/isort to
the dev dependencies so it's possible to
format/isort the repository easily.

@pjonsson pjonsson marked this pull request as draft August 8, 2025 11:38
@pjonsson
Copy link
Contributor Author

pjonsson commented Aug 8, 2025

The CI isn't testing with the right version of Python, so #30 should be merged before this.

I don't have time to investigate Zarr today so marking this PR as a draft for now.

@pjonsson pjonsson force-pushed the update-deps branch 5 times, most recently from 8570e02 to 4022a04 Compare August 10, 2025 09:15
@pjonsson pjonsson marked this pull request as ready for review August 10, 2025 09:18
@pjonsson pjonsson requested review from Kirill888, SpacemanPaul and omad and removed request for omad August 10, 2025 09:20
@pjonsson
Copy link
Contributor Author

This updates the dependencies, and all tests except one passes. I don't know anything about differences between Zarr v2 and v3 and how consolidated metadata should be "emulated" in v3, so disable the failing test on Python 3.11+ for now.

I'm both swamped right now and I'm pretty sure we don't use odc-loader, so someone else needs to take it from here if consolidated metadata with Zarr v3 should be handled in odc-loader.

Comment on lines 219 to 222
@pytest.mark.skipif(
sys.version_info >= (3, 11),
reason="Zarr 3 does not currently support consolidated metadata",
)
Copy link
Member

Choose a reason for hiding this comment

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

should probably test actual zarr version not Python version where such zarr might be installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, fixed, and left a comment so it's easy to find the information in this PR for the person who will update the test to also work for Zarr v3.

@jsignell
Copy link

jsignell commented Sep 5, 2025

Sorry for the drive by review, but Zarr 3 does support consolidated metadata it is just in a different location. Instead of being in its own file it is under the "consolidated_metadata" key in the root zarr.json file.

@pjonsson
Copy link
Contributor Author

pjonsson commented Sep 5, 2025

@jsignell
Copy link

jsignell commented Sep 5, 2025

Your reading comprehension is good 😅. It's true that consolidated metadata is not part of the Zarr v3 spec, but it has never been part of the spec. It's just a convention. People are still using it though. The usefulness of consolidated metadata depends on the type of store you have and how much it changes, basically how much of a pain it is to keep consolidated metadata uptodate, so for instance icechunk - which wants to handle everything about how stores get updated - does not support consolidated metadata.

Here are some relevant issues: pydata/xarray#10122, zarr-developers/zarr-python#3119

@pjonsson pjonsson force-pushed the update-deps branch 2 times, most recently from 20b81e1 to 67b4978 Compare October 21, 2025 13:17
This makes it possible to run
"uv run black/isort" with a fixed
version of black/isort.
This enables Zarr v3 with Python
versions that are compatible.
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.

3 participants