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

Populate context data

Open rwblair opened this issue 2 years ago • 1 comments

Context objects have a variety of properties referenced in schema rules via selectors/checks. We need functions that produce the these objects organized as outlined in https://github.com/bids-standard/bids-specification/blob/master/src/schema/meta/context.yaml. Some like path and entities are being populated as the contexts are created. The following are not and will need to be serialized from files:

  • [ ] sidecar
  • [ ] associations
  • [ ] columns
  • [x] json
  • [ ] nifti_header

The dataset and subjects properties will be populated when the functions to generate summary data is implemented.

rwblair avatar Jun 28 '22 19:06 rwblair

For associations we'll need to add something like this to the schema: https://github.com/bids-standard/bids-specification/issues/1047#issuecomment-1086654227

Reviewing the associations they only ones directly accessed are expecting json/tsv. But the associated json/tsv can have their own data files that would need to be asserted to exist at some point. (Don't think schema has any rules saying what kinds of metadata files are disallowed without a corresponding data file.)

If we parsed entity/suffix/extension in the initial fileTree load and exposed them through BIDSFileDeno we could load the existing associations and their data in the Context constructor.

rwblair avatar Jul 01 '22 22:07 rwblair

Associations are currently being loaded synchronously on context loading.

rwblair avatar Feb 06 '23 14:02 rwblair