bids-validator
bids-validator copied to clipboard
Refactoring of the BIDS validator
Dear BIDS community,
within the new data sharing inititative for PET, OpenNeuroPET, there is some funding available for improving the BIDS validator. OpenNeuroPET (@CPernet @agt24 @mnoergaard) has been in contact with SquishyMedia (@nellh) who has proposed the attached strategy for refactoring of the BIDS validator in order to make it easier accessile and future proof. We have discussed this with the BIDS maintainer team (@effigies @sappelhoff @Remi-Gau @tsalo @rwblair) and they think it's a good way to move forward.
But BIDS community what do you think?
Oh and in case you wanted to check out OpenNeuroPET, give it a few hours. They are just doing a server update and hence the project site is down too. ;-)
Does anyone have an opinion on this?
@bids-standard/everyone
overall, this sounds great. i suspect validation will continue to be key in keeping things aligned, so an accessible code base where additional validation logic related to values of things (metadata, tsv, etc.,.) can be integrated would be wonderful. @tsalo has done some amazing work to get schema updated, so indeed relying on those components would be crucial for extensibility.
Can someone elaborate on what "declarative and schematic rules" mean? Or maybe point to a place where this schema/rules is being discussed.
At our university we are indeed forking this project to add more specific rules. I'm curious whether the aim of this refactoring is to make these additional rules more easily configurable.
@linusdm
Can someone elaborate on what "declarative and schematic rules" mean
something in the same direction that our "JSON schemas" are going right now, see: https://github.com/bids-standard/bids-validator/tree/master/bids-validator/validators/json/schemas
For example:
https://github.com/bids-standard/bids-validator/blob/13d46d58efb43c227218ff8dcc17e504b00131f8/bids-validator/validators/json/schemas/coordsystem_eeg.json#L4
the IntendedFor field in a coordsystem.json file for the EEG modality must be a string of minimum length 1.
This is language agnostic (many languages have an implementation for JSON schema), and does not "work" on data in any way, it just checks whether a file matches the rules that are declared in the schema.
Or maybe point to a place where this schema/rules is being discussed.
you can check out these issues and PRs: https://github.com/bids-standard/bids-specification/projects/4
I'm curious whether the aim of this refactoring is to make these additional rules more easily configurable.
yes, I think so: You would "just" have to adjust the schema, instead of digging through JS code (or some other language that you may or may not know). The schemas will obviously have their own syntax that one needs to learn, but that'll be much simpler than a full fledged programming language based implementation, or a mixture of both (like now).
This is going on with the BIDS schema.