You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Portions of the BIDS specification are defined using YAML files, in order to
581
-
make the specification machine-readable.
582
-
Currently, the only portion of the specification that relies on this schema is
583
-
the Entity Table, but any changes to the specification should be mirrored in the schema.
584
-
585
-
### The format of the schema
586
-
587
-
The schema reflects the files and objects in the specification, as well as
588
-
associations between these objects.
589
-
Here is a list of the files and subfolders of the schema, roughly in order of importance:
590
-
591
-
-`datatypes/*.yaml`:
592
-
Data types supported by the specification.
593
-
Each datatype may support many suffixes.
594
-
These suffixes are divided into groups based on what extensions and entities are allowed for each.
595
-
Data types correspond to subfolders (for example, `anat`, `func`) in the BIDS structure.
596
-
-`entities.yaml`:
597
-
A list of entities (key/value pairs in folder and filenames) with associated descriptions and formatting rules.
598
-
The order of the entities in the file determines the order in which entities must appear in filenames.
599
-
-`top_level_files.yaml`:
600
-
Modality-agnostic files stored at the top level of a BIDS dataset.
601
-
The schema specifies whether these files are required or optional, as well as acceptable extensions for each.
602
-
-`modalities.yaml`:
603
-
Modalities supported by the specification, along with a list of associated data types.
604
-
Modalities are not reflected directly in the BIDS structure, but data types are modality-specific.
605
-
-`associated_data.yaml`:
606
-
Folders that are commonly contained within the same folder as a BIDS dataset, but which do not follow the BIDS structure internally, such as `code` or `sourcedata`.
607
-
The schema specifies which folders are accepted and whether they are required or optional.
608
-
609
-
### Making a change to the schema
610
-
611
-
#### 1. Ensure that changes to the specification are matched in the schema
578
+
## Making a change to the BIDS-schema
579
+
580
+
Several aspects of the specification are defined in a set of YAML files in the
581
+
`src/schema` folder. The content of those files is described in a dedicated
582
+
[README file](./src/schema/README.md).
583
+
584
+
### 1. Ensure that changes to the specification are matched in the schema
612
585
613
586
The schema formalizes the rules described in the specification text, so you must
614
587
ensure that any changes which impact the rules of the specification (including,
615
588
but not limited to, adding new entities, suffixes, datatypes, modalities) are
616
589
reflected in the schema as well.
617
590
618
-
####2. Ensure that changes to the schema are matched in auto-generated sections of the specification
591
+
### 2. Ensure that changes to the schema are matched in auto-generated sections of the specification
619
592
620
593
The schema is used to generate a number of elements in the specification text, including:
621
594
- Filename format templates
@@ -625,7 +598,7 @@ The schema is used to generate a number of elements in the specification text, i
625
598
As such, you need to ensure that the functions used throughout the specification to render these elements are appropriately referencing the schema.
626
599
In essence, please make sure, if your changes do impact how functions should be called, that you also update how the function are called.
627
600
628
-
####3. Render the specification with `mkdocs` to check your changes
601
+
### 3. Render the specification with `mkdocs` to check your changes
629
602
630
603
Run `mkdocs serve` and open `localhost:8000` to browse the rendered specification.
631
604
Make sure that all filename format templates, entity tables, and entity definitions are correct
@@ -635,7 +608,7 @@ While the continuous integration run on pull requests by the repository will ren
635
608
it is crucial to manually review the rendered changes to ensure that the code not only successfully runs,
636
609
but also that the rendered changes appear as expected.
637
610
638
-
####4. Push your changes
611
+
### 4. Push your changes
639
612
640
613
For more information on making general changes with a pull request, please
0 commit comments