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

Allow validating local datasets #33

Open
dstansby opened this issue Mar 25, 2024 · 9 comments
Open

Allow validating local datasets #33

dstansby opened this issue Mar 25, 2024 · 9 comments

Comments

@dstansby
Copy link

I just tried validating a local file, and the tool didn't seem to work - the link I used was https://ome.github.io/ome-ngff-validator/?source=file:///Users/dstansby/notebooks/ct-scans/david_ct_scan.zarr, and the directory definitely exists. The error message is:

Error Loading file:///Users/dstansby/notebooks/ct-scans/david_ct_scan.zarr/.zattrs: TypeError: NetworkError when attempting to fetch resource.
@will-moore
Copy link
Member

The easiest solution is to use ome-zarr-py:

$ ome_zarr view path/to/ct-scans/david_ct_scan.zarr

That will serve the zarr locally and automatically open it in ome-ngff-validator.

See https://ome-zarr.readthedocs.io/en/stable/cli.html#view
It actually looks best if you don't add the trailing slash as above (not like in the docs)

@tlambert03
Copy link

was trying to follow this, pointing to a file in the current directory:

ome_zarr view my_stream.zarr

and got this:
Image

haven't looked at the ome_zarr view source yet... but does that suggest an error in the serving of the file? or an error in the ome zarr

@tlambert03
Copy link

ah, maybe it's a CORS issue:

Fetch API cannot load http://localhost:8000/my_stream.zarr/zarr.json due to access control checks.

@tlambert03
Copy link

got farther with chrome..., was previously on safari Version 18.3 (20620.2.4.11.5)

@tlambert03
Copy link

I guess going back to the original post here. I would +1 the request for a command line tool that just lets me ome-validate some_uri. something that could be run on github actions for example when testing writers?

@dstansby
Copy link
Author

dstansby commented Feb 6, 2025

If you're in Python, ome-zarr-models can do validation on local datasets, but not with a command line tool.

@tlambert03
Copy link

thanks @dstansby !

@will-moore
Copy link
Member

@tlambert03 Re: "got farther with chrome" - did you get the validator working?

@dstansby any plan to add command like tool to ome-zarr-models-py?

@dstansby
Copy link
Author

dstansby commented Feb 6, 2025

No plans yet, but I think we would definitely welcome a feature request for a command line validator 👍

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

No branches or pull requests

3 participants