-
Notifications
You must be signed in to change notification settings - Fork 41
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
units unit fix #157
units unit fix #157
Conversation
Automated Review URLs |
So just to clarify: we (1) generated invalid (from omero-cli-zarr) and (2) validated invalid datasets, but the spec never said that it was correct, right? I'm trying to get my head around whether or not we need a major warning of any form (and/or be permissive of the plural for this version?!) |
Not sure what you mean by:
Translating the spec into JSON schema (or vice versa) was a manual process, hence error-prone. It's invalid for the "unit" to be a number (instead of a string) but it's not invalid to add a custom "units" value, since JSON schema allows custom keys. I think it's possible to set the schema to dis-allow any custom / unrecognised keys, but I think we've chosen not to do that because we want to allow extensibility or at least temp addition of custom metadata. I'm not sure we need a major warning. The most significant "bug" would be that if you used the "units" schema, then it wouldn't have flagged |
i.e. the typo was never in the spec, but as you say, only in the translation to the validator and omero-cli-zarr.
With permissive I meant more that we would also recognize the plural as valid. (Would be quite the kludge)
For this repo, agreed. But do we have a feeling how many filesets are out there? Can the validator warn about the particular use case of |
My understanding is that the generated datasets are syntactically valid since Despite their validity, the datasets we generated did not represent what was intending as the unit metadata was effectively missing. Additionally, the published schema were incorrectly validating the I feel that supporting both forms is a lot of work and likely overkill esp. without having any idea of the impact (so far only |
Going through v0.4 samples listed at https://idr.github.io/ome-ngff-samples/ these are the ones with "units" that need fixing:
As well as a couple of others that I've created and listed for the https://will-moore.github.io/ome-ngff-tools/ |
I've manually fixed "units" -> "unit" in the 'done' samples above, with e.g.:
but this isn't going to scale well for those 2 plates. |
Thanks for looking into this! FYI, we just ran into |
@fm3 Thanks for picking that up. Fixed |
To fix units -> unit in plate... Download just the .zattrs locally...
Replaced all "units" with "unit" (1724 occurrences across 862 files) Tried to re-upload with aws but no joy (dont' have
Instead, copied to where I do have
And then from there uploaded as before...
|
Repeated with plate: idr0072B/9512.zarr: 2880 occurrences replaced in 1440 files.
etc. Tested that all wells and images in plate are valid. |
@joshmoore All samples above are fixed "units" -> "unit" now. |
Any outstanding fixes required here? |
@joshmoore - Good to get this fix in? - since this fixes an existing bug with the live schemas. |
units unit fix SHA: 5600401 Reason: push, by @joshmoore Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #156