ome / ome/ngff

Disallow mismatching axes units and types

Open
#91 3 comments 2 reactions 0 assignees View on GitHub

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:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.