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

File validation #26

Open
jl-wynen opened this issue Jan 3, 2023 · 4 comments
Open

File validation #26

jl-wynen opened this issue Jan 3, 2023 · 4 comments
Labels
discussion Requires discussion before anything can be implemented

Comments

@jl-wynen
Copy link
Collaborator

jl-wynen commented Jan 3, 2023

Should be simple and fast.
E.g.

  • is valid HDF5
  • is valid NeXus (complicated and there are non-standard files)
  • scan for secrets
  • more?

However, is this even a responsibility of Scitacean or should the server take care of it?

@nitrosx
Copy link
Member

nitrosx commented Jan 4, 2023

Given how variable is the nexus structure, I think that the only thing we can validate is if we can open the file as a hdf5 and nexus.
I'm not sure if that is needed or not and if it provides any value.

Maybe we should provide a basic validation and user can provide a customize validation function that is suited for their use-case?

Another validation that we can do is checking the hash if it is provided.

@jl-wynen
Copy link
Collaborator Author

jl-wynen commented Jan 4, 2023

Maybe we should provide a basic validation and user can provide a customize validation function that is suited for their use-case?

I agree. There are ways to validate NeXus files according to application definitions. But this is very specific to a given application and can't really be done by Scitacean.

Another validation that we can do is checking the hash if it is provided.

This is already implemented. But it is a check for the upload/download, i.e. it checks if the file after upload/download has the same hash as before.

@nitrosx
Copy link
Member

nitrosx commented Jan 4, 2023

If you are OK with it, let's go with a basic validation, aka if we can open the hdf/nexus file and maybe see the first level of keys.

@jl-wynen jl-wynen added the discussion Requires discussion before anything can be implemented label Sep 28, 2023
@jl-wynen
Copy link
Collaborator Author

I am now more inclined to see this as the responsibility of the user, not Scitacean. Checking that a HDF5 file can be opened provides little utility. Especially given the extra complications in Scitacean for supporting this check.

So I would say we close this issue as "won't fix". Users can use tools like https://github.com/scipp/chexus if they want to validate their files. Any objections @nitrosx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Requires discussion before anything can be implemented
Projects
None yet
Development

No branches or pull requests

2 participants