Fix OME channel labels for numeric coordinates#5
Draft
stanbot8 wants to merge 1 commit into
Draft
Conversation
stanbot8
force-pushed
the
staging/1136-omero-channel-labels
branch
from
July 24, 2026 22:11
847a708 to
0257c80
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.
Preview. Text in square brackets becomes links in the submission.
Change
The [OME-NGFF 0.5 channel model] requires each channel label to be a string. SpatialData wrote numeric channel coordinates without conversion. This produced the invalid metadata reported in [issue 1136].
This change writes OME channel labels as strings. It stores the SpatialData channel coordinates separately. This preserves integer coordinates and numeric-looking string coordinates without a type guess. It publishes both metadata representations with 1 atomic attribute update. Old stores continue to use their OME labels.
Commands
uvx pre-commit run --files src/spatialdata/_io/_utils.py src/spatialdata/_io/io_raster.py tests/io/test_metadata.pypytest tests/io/test_metadata.py -qpytest --cov --color=no -n auto --dist worksteal -qAll commands pass. The full suite reports 1366 passed, 7 skipped, and 1 expected failure.