Repository navigation
Preserve HERD tables in archives outside the current directory - #1613
Open
dhairyajangir wants to merge 3 commits into
Open
dhairyajangir wants to merge 3 commits into
dhairyajangir wants to merge 3 commits into
Conversation
Author
|
Could a maintainer authorize the workflows for AI assisted with the validation review and this update. |
Contributor
Workflows are running |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1613 +/- ##
=======================================
Coverage 93.17% 93.17%
=======================================
Files 41 41
Lines 10304 10306 +2
Branches 2132 2133 +1
=======================================
+ Hits 9601 9603 +2
Misses 423 423
Partials 280 280 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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
When
HERD.to_zip()writes outside the working directory, it can include the output directory in each archive member.HERD.from_zip()then fails to locate those tables. The old writer can also replace and remove a neighboring TSV with a table name.Stage the TSVs privately and write canonical names at the archive root. Read members directly from the ZIP. Prefer canonical root names, accept a unique directory-prefixed member from older archives, and reject ambiguous members.
Fixes #1611.
How to test the behavior?
python -m pytest -q tests/unit/common/test_resources.py -k 'zip_in_directory or zip_operations_preserve or legacy_member_paths or ambiguous_legacy or duplicate_root'The five regression cases fail on unchanged
devand pass with the patch. The full unit suite passed 1,896 tests, with 124 skips and one expected failure. A real archive produced by the old writer round-tripped with the same six TSV payloads and member order. Ruff passed.A wheel built from the final published commit passed 616 tests with six skips on HDMF-Zarr
fda82e5using Python 3.14. PyNWBef74c166passed its unit and integration runner (python test.py -p -i -q), with 772 cases and 13 skips. The nested archive also round-tripped through PyNWB's HERD class on that development revision and on PyNWB 4.2.0, preserving the six archive members and an existing neighboring TSV.On current dev
cf6f249, I resolved the changelog conflict and kept the HERD code and tests unchanged. The updated tree passed 1,896 HDMF unit tests. A wheel from this head passed the PyNWB HERD archive round-trip, seven PyNWB resource tests and 33 focused HDMF-Zarr tests.Codex assisted with the investigation, patch, and tests.
Checklist
CHANGELOG.md