feat: check for "units" field#76
Conversation
# Why? The "unit" field is optional, so it is not validated. This checks if the "units" field is used, which is almost certainly a mistake. Noted on IDR/ome-ngff-samples#36 in a sample. This may be happening silently to other data out there.
✅ Deploy Preview for ome-ngff-validator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Closes ome#52 Change unit checks ("SHOULD") to warnings.
will-moore
left a comment
There was a problem hiding this comment.
I was thinking myself that this could be a useful check to add. 👍
However, I realised in checking v0.6dev4 data that we miss all the axes checks because it's only looking for multiscale.axes above at const { axes, datasets } = multiscale;
If there's no axes there, then we should check at least the first coordinateSystem axes. E.g. axes = multiscale.coordinateSystems?.[0]?.axes.
co-authored by Claude Fable 5, reviewed/edited line by line
|
added the checks @will-moore ; for disclosure: I used the brand new Fable 5 model for support, but reviewed/edited line by line. It does look like it did a fine job. I am still to get a 0.6dev4 dataset and try out |
|
Code looks good. You could consider adding an invalid example to this repo, to test the error display. |
Why?
The "unit" field is optional, so it is not validated.
This checks if the "units" field is used, which is almost certainly a mistake.
Noted on IDR/ome-ngff-samples#36 in a sample. This may be happening silently to other data out there.
tested locally with
and for