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

validator module #2

Open
remiadon opened this issue Mar 6, 2020 · 11 comments
Open

validator module #2

remiadon opened this issue Mar 6, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@remiadon
Copy link
Contributor

remiadon commented Mar 6, 2020

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 :

  • take *.json files as input
  • return a boolean value at the very end
  • raise warnings and errors along the way to enlighten the user about ways to fix those issues, in a clear and understandable manner.

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

@remiadon remiadon added the enhancement New feature or request label Mar 6, 2020
@cmaumet
Copy link
Collaborator

cmaumet commented Mar 9, 2020

@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
Copy link
Contributor Author

remiadon commented Mar 9, 2020

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

@cmaumet
Copy link
Collaborator

cmaumet commented Mar 9, 2020

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

@remiadon
Copy link
Contributor Author

EDIT : pySHACL seems to be a good place to start

@cmaumet
Copy link
Collaborator

cmaumet commented Mar 19, 2020

Yes for RDF validation.

@cmaumet
Copy link
Collaborator

cmaumet commented Mar 19, 2020

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

@remiadon
Copy link
Contributor Author

@cmaumet yep I'll save this for later

@cmaumet
Copy link
Collaborator

cmaumet commented Mar 19, 2020

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

@remiadon
Copy link
Contributor Author

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

@cmaumet
Copy link
Collaborator

cmaumet commented Mar 24, 2020

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
Copy link
Contributor Author

remiadon commented Feb 4, 2021

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:

  • parse .m files given the new spm parser
  • pass the result into this validator module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants