-
Notifications
You must be signed in to change notification settings - Fork 8
Read zarr v2 NWB files via a dedicated NWBZarrV2IO
#349
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
Open
alejoe91
wants to merge
43
commits into
hdmf-dev:zarr-v3-migration
Choose a base branch
from
alejoe91:nwb-zarr-v2-io
base: zarr-v3-migration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
060d121
Add V2 backward-compatibility to Zarr v3 implementation
alejoe91 d31c9a9
fix ruff
alejoe91 1e5efad
feat: support ZarrV2 in read mode with NWBZarrV2IO
alejoe91 bbbccee
fix: ruff
alejoe91 c05d039
feat: add convert_to_v3 helper function
alejoe91 312eb6e
fix: conflicts
alejoe91 60b51c9
fix: rename v2_backend->backend_v2; docstrings; static methods
alejoe91 0fb9d13
fix: v2 check for remote assets
alejoe91 7cda419
refac: rename v2 files to zarrv2
alejoe91 3498950
refac: rename v2 files to zarrv2 2
alejoe91 6bce5f3
refac: rename v2 files to zarrv2 3
alejoe91 67afc56
docs: convert numpy to sphynx-style
alejoe91 523e9c5
fix: fallback for remote v2 data
alejoe91 f007f28
fix: monkey-patch zarr.Array.__iter__
alejoe91 393cb66
Merge branch 'zarr-v3-migration' into nwb-zarr-v2-io
alejoe91 5e56808
Apply suggestions from code review
alejoe91 c32aa25
suggestions from code review
alejoe91 d0eef2d
fix: zarrv2 renaming in tests
alejoe91 77381ed
fix: remove zarr version dispatc in NWBZarrIO.read_nwb and more docs
alejoe91 0675eb0
test: remove sniffer test
alejoe91 4908eb7
fix: codespell
alejoe91 0c0538f
docs: update streaming example
alejoe91 3743564
test: add nwb zarrv2 test files
alejoe91 0dc34d9
fix: bump up minimal to pynwb 3.0 and fix windows relpath
alejoe91 ed13100
fix: test file and expected json
alejoe91 ae7f535
build: bump up minimal to 3.1.0
alejoe91 f5b5ac9
build: revert minimal to 2.8.3 and regenerate test files
alejoe91 e0e325a
Fix v2 backend docs/naming and add clear error for v2-on-v3 reads
rly 493eda4
Keep the Zarr v2 read-error message within the HDMF layer
rly 4c13a69
Merge branch 'zarr-v3-migration' into nwb-zarr-v2-io
rly 17378f2
Capture the intermittent py3.14 CI deadlock instead of spinning for 6…
rly 56e269e
Revert "Capture the intermittent py3.14 CI deadlock instead of spinni…
rly 9c14265
Document anonymous S3 read behavior in NWBZarrV2IO helpers
rly d32ca77
Fix and harden the Zarr v2 read-error hint on the read_builder path
rly 3c901c9
Apply black formatting to files flagged by the pinned black hook
rly b9f6a4a
Add changelog entry for the zarr Array __iter__ patch
rly 4001cf0
Point the eager-load docstring at the tracking issue #356
rly e7d2111
Document the 1-D assumption in the v2 object-array chunk decode
rly f0c963d
Restore the #348 changelog entry to the released 0.13.0 section
rly 7236877
Clean up ZarrV2IO open fallbacks
rly efc70e5
Clean up tutorial text
rly 3c5bb28
Correct consolidated-metadata and pynwb read references in the S3 tut…
rly 2bf250b
Correct zarr.copy comment and align v2 legacy-version references to 0.14
rly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Test zarr v2 backward compatibility | ||
| on: | ||
| push: | ||
| branches: | ||
| - dev | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| test-v2-backward-compat: | ||
| name: zarr v2 → v3 backward compat | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| # --- Step 1: generate a zarr v2 NWB file with old deps --- | ||
| - name: Create zarr v2 environment | ||
| run: | | ||
| python -m venv /tmp/zarr_v2_env | ||
| /tmp/zarr_v2_env/bin/pip install --upgrade pip | ||
| /tmp/zarr_v2_env/bin/pip install "hdmf-zarr<1.0" "zarr>=2.18,<3" pynwb | ||
|
|
||
| - name: Generate zarr v2 NWB test file | ||
| run: | | ||
| /tmp/zarr_v2_env/bin/python tests/unit/helpers/generate_v2_nwb_zarr.py \ | ||
| --nwb-output-path tests/unit/helpers/v2_test_file.nwb.zarr \ | ||
| --expectations-output-path tests/unit/helpers/v2_expected.json | ||
| echo "--- generated file tree ---" | ||
| find tests/unit/helpers/v2_test_file.nwb.zarr -maxdepth 2 -type d | head -30 | ||
| echo "--- expected metadata ---" | ||
| cat tests/unit/helpers/v2_expected.json | ||
|
|
||
| # --- Step 2: read the v2 file with current code + zarr v3 --- | ||
| - name: Install current hdmf-zarr + zarr v3 | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install -e ".[full]" | ||
| python -m pip install pytest | ||
| python -m pip list | ||
|
|
||
| - name: Run backward compatibility tests | ||
| run: | | ||
| pytest tests/unit/test_v2_backward_compat.py -v | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.