Skip to content

Adds RFC-15: snake_case - #655

Open
normanrz wants to merge 3 commits into
ome:mainfrom
normanrz:t3/rfc-15-snake-case-metadata
Open

normanrz wants to merge 3 commits into
ome:mainfrom
normanrz:t3/rfc-15-snake-case-metadata

Conversation

@normanrz

@normanrz normanrz commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This PR adds an RFC for switching the metadata field names to snake_case (consistently).

cc @DragaDoncila

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Automated Review URLs

@normanrz

normanrz commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Pinging @joshmoore for RFC number.

lubianat
lubianat previously approved these changes Nov 5, 2026

@lubianat lubianat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks well formatted afaik! thank you!

jo-mueller
jo-mueller previously approved these changes Nov 9, 2026

@jo-mueller jo-mueller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@lubianat

lubianat commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

A general comment here is that for new RFCs, we need to wait for Editorial Board (@joshmoore or @vuhlmann) to give an official "ok" before we can merge the PR

Comment thread rfc/15/index.md Resolved
Co-authored-by: Tiago Lubiana <[email protected]>
@normanrz
normanrz dismissed stale reviews from jo-mueller and lubianat via 98fe525 November 9, 2026 16:48
Comment thread rfc/15/index.md Resolved

@DragaDoncila DragaDoncila left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got around to finishing this read-through, apologies for the delay @normanrz.

All good to go on my end, minor tweaks can be ignored. Left one comment about extension-defined type values also not matching the identifier regex but can be addressed in follow-up.

Comment thread rfc/15/index.md
}
```

Zarr codec and extension names follow the same style, e.g. `sharding_indexed`, `index_codecs` and `index_location`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Zarr codec and extension names follow the same style, e.g. `sharding_indexed`, `index_codecs` and `index_location`.
Zarr codec and extension names also follow the same style, e.g. `sharding_indexed`, `index_codecs` and `index_location`.

Comment thread rfc/15/index.md
```

Zarr codec and extension names follow the same style, e.g. `sharding_indexed`, `index_codecs` and `index_location`.
A group's `zarr.json` with OME-Zarr metadata therefore mixes `zarr_format` and `node_type` with `coordinateTransformations` and `coordinateSystems` in the same JSON object tree.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A group's `zarr.json` with OME-Zarr metadata therefore mixes `zarr_format` and `node_type` with `coordinateTransformations` and `coordinateSystems` in the same JSON object tree.
An OME-Zarr file's `zarr.json` therefore mixes Zarr identifiers like `zarr_format` and `node_type` with OME-Zarr identifiers like `coordinateTransformations` and `coordinateSystems` in the same JSON object tree.

Comment thread rfc/15/index.md

### The OME-Zarr metadata is not consistent with itself

Within the OME-Zarr metadata itself, multi-word keys use several styles side by side: `camelCase` (e.g. `coordinateTransformations`), `snake_case` (e.g. `field_count`), run-together lowercase (e.g. `maximumfieldcount`), `kebab-case` (e.g. `label-value`) and dotted names (e.g. `bioformats2raw.layout`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Within the OME-Zarr metadata itself, multi-word keys use several styles side by side: `camelCase` (e.g. `coordinateTransformations`), `snake_case` (e.g. `field_count`), run-together lowercase (e.g. `maximumfieldcount`), `kebab-case` (e.g. `label-value`) and dotted names (e.g. `bioformats2raw.layout`).
Within the OME-Zarr metadata itself, multi-word keys use several styles side-by-side: `camelCase` (e.g. `coordinateTransformations`), `snake_case` (e.g. `field_count`), run-together lowercase (e.g. `maximumfieldcount`), `kebab-case` (e.g. `label-value`) and dotted names (e.g. `bioformats2raw.layout`).

Comment thread rfc/15/index.md

The specification has also moved in both directions.
Version 0.6 renamed the `byDimension` fields `input_axes` and `output_axes` to `inputAxes` and `outputAxes`, to be consistent with the other transformations.
A rule that holds for the whole document, including the Zarr part, would end this kind of churn.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A rule that holds for the whole document, including the Zarr part, would end this kind of churn.
A rule that holds for the whole document, including the Zarr part, together with a pre-1.0 comprehensive renaming, would end this kind of churn.

Comment thread rfc/15/index.md

## Proposal

1. All multi-word keys in the OME-Zarr metadata MUST be written in `snake_case`: lowercase ASCII letters and digits, with words separated by a single underscore, i.e. matching `^[a-z][a-z0-9]*(_[a-z0-9]+)*$`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. All multi-word keys in the OME-Zarr metadata MUST be written in `snake_case`: lowercase ASCII letters and digits, with words separated by a single underscore, i.e. matching `^[a-z][a-z0-9]*(_[a-z0-9]+)*$`.
1. All OME-Zarr metadata multi-word keys under the `ome` key in a `zarr.json` MUST be written in `snake_case`: lowercase ASCII letters and digits, with words separated by a single underscore, i.e. matching `^[a-z][a-z0-9]*(_[a-z0-9]+)*$`.

Comment thread rfc/15/index.md
## Proposal

1. All multi-word keys in the OME-Zarr metadata MUST be written in `snake_case`: lowercase ASCII letters and digits, with words separated by a single underscore, i.e. matching `^[a-z][a-z0-9]*(_[a-z0-9]+)*$`.
2. The same rule applies to identifiers that the specification defines as values of discriminator fields, e.g. transformation `type` values.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excepting extension-defined custom types also right? Maybe worth mentioning that here or under "Not renamed"?

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.

4 participants