bids-standard / BEP028_BIDSprov

Organizing and coordinating BIDS extension proposal 28 : BIDS Provenance
https://bids.neuroimaging.io/bep028
Creative Commons Attribution 4.0 International
3 stars 13 forks source link

validator module #2

Open remiadon opened 4 years ago

remiadon commented 4 years ago

One thing we might want to do at some point in providing a provenance framework is providing a validator for it If an institution or a user creates prov files, we should provide them a program to check the validity of those files within the framework

This program should :

In other words running this program acts as a sanity check.


For warnings and errors, a way would be to use the python logging module, but that looks a bit tedious for that. For a V1 I think we can use the warnings module, and raise a warning if anything looks non-valid, and just return False in any other situation

cmaumet commented 4 years ago

@remiadon: +1 for the validator.

Because the model will be BIDS-compatible, it would be useful to build of the BIDS validator: https://github.com/bids-standard/bids-validator

For a demo see here: https://bids-standard.github.io/bids-validator/

The BIDS validator is very consistent in spirit with what you described except that it takes a BIDS folder as input (and not only the json file).

remiadon commented 4 years ago

@cmaumet I'm not sure to understand. Should we make PRs to the repo you mentionned or provide something in the same spirit ?

cmaumet commented 4 years ago

Once we'll have the spec ready, it will be a PR to the repo.

remiadon commented 4 years ago

EDIT : pySHACL seems to be a good place to start

cmaumet commented 4 years ago

Yes for RDF validation.

cmaumet commented 4 years ago

@remiadon: I beleive this issue should be removed from "sprint 2", are you fine with that?

remiadon commented 4 years ago

@cmaumet yep I'll save this for later

cmaumet commented 4 years ago

Great! Can you update https://github.com/Inria-Visages/BIDS-prov/projects/1 accordingly?

remiadon commented 4 years ago

Like discussed we will use a shacl file later in the project to tackle this.

cmaumet commented 4 years ago

Yes and this will have to live in the BIDS validator. I would say let's leave it aside for now as we focus on the spec and the examples.

remiadon commented 3 years ago

edit : a CI script to check parsing from SPM is required in #50

A validator module would be awesome so that CI does the following: