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

validation of bids zarr did not catch name mismatch in pair of json and ome.zarr #1324

Open
satra opened this issue Sep 8, 2023 · 2 comments
Assignees

Comments

@satra
Copy link
Member

satra commented Sep 8, 2023

as can be seen in this image there is an isolated ome zarr file that had a bad name. the corresponding json file was ok.

image

while this is being fixed in the dandiset, it brought up the notion that i think the minimal bids validator may not be checking if there are matching pairs of json and ome.zarr files and probably could be added.

@yarikoptic
Copy link
Member

Python bids-validator we use is indeed too rudimentary. Currently it only checks individual file paths for being kosher. I am not sure if "Python reimplementation of full fledged bids-validator" would ever materialize. May be smth like bids-standard/bids-validator#1387 would be the solution. Somewhat more recent discussion is in bids-standard/bids-2-devel#41 (comment) . @effigies do you know of any other issue/long term plan/goal for seeing Python based bids-validator?

@effigies
Copy link

effigies commented Sep 8, 2023

I have a vague goal of eventually fleshing out the Python validator, but it is not on a roadmap or even a backlog. To the extent that we want to do it, I think the highest-order benefits would be in validating the schema itself and providing a reference implementation of inheritance.

IMO having a second implementation of many of the rules will have limited utility, so I would really chip away at it based on concrete needs like this.

For checking datafile/sidecar pairings, I believe the JS approach is to construct all of the sidecar views according to the inheritance principle, marking each JSON file as "read" in the process. If at the end, there are any unread JSON files, a warning could be raised. For the reverse problem, running the checks in rules.sidecars would do the trick, as long as there is one required metadata field.

All that said, I would have expected the path above to be flagged by the current schema validator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

4 participants