Repository navigation
fix(reader): fail loud on malformed metadata; read duplicate listings once - #48
Open
hongquanli wants to merge 2 commits into
Open
hongquanli wants to merge 2 commits into
hongquanli wants to merge 2 commits into
Conversation
… once Deferred minors from the #42 review, each with a test: - axes that normalise to the same name (e.g. two "y" space axes) raise OmeZarrError instead of producing an array with duplicate dims; - a _squid block that is not an object raises OmeZarrError, not AttributeError; - a scale vector whose length does not match the axes is pinned by a test (already raised); - well field ids accept ASCII digits only (str.isdigit also accepts other scripts); "01" and "1" name the same field and the second listing is ignored with a warning, as is a well listed twice in a plate; - a negative rowIndex/columnIndex raises instead of indexing from the end; - a region folder holding both fov_<n>.ome.zarr stores and acquisition.zarr is refused as ambiguous; - a root whose zarr.json exists but cannot be read is an error, not an "unknown" layout (the legacy walk would otherwise open the arrays beneath it without their metadata); - tests that the absent-entry warning is one record for several wells, also under an experiment folder, and that a file in place of a well directory is skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review of this PR: the dedupe keyed on the derived field number, so two
distinct paths that map to the same number lost an image ("1" and "foo" at
position 1; "1" and "01", which are distinct valid paths under the spec).
Reproduced through LightweightViewer: two fields [101, 222] displayed as
one. Dedupe now keys on the listed path; the display id is the path when it
is a plain number, else the position, and a colliding id moves to the next
free number so every image keeps a distinct id.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
The minors deferred from the #42 review of the OME-Zarr 0.5 reader, each with a test:
yspace axes) raiseOmeZarrErrorinstead of producing an array with duplicate dims_squidblock that is not an object raisesOmeZarrError, notAttributeErrorstr.isdigitalso accepts other scripts);01and1name the same field and the second listing is ignored with a warning, as is a well listed twice in a platerowIndex/columnIndexraises instead of indexing from the endfov_<n>.ome.zarrstores andacquisition.zarris refused as ambiguouszarr.jsonexists but cannot be read is an error, not an "unknown" layout (the legacy walk would otherwise open the arrays beneath it without their metadata)Full suite: 327 passed, 3 skipped on PyQt5 and PyQt6 (ndv 0.5.0, offscreen).
🤖 Generated with Claude Code