Skip to content

Fix OME channel labels for numeric coordinates#5

Draft
stanbot8 wants to merge 1 commit into
mainfrom
staging/1136-omero-channel-labels
Draft

Fix OME channel labels for numeric coordinates#5
stanbot8 wants to merge 1 commit into
mainfrom
staging/1136-omero-channel-labels

Conversation

@stanbot8

@stanbot8 stanbot8 commented Jul 24, 2026

Copy link
Copy Markdown
Owner

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.py

pytest tests/io/test_metadata.py -q

pytest --cov --color=no -n auto --dist worksteal -q

All commands pass. The full suite reports 1366 passed, 7 skipped, and 1 expected failure.

@stanbot8
stanbot8 force-pushed the staging/1136-omero-channel-labels branch from 847a708 to 0257c80 Compare July 24, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant