Skip to content

Allow downstream programs to supply additional rules #13

Open
@effigies

Description

@effigies

PyBIDS uses the bids_validator Python library to filter files by default. It is not currently possible to augment this with additional rules to allow certain (pre-standard) new files without disabling the filter entirely.

Given that the current API is an object that each caller is likely to instantiate independently, some kind of configuration that would permit each new construction to incorporate the additional rules would be useful.

For example:

>>> import bids_validator
>>> validator = bids_validator.BIDSValidator()
>>> validator.is_bids('/models/model-001_smdl.json')
False

>>> bids_validator.add_rules('statsmodels', 'path/to/statsmodels.json')
>>> 
>>> validator = bids_validator.BIDSValidator()
>>> validator.is_bids('/models/model-001_smdl.json')
True

cc @tyarkoni

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions