fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Write version in plate attributes #676

Closed jluethi closed 2 months ago

jluethi commented 3 months ago

Our current converters are not writing a version in the plate .zattrs. Not sure why our validation still passes with this, but the spec specifies:

The plate dictionary MUST contain a version key whose value MUST be a string specifying the version of the plate specification.

https://ngff.openmicroscopy.org/latest/index.html#plate-md

tcompa commented 3 months ago

Not sure why our validation still passes with this,

I guess it's because version is not marked as required in the NGFF JSON Schemas (https://github.com/ome/ngff/blob/main/0.4/schemas/plate.schema#L135-L137):

      "required": [
        "columns", "rows", "wells"
      ]
jluethi commented 3 months ago

Ah, I now realised: The 0.4 spec says it SHOULD contain a version key. Only the current latest 0.5-dev is switching this to MUST.

In any case, I think it's a really good idea that it does contain one! I'll be adding it in the 1.0 refactor now

jluethi commented 2 months ago

This was implemented in https://github.com/fractal-analytics-platform/fractal-tasks-core/pull/671 We now always write the version. But our NGFF validator still has it as Optional, as it's not required in 0.4.