Disallow mismatching axes units and types
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 171
- Forks
- 75
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 20
Description
See discussion at https://github.com/ome/ngff/pull/87#discussion_r797433723
Units were introduced in https://github.com/ome/ngff/pull/57 at a SHOULD level of requirement, primarily for extensibility reasons as well as support for axes with arbitrary units. A large part of the discussion about units revolved about the unit validation and the usage of udunits2 as current reference library.
The following axes dictionary is valid according with the current draft version of the specification but is not recommended as the unit is not part of the subset of recommended time units:
{
"name": "t",
"type": "time",
"unit": "micrometer"
}
My opinion is that this (potentially corner) case this should be flagged as invalid by the specification.
Using the current specification, I see two immediate ways to enforce this constraint:
- either tighten the constraints around the units available for the
spaceandtimeaxes types i.e. rewrite https://github.com/ome/ngff/blob/18fc37b23cf536d5accacf9a166c8ade7fda2ad8/latest/index.bs#L228-L230 to express that if a unit for thespaceortimetype is specified, it MUST be part of the specified subset - or add another constraint expressing the relationship between valid udunits and the axes type i.e. disallow a valid
timeunit to be associated with aspaceaxis (and inversely)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion linked from PR 87 and review how units were introduced in PR 57. Then inspect the referenced latest/index.bs lines 228-230 and compare the two proposed constraint approaches. Done means the specification explicitly disallows mismatching axes units and types.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100