From d584f4def906e1ed956b740e8f5f54874fd0d728 Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Thu, 4 Aug 2022 16:08:41 -0400 Subject: [PATCH 1/6] Let's see how this goes --- dandi/support/bids/__init__.py | 0 dandi/support/bids/schema.py | 153 - .../schemadata/1.7.0+012+dandi001/README.md | 500 --- .../objects/associated_data.yaml | 29 - .../1.7.0+012+dandi001/objects/columns.yaml | 562 --- .../1.7.0+012+dandi001/objects/datatypes.yaml | 44 - .../1.7.0+012+dandi001/objects/entities.yaml | 366 -- .../1.7.0+012+dandi001/objects/metadata.yaml | 2994 --------------- .../objects/modalities.yaml | 30 - .../1.7.0+012+dandi001/objects/suffixes.yaml | 654 ---- .../objects/top_level_files.yaml | 110 - .../rules/associated_data.yaml | 11 - .../rules/datatypes/anat.yaml | 183 - .../rules/datatypes/beh.yaml | 29 - .../rules/datatypes/dwi.yaml | 48 - .../rules/datatypes/eeg.yaml | 87 - .../rules/datatypes/fmap.yaml | 129 - .../rules/datatypes/func.yaml | 73 - .../rules/datatypes/ieeg.yaml | 88 - .../rules/datatypes/meg.yaml | 141 - .../rules/datatypes/micr.yaml | 48 - .../rules/datatypes/perf.yaml | 58 - .../rules/datatypes/pet.yaml | 60 - .../1.7.0+012+dandi001/rules/entities.yaml | 31 - .../1.7.0+012+dandi001/rules/modalities.yaml | 27 - .../rules/tabular_metadata.yaml | 20 - .../rules/top_level_files.yaml | 31 - .../bids/schemadata/1.7.0+369/README.md | 519 --- .../bids/schemadata/1.7.0+369/SCHEMA_VERSION | 1 - .../schemadata/1.7.0+369/meta/context.yaml | 262 -- .../1.7.0+369/objects/associated_data.yaml | 29 - .../schemadata/1.7.0+369/objects/columns.yaml | 680 ---- .../1.7.0+369/objects/datatypes.yaml | 55 - .../1.7.0+369/objects/entities.yaml | 367 -- .../1.7.0+369/objects/extensions.yaml | 299 -- .../schemadata/1.7.0+369/objects/formats.yaml | 124 - .../1.7.0+369/objects/metadata.yaml | 3332 ----------------- .../1.7.0+369/objects/modalities.yaml | 30 - .../1.7.0+369/objects/suffixes.yaml | 752 ---- .../1.7.0+369/objects/top_level_files.yaml | 128 - .../1.7.0+369/rules/associated_data.yaml | 11 - .../1.7.0+369/rules/checks/asl.yaml | 279 -- .../1.7.0+369/rules/checks/dwi.yaml | 61 - .../1.7.0+369/rules/checks/events.yaml | 16 - .../1.7.0+369/rules/checks/fmap.yaml | 26 - .../1.7.0+369/rules/checks/func.yaml | 16 - .../rules/common_derivatives_validation.yaml | 18 - .../1.7.0+369/rules/dataset_metadata.yaml | 67 - .../1.7.0+369/rules/datatypes/anat.yaml | 201 - .../1.7.0+369/rules/datatypes/beh.yaml | 34 - .../derivatives/common_derivatives.yaml | 413 -- .../common_imaging_derivatives.yaml | 220 -- .../1.7.0+369/rules/datatypes/dwi.yaml | 57 - .../1.7.0+369/rules/datatypes/eeg.yaml | 109 - .../1.7.0+369/rules/datatypes/fmap.yaml | 143 - .../1.7.0+369/rules/datatypes/func.yaml | 81 - .../1.7.0+369/rules/datatypes/ieeg.yaml | 108 - .../1.7.0+369/rules/datatypes/meg.yaml | 163 - .../1.7.0+369/rules/datatypes/micr.yaml | 52 - .../1.7.0+369/rules/datatypes/perf.yaml | 66 - .../1.7.0+369/rules/datatypes/pet.yaml | 68 - .../schemadata/1.7.0+369/rules/entities.yaml | 31 - .../1.7.0+369/rules/modalities.yaml | 27 - .../1.7.0+369/rules/sidecars/anat.yaml | 34 - .../1.7.0+369/rules/sidecars/asl.yaml | 285 -- .../1.7.0+369/rules/sidecars/beh.yaml | 21 - .../1.7.0+369/rules/sidecars/continuous.yaml | 26 - .../derivatives/common_derivatives.yaml | 85 - .../1.7.0+369/rules/sidecars/dwi.yaml | 25 - .../1.7.0+369/rules/sidecars/eeg.yaml | 166 - .../1.7.0+369/rules/sidecars/entities.yaml | 81 - .../1.7.0+369/rules/sidecars/fmap.yaml | 87 - .../1.7.0+369/rules/sidecars/func.yaml | 110 - .../1.7.0+369/rules/sidecars/ieeg.yaml | 144 - .../1.7.0+369/rules/sidecars/meg.yaml | 261 -- .../1.7.0+369/rules/sidecars/micr.yaml | 79 - .../1.7.0+369/rules/sidecars/mri.yaml | 263 -- .../1.7.0+369/rules/sidecars/pet.yaml | 183 - .../derivatives/common_derivatives.yaml | 11 - .../1.7.0+369/rules/tabular_data/eeg.yaml | 43 - .../1.7.0+369/rules/tabular_data/ieeg.yaml | 49 - .../1.7.0+369/rules/tabular_data/meg.yaml | 23 - .../1.7.0+369/rules/tabular_data/perf.yaml | 8 - .../1.7.0+369/rules/tabular_data/pet.yaml | 52 - .../1.7.0+369/rules/tabular_data/physio.yaml | 9 - .../1.7.0+369/rules/tabular_data/task.yaml | 15 - .../1.7.0+369/rules/tabular_metadata.yaml | 18 - .../1.7.0+369/rules/top_level_files.yaml | 34 - dandi/support/bids/utils.py | 196 - dandi/support/bids/validator.py | 820 ---- dandi/tests/test_bids_validator_xs.py | 371 -- dandi/validate.py | 2 +- 92 files changed, 1 insertion(+), 18851 deletions(-) delete mode 100644 dandi/support/bids/__init__.py delete mode 100644 dandi/support/bids/schema.py delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/README.md delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/associated_data.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/columns.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/datatypes.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/entities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/metadata.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/modalities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/suffixes.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/objects/top_level_files.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/associated_data.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/anat.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/beh.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/dwi.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/eeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/fmap.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/func.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/ieeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/meg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/micr.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/perf.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/datatypes/pet.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/entities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/modalities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/tabular_metadata.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+012+dandi001/rules/top_level_files.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/README.md delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/SCHEMA_VERSION delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/meta/context.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/associated_data.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/columns.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/datatypes.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/entities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/extensions.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/formats.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/metadata.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/modalities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/suffixes.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/objects/top_level_files.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/associated_data.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/checks/asl.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/checks/dwi.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/checks/events.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/checks/fmap.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/checks/func.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/common_derivatives_validation.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/dataset_metadata.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/anat.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/beh.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/derivatives/common_derivatives.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/derivatives/common_imaging_derivatives.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/dwi.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/eeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/fmap.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/func.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/ieeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/meg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/micr.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/perf.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/datatypes/pet.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/entities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/modalities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/anat.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/asl.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/beh.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/continuous.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/derivatives/common_derivatives.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/dwi.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/eeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/entities.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/fmap.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/func.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/ieeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/meg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/micr.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/mri.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/sidecars/pet.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/derivatives/common_derivatives.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/eeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/ieeg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/meg.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/perf.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/pet.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/physio.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_data/task.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/tabular_metadata.yaml delete mode 100644 dandi/support/bids/schemadata/1.7.0+369/rules/top_level_files.yaml delete mode 100644 dandi/support/bids/utils.py delete mode 100644 dandi/support/bids/validator.py delete mode 100644 dandi/tests/test_bids_validator_xs.py diff --git a/dandi/support/bids/__init__.py b/dandi/support/bids/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/dandi/support/bids/schema.py b/dandi/support/bids/schema.py deleted file mode 100644 index 2865d00bd..000000000 --- a/dandi/support/bids/schema.py +++ /dev/null @@ -1,153 +0,0 @@ -""" -THIS MODULE IS BUNDLED FROM THE bids-specification PACKAGE. -Schema loading- and processing-related functions. -""" -from copy import deepcopy -import logging -import os -from pathlib import Path - -from ruamel import yaml - -from . import utils - -lgr = utils.get_logger() -# Basic settings for output, for now just basic -utils.set_logger_level(lgr, os.environ.get("BIDS_SCHEMA_LOG_LEVEL", logging.INFO)) -logging.basicConfig(format="%(asctime)-15s [%(levelname)8s] %(message)s") - - -def _get_entry_name(path): - if path.suffix == ".yaml": - return path.name[:-5] # no .yaml - else: - return path.name - - -def dereference_yaml(schema, struct): - """Recursively search a dictionary-like object for $ref keys. - - Each $ref key is replaced with the contents of the referenced field in the overall - dictionary-like object. - """ - if isinstance(struct, dict): - if "$ref" in struct: - ref_field = struct["$ref"] - template = schema[ref_field] - struct.pop("$ref") - # Result is template object with local overrides - struct = {**template, **struct} - - struct = {key: dereference_yaml(schema, val) for key, val in struct.items()} - - elif isinstance(struct, list): - struct = [dereference_yaml(schema, item) for item in struct] - - return struct - - -def load_schema(schema_path): - """Load the schema into a dictionary. - - This function allows the schema, like BIDS itself, to be specified in - a hierarchy of directories and files. - File names (minus extensions) and directory names become keys - in the associative array (dict) of entries composed from content - of files and entire directories. - - Parameters - ---------- - schema_path : str - Folder containing yaml files or yaml file. - - Returns - ------- - dict - Schema in dictionary form. - """ - _yaml = yaml.YAML(typ="safe", pure=True) - - schema_path = Path(schema_path) - objects_dir = schema_path / "objects/" - rules_dir = schema_path / "rules/" - - if not objects_dir.is_dir() or not rules_dir.is_dir(): - raise ValueError( - f"Schema path or paths do not exist:\n\t{str(objects_dir)}\n\t{str(rules_dir)}" - ) - - schema = {} - schema["objects"] = {} - schema["rules"] = {} - - # Load object definitions. All are present in single files. - for object_group_file in sorted(objects_dir.glob("*.yaml")): - lgr.debug(f"Loading {object_group_file.stem} objects.") - dict_ = _yaml.load(object_group_file.read_text()) - schema["objects"][object_group_file.stem] = dereference_yaml(dict_, dict_) - - # Grab single-file rule groups - for rule_group_file in sorted(rules_dir.glob("*.yaml")): - lgr.debug(f"Loading {rule_group_file.stem} rules.") - dict_ = _yaml.load(rule_group_file.read_text()) - schema["rules"][rule_group_file.stem] = dereference_yaml(dict_, dict_) - - # Load folders of rule subgroups. - for rule_group_file in sorted(rules_dir.glob("*/*.yaml")): - rule = schema["rules"].setdefault(rule_group_file.parent.name, {}) - lgr.debug(f"Loading {rule_group_file.stem} rules.") - dict_ = _yaml.load(rule_group_file.read_text()) - rule[rule_group_file.stem] = dereference_yaml(dict_, dict_) - - return schema - - -def filter_schema(schema, **kwargs): - """Filter the schema based on a set of keyword arguments. - - Parameters - ---------- - schema : dict - The schema object, which is a dictionary with nested dictionaries and - lists stored within it. - kwargs : dict - Keyword arguments used to filter the schema. - Example kwargs that may be used include: "suffixes", "datatypes", - "extensions". - - Returns - ------- - new_schema : dict - The filtered version of the schema. - - Notes - ----- - This function calls itself recursively, in order to apply filters at - arbitrary depth. - - Warning - ------- - This function employs a *very* simple filter. It is very limited. - """ - new_schema = deepcopy(schema) - if isinstance(new_schema, dict): - # Reduce values in dict to only requested - for k, v in kwargs.items(): - if k in new_schema.keys(): - filtered_item = deepcopy(new_schema[k]) - if isinstance(filtered_item, dict): - filtered_item = { - k1: v1 for k1, v1 in filtered_item.items() if k1 in v - } - else: - filtered_item = [i for i in filtered_item if i in v] - new_schema[k] = filtered_item - - for k2, v2 in new_schema.items(): - new_schema[k2] = filter_schema(new_schema[k2], **kwargs) - - elif isinstance(new_schema, list): - for i, item in enumerate(new_schema): - if isinstance(item, dict): - new_schema[i] = filter_schema(item, **kwargs) - return new_schema diff --git a/dandi/support/bids/schemadata/1.7.0+012+dandi001/README.md b/dandi/support/bids/schemadata/1.7.0+012+dandi001/README.md deleted file mode 100644 index c3d142cba..000000000 --- a/dandi/support/bids/schemadata/1.7.0+012+dandi001/README.md +++ /dev/null @@ -1,500 +0,0 @@ -# BIDS-schema - -Portions of the BIDS specification are defined using YAML files, in order to -make the specification machine-readable. - -Currently, the portions of the specification that rely on this schema are -the entity tables, entity definitions, filename templates, and metadata tables. -Any changes to the specification should be mirrored in the schema. - -## The format of the schema - -The schema is divided into two parts: the object definitions and the rules. - -The object definitions (files in `objects/`) describe attributes of individual -objects or data types in the specification. -Common information in these files includes full names, descriptions, and -constraints on valid values. -These files **do not** describe how objects of different types -(for example file suffixes and file entities) interact with one another, or -whether objects are required in a given dataset or file. - -The rules (files in `rules/`) describe how objects related to one another, -as well as their requirement levels. - -## Object files - -The types of objects currently supported in the schema are: - -- modalities, -- datatypes, -- entities, -- suffixes, -- metadata, -- top-level files, -- and non-BIDS associated folders. - -Each of these object types has a single file in the `objects/` folder. - -- `modalities.yaml`: The modalities, or types of technology, used to acquire data in a BIDS dataset. - These modalities are not reflected directly in the specification. - For example, while both fMRI and DWI data are acquired with an MRI, - in a BIDS dataset they are stored in different folders reflecting the two different `datatypes`. - -- `datatypes.yaml`: Data types supported by the specification. - The only information provided in the file is: - - 1. a full list of valid BIDS datatypes - 1. each datatype's full name - 1. a free text description of the datatype. - -- `entities.yaml`: Entities (key/value pairs in folder and filenames). - -- `metadata.yaml`: All valid metadata fields that are explicitly supported in BIDS sidecar JSON files. - -- `columns.yaml`: All valid columns that are explicitly supported in BIDS TSV files. - -- `suffixes.yaml`: Valid file suffixes. - -- `top_level_files.yaml`: Valid top-level files which may appear in a BIDS dataset. - -- `associated_data.yaml`: Folders that may appear within a dataset folder without following BIDS rules. - -### On re-used objects with different definitions - -If an object may mean something different depending on where it is used within the specification, -then this must be reflected in the schema. -Specifically, each version of the object must have its own definition within the relevant file. -However, since object files are organized as dictionaries, each object must have a unique key. -Thus, we append a suffix to each re-used object's key in order to make it unique. -For objects with `CamelCase` names (for example, metadata fields), the suffix will start with a single underscore (`_`). -For objects with `snake_case` names, two underscores must be used. - -There should also be a comment near the object definition in the YAML file describing the nature of the different objects. - -For example, the TSV column `"reference"` means different things when used for EEG data, as compared to iEEG data. -As such, there are two definitions in `columns.yaml` for the `"reference"` column: `"reference__eeg"` and `"reference_ieeg"`. - -```yaml -# reference column for channels.tsv files for EEG data -reference__eeg: - name: reference - description: | - Name of the reference electrode(s). - This column is not needed when it is common to all channels. - In that case the reference electrode(s) can be specified in `*_eeg.json` as `EEGReference`). - type: string -# reference column for channels.tsv files for iEEG data -reference__ieeg: - name: reference - description: | - Specification of the reference (for example, 'mastoid', 'ElectrodeName01', 'intracranial', 'CAR', 'other', 'n/a'). - If the channel is not an electrode channel (for example, a microphone channel) use `n/a`. - anyOf: - - type: string - - type: string - enum: - - n/a -``` - -When adding new object definitions to the schema, -every effort should be made to find a shared, common definition for the term, should it already exist. -If the differences between two versions of the same object are subtle or driven by context, -then you can generally _append_ additional text to the object definition within the associated rendered table in the specification, -rather than creating a separate entry in the schema. - -### `modalities.yaml` - -This file contains a dictionary in which each modality is defined. -Keys are modality abbreviations (for example, `mri` for magnetic resonance imaging), -and each associated value is a dictionary with two keys: `name` and `description`. - -The `name` field is the full name of the modality. -The `description` field is a freeform description of the modality. - -### `datatypes.yaml` - -This file contains a dictionary in which each datatype is defined. -Keys are the folder names associated with each datatype (for example, `anat` for anatomical MRI), -and each associated value is a dictionary with two keys: `name` and `description`. - -The `name` field is the full name of the datatype. -The `description` field is a freeform description of the datatype. - -### `entities.yaml` - -This file contains a dictionary in which each entity (key/value pair in filenames) is defined. -Keys are long-form versions of the entities, which are distinct from both the entities as -they appear in filenames _and_ their full names. -For example, the key for the "Contrast Enhancing Agent" entity, which appears in filenames as `ce-