datahipy.bids.version module

Utility functions to retrieve version related information from a BIDS dataset.

datahipy.bids.version.create_bids_changes_tag_entry(tag, changes_list)[source]

Create a release text block entry to be added to the CHANGES file of a BIDS dataset.

Parameters

tagstr

Tag of the dataset.

changes_listlist

List of changes to add to the CHANGES file.

Returns

list

List of lines to be written to the CHANGES file.

datahipy.bids.version.determine_bids_schema_version(dataset_desc)[source]

Determine the BIDS schema version of the BIDS dataset against which it will be validated.

Parameters

dataset_descdict

Content of the dataset_description.json file.

Returns

bids_schema_versionstr

BIDS schema version against which the BIDS dataset will be validated.

datahipy.bids.version.manage_bids_dataset_with_datalad(bids_dir)[source]

Create a Datalad dataset out of an existing BIDS dataset not Datalad-managed yet.

datahipy.bids.version.update_bids_changes(bids_dir, changes_tag_entry)[source]

Append a new release text block to the top to the CHANGES file of a BIDS dataset.

Parameters

bids_dirstr

Path to the BIDS dataset.

tagstr

Tag of the dataset.

changes_tag_entrylist

List of lines to be written to the CHANGES file.