Add Zarr v3 reader - #853
Draft
ehennestad wants to merge 3 commits into
Draft
Conversation
io.spec.writeEmbeddedSpecifications, io.spec.validateEmbeddedSpecifications, and io.spec.readEmbeddedSpecifications were hardcoded to raw HDF5 file IDs (H5G.open, H5L.delete, h5info, H5F.open, H5D.open/read), even though export/read already go through the io.backend.base.Writer/Reader abstraction everywhere else. This blocked any non-HDF5 storage backend (e.g. a Zarr v3 writer) from ever completing nwbExport/nwbRead, since NwbFile.embedSpecifications passed a raw H5-typed writer.FileId into these functions regardless of the actual backend. Adds three methods to the abstract io.backend.base.Writer interface, implemented for HDF5Writer by delegating to the existing HDF5 utility functions it already wraps: - getEmbeddedSpecLocation() (mirrors the existing Reader-side method) - listChildGroupNames(groupPath) - deleteNode(nodePath) writeEmbeddedSpecifications/validateEmbeddedSpecifications now take the writer object itself and only call through this interface. readEmbeddedSpecifications now takes the reader object and is reimplemented using the already-abstract reader.readNodeInfo/ readDatasetValue (no new Reader methods needed). NwbFile.embedSpecifications and nwbRead's generateEmbeddedSpec are updated accordingly. Verified against the full existing HDF5 test suite (517/521 passing; the 4 failures are pre-existing HDF5 dynamic-filter-availability issues on this machine, unrelated to this change) plus manual round-trip checks: fresh export, edit-mode re-export (exercises the namespace-version overwrite path), missing-namespace warning, and unused-namespace deletion. Note: this does not itself add a Zarr v3 writer/reader -- it only removes the H5-specific blocker so a future non-HDF5 backend can implement getEmbeddedSpecLocation/listChildGroupNames/deleteNode on the Writer side (the Reader side already only needs readNodeInfo/readDatasetValue, which every existing Reader implementation already provides) and get full nwbExport/nwbRead support for free. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ehennestad
force-pushed
the
zarr-support/5-zarr3-reader
branch
from
July 10, 2026 05:17
a7c904d to
4d725c0
Compare
ehennestad
force-pushed
the
zarr-support/5-zarr3-reader
branch
from
July 19, 2026 15:26
8681c8f to
f7dc222
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add reader for Zarr v3 files.
Needs: https://github.com/catalystneuro/zarr-matlab
How to test the behavior?
Checklist
fix #XXwhereXXis the issue number?