Add compatibility with Zarr-Python 3.2.0#957
Add compatibility with Zarr-Python 3.2.0#957maxrjones wants to merge 4 commits intozarr-developers:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #957 +/- ##
==========================================
+ Coverage 89.30% 89.35% +0.04%
==========================================
Files 33 33
Lines 2039 2038 -1
==========================================
Hits 1821 1821
+ Misses 218 217 -1
🚀 New features to boost your workflow:
|
|
failures should be fixed upstream by earth-mover/icechunk#1937 |
Note that this is only for Icechunk 2.0. We actually have the same problem for the latest release of IC 1.0 . But do we care about that? |
|
Also can we perhaps release a patch version of VZ first? We have multiple things going on here:
|
I think that any release of Icechunk with a fix for the missing readme would solve our CI problems, as long as we don't pin to <2. |
I'd support merging and releasing #952 before any other changes. fwiw I don't think it's bad to have merged #897 before the patch release - that's a long overdue bug fix. |
That release should come in a sec / by tomorrow.
Agreed. |
TomNicholas
left a comment
There was a problem hiding this comment.
Released, so as long as this passes (particularly on min-deps!) then lets go
| try: | ||
| from zarr.core.metadata.v3 import RegularChunkGridMetadata # zarr-python>3.1.6 | ||
| except ImportError: | ||
| from zarr.core.metadata.v3 import ( | ||
| RegularChunkGrid as RegularChunkGridMetadata, # zarr-python<=3.1.6 | ||
| ) |
There was a problem hiding this comment.
Maybe we should actually look for specific versions of zarr-python instead of the blind try...except?
There was a problem hiding this comment.
Zarr-Python uses hatch-vcs, which builds versions from git tags. If a user installs from a git source that does not have the tags fetched, the version can display as a low number despite being based on the most recent commits to main, which breaks the code with an obscure error message. This try...except leads to informative error messages by describing exactly what is needed rather than implicitly relying on the version.
|
Running the upstream tests shows a breaking change - it seems that zarr now forbids chunks of length 0, which it didn't forbid before? https://github.com/zarr-developers/VirtualiZarr/actions/runs/24685336933/job/72193091799 AFAICT the Zarr spec does not forbid length-0 chunks, so it's zarr-python that is wrong here? https://zarr-specs.readthedocs.io/en/latest/v3/chunk-grids/regular-grid/index.html |
This was discussed in zarr-developers/zarr-python#3802 (comment). We leaned towards this being a mistake in the core spec since modular arithmetic is undefined for 0. Please raise an upstream issue if you still think this should be addressed in zarr-python rather than the spec. |
|
Thanks for the context guys. @sharkinsspatial you wrote this test and the fixture it uses - do you have any concerns with HDF compatibility if I simply change the behaviour of the |
There are some internal changes coming in Zarr-Python that impact VirtualiZarr, which are addressed by this PR.
Acceptance criteria:
docs/releases.md*.mdfile underdocs/api