-
Notifications
You must be signed in to change notification settings - Fork 169
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
Closed
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f418f8d
Describe object types in the schema.
tsalo 204a025
Try defining the objects' fields.
tsalo 257ddd2
Merge remote-tracking branch 'upstream/master' into define-types
tsalo c48b64a
Add extensions.
tsalo 360d006
Update types.yaml
tsalo ee9e308
Merge remote-tracking branch 'upstream/master' into define-types
tsalo 0732d30
Move the type definition file.
tsalo 79c8fd3
Fix the yaml file.
tsalo 98b53e3
Merge branch 'master' into define-types
tsalo 2c1bc21
Create test_rules.py
tsalo df02598
Move things.
tsalo a53ad71
Merge remote-tracking branch 'upstream/master' into define-types
tsalo 6166aba
Run prettier.
tsalo dfb8767
More improvements, maybe.
tsalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.