Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCHEMA] Define the types present in the schema in a new YAML file #1048

Closed
wants to merge 14 commits into from
143 changes: 143 additions & 0 deletions src/schema/objects/types.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
# This file describes the types of objects in the BIDS schema.
# Each object type has its own YAML file describing valid possible values for objects of that type.
associated_data:
name: Associated Data
description: |
Directories that may appear within a dataset directory without following BIDS rules.
definition:
name: string
description: string
columns:
name: Column
description: |
Columns which may appear within tabular data files, such as TSV or TSV.GZ files.
definition:
name: string
description: string
type:
- string:
supplementary_fields:
- format
- unit
- enum
- pattern
- number:
supplementary_fields:
- unit
- exclusiveMinimum
- minimum
- exclusiveMaximum
- maximum
- integer:
supplementary_fields:
- unit
- exclusiveMinimum
- minimum
- exclusiveMaximum
- maximum
- boolean
datatypes:
name: Data Type
description: |
A functional group of different types of data.
This is equivalent to the **Data Type** defined under Common Principles.
definition:
name: string
description: string
entities:
name: Entity
description: |
A key-value pair in a BIDS filename.
Valid keys, and the order in which they must appear, is defined within the BIDS schema.
definition:
name: string
description: string
type:
- string:
supplementary_fields:
- format
- enum
extensions:
name: File Extension
description: |
A portion of the filename after the left-most
period (`.`) preceded by any other alphanumeric. For example, `.gitignore` does
not have a file extension, but the file extension of `test.nii.gz` is `.nii.gz`.
Note that the left-most period is included in the file extension.

This is equivalent to the **File extension** defined under Common Principles.
definition:
name: string
description: string
formats:
name: Format
description: |
A regular expression defining valid values of different types.
definition:
name: string
description: string
pattern: string
metadata:
name: Metadata Field
description: |
A field that may be present in a BIDS sidecar JSON file.
definition:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the most extensive "definition," so I think it's the best one to focus on as we determine if this structure is any good.

name: string
description: string
type:
- string:
supplementary_fields:
- format
- unit
- enum
- pattern
- number:
supplementary_fields:
- unit
- exclusiveMinimum
- minimum
- exclusiveMaximum
- maximum
- integer:
supplementary_fields:
- unit
- exclusiveMinimum
- minimum
- exclusiveMaximum
- maximum
- array:
supplementary_fields:
- minItems
- maxItems
- items
- boolean
- object:
supplementary_fields:
- additionalProperties
- properties
modalities:
name: Modality
description: |
The category of brain data recorded by a file.
This is equivalent to the **Modality** defined under Common Principles.
definition:
name: string
description: string
suffixes:
name: Suffix
description: |
An alphanumeric value within BIDS filenames, located after the entity `key-value_` pairs
(thus after the final `_`), right before the **File extension**.
This is equivalent to the **suffix** defined under Common Principles.
definition:
name: string
description: string
unit: string
top_level_files:
name: Top-Level File
description: |
A file which may appear at the top level of a dataset.
definition:
name: string
description: string