bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

inheritance principle fails on physio.json

Open noah10 opened this issue 2 years ago • 2 comments

I have a dataset that includes physio (respiratory) data and eeg data. Per the inheritance principle I put all of the physio.json values that don’t change across subjects/sessions into a physio.json file that is a sibling to the subject directories, and put subject-/session-/task-specific *physio.json files that include the required StartTime parameter (which does vary by subject/session) into the subject/session directories. The validator complains that the top-level physio.json file is missing the required StartTime parameter.

This happened using bids-validator 1.10, both from the bids-validator npm package and https://bids-standard.github.io/bids-validator/ .

Here's the relevant portion of the log output:

bids-validator eeg-physio
[email protected]
	1: [ERR] Invalid JSON file. The file is not formatted according the schema. (code: 55 - JSON_SCHEMA_VALIDATION_ERROR)
		./physio.json
			Evidence:  should have required property 'StartTime'

noah10 avatar Feb 23 '23 14:02 noah10

This definitely seems like a bug where we're directly validating JSON files instead of compiled sidecars. This should be resolved when we transition to the schema validator, but would it be difficult to fix this in the short term?

cc @sappelhoff @rwblair

effigies avatar Feb 23 '23 14:02 effigies