Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforms support #32

Closed
wants to merge 2 commits into from
Closed

Transforms support #32

wants to merge 2 commits into from

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Feb 6, 2024

Adding support for ome/ngff#138

Since that PR isn't merged yet, we need custom URL for loading schemas from that branch.

This PR build is deployed at https://deploy-preview-32--ome-ngff-validator.netlify.app - but I don't know of good sample data to test with.

To test a sample file containing various example snippets from the PR above see https://deploy-preview-32--ome-ngff-validator.netlify.app/?source=https://minio-dev.openmicroscopy.org/idr/v0.5/idr0050/4995115.zarr

NB: this is valid according to the proposed schemas, but won't make any sense to a viewer client.

I'm not loading some schemas, such as coordinate_systems_and_transforms.schema and coordinateTransformations.schema. I'm don't see that they are needed by any validation yet, but I've not tried much.
Also the strict schemas aren't used (same as before).

Copy link

netlify bot commented Feb 6, 2024

Deploy Preview for ome-ngff-validator ready!

Name Link
🔨 Latest commit 2408246
🔍 Latest deploy log https://app.netlify.com/sites/ome-ngff-validator/deploys/65c25dd7e7511a00088ef8b0
😎 Deploy Preview https://deploy-preview-32--ome-ngff-validator.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@will-moore
Copy link
Member Author

cc @joshmoore - know any good samples for testing?

@joshmoore
Copy link
Member

@LucaMarconato
Copy link

Thanks @joshmoore for tagging. Unfortunately the datasets linked could be some good starting points (and especially the code to generate variations of them), but they don't agree 100% to the current specs. As discussed here: scverse/spatialdata#35 we wanted to wait until the transformation PR got merged, but unfortunately it didn't happen.

@will-moore
Copy link
Member Author

Testing a bunch of invalid sample files, validation is working but I find the errors can be a bit verbose.
E.g. "affine": [[1, 2, 3, 4], [5, 6, 7, 8, 9], 1],
gives me 21 Errors!

Screenshot 2024-02-07 at 13 07 46

The useful ones are:

{
  "instancePath": "/multiscales/0/coordinateTransformations/0/affine/0",
  "schemaPath": "#/$defs/mtxFlatOrNested/oneOf/0/items/type",
  "keyword": "type",
  "params": {
    "type": "number"
  },
  "message": "must be number"
}
{
  "instancePath": "/multiscales/0/coordinateTransformations/0/affine/2",
  "schemaPath": "#/$defs/mtxFlatOrNested/oneOf/1/items/type",
  "keyword": "type",
  "params": {
    "type": "array"
  },
  "message": "must be array"
}

@will-moore
Copy link
Member Author

I tried adding an invalid arrayCoordinateSystem block (without axes element) but this doesn't fail validation

{
"multiscales": [
      {
          "version": "0.5-dev",
          "name": "example",
          "arrayCoordinateSystem" : {
            "name" : "myDataArray",
            "missing_axes" : []
          },

The schema that contains arrayCoordinateSystem spec is coordinate_systems_and_transforms.schema but that schema isn't referenced by the image.schema or any other schemas that I can see, so I haven't loaded it in this PR.

@joshmoore
Copy link
Member

joshmoore commented Feb 21, 2024

LucaMarconato commented 2 weeks ago
scverse/spatialdata#35 we wanted to wait until the transformation PR got merged...

cc: @bogovicj but I think, @LucaMarconato, that it would now be a good time to tackle this.

@joshmoore joshmoore changed the title V05 support Transforms support May 22, 2024
@joshmoore
Copy link
Member

@will-moore: I've updated the title to be "Transforms supports" rather than v0.5. I leave it up to you whether to change the usages internally or if we just close for the moment.

@will-moore
Copy link
Member Author

I'll close for now, thx

@will-moore will-moore closed this May 22, 2024
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.

None yet

3 participants