Skip to content

Use BIDS schema to "drive" pybids #818

Open
@yarikoptic

Description

@yarikoptic

#807 inspired me to search here to find no issue which would suggest to incorporate reading/using BIDS schema to avoid hardcoding bids assumptions in python code within pybids.

My current greedy desire is to avoid reinventing the wheel of parsing/changing BIDS filenames (fresh hits nipy/heudiconv#544, https://github.com/physiopy/phys2bids/pull/374/files) so they remain BIDS-compliant. The only 'scaleable' etc way I see is to use official BIDS schema, which is actively developed (effort lead by @tsalo), and now released as part of the 1.7.0 BIDS release.

I do appreciate the fact that the "schema" of the BIDS schema is itself influx and could change while breaking the code to read it (submitted bids-standard/bids-specification#1013 to at least possibly reduce the "surprise"). But I think it would be valuable to start work in pybids to use "official" schema, even if not dataset_description.json BIDSVersion specific one, but some "trusted/tested" version of it (1.7.0 is a good one -- has microscopy for #807 ;))

I have just populated https://github.com/bids-standard/bids-schema with a recent release (1.7.0) of BIDS schema, so it could be either included as a submodule to pybids or just used as an external resource to download etc to get access to multiple BIDS versions.

WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions