Skip to content

Fix required OMERO channel fields in the 0.6 schema - #225

Open
vboussot wants to merge 2 commits into
ome:0.6patch1from
vboussot:codex/fix-0.6-omero-required-fields
Open

vboussot wants to merge 2 commits into
ome:0.6patch1from
vboussot:codex/fix-0.6-omero-required-fields

Conversation

@vboussot

Copy link
Copy Markdown
Contributor

The 0.6 specification requires every object in omero.channels to contain both color and window, but image.schema currently accepts channels missing either field. Add the missing channel-level required list so validation matches the released specification.

This targets 0.6patch1, following the direction agreed in ome/ngff#675 (comment) and ome/ngff#430 (comment). The specification text is unchanged. The relaxed OMERO requirements introduced by #87 on 0.9dev are unaffected; this PR only addresses the 0.6 part of ome/ngff#430.

Regression tests reuse the existing valid two-channel OMERO fixture and exercise both generic and strict validation. They cover missing color, missing window, and both fields missing in either channel, with unmodified metadata as positive controls.

Validation: uv run --no-project --with pytest --with jsonschema python -m pytest tests -q — 161 passed, 2 skipped. The 12 missing-field cases fail against the original schema and pass with this correction. Schema documentation generation also succeeds.

Metadata with OMERO channels missing either field will now fail schema validation, as required by the published 0.6 specification.

Refs ome/ngff#430; follows up on ome/ngff#675.

@github-actions

Copy link
Copy Markdown

Automated Review URLs

@jo-mueller

Copy link
Copy Markdown
Contributor

Looks good in general, but I would prefer the test case to come in the form of an example of invalid metadata under the invalid folder to be in line with how the other tests operate.

Replace the parametrized test with two examples under
tests/attributes/spec/invalid/image, one without color and one
without window, like the other attribute tests.

This branch has not been deployed

No deployments
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.

2 participants