Skip to content

Commit

Permalink
Make extensions identifiers contain . to separate extensions where mu…
Browse files Browse the repository at this point in the history
…ltiple used (bids-standard#1755)

* Make extensions identifiers contain . to separate extensions where multiple used

* Use underscore since "." is used in path to any object

* [DATALAD RUNCMD] sed -i'' -e 's/tsvgz/tsv_gz/g' src/*.md ...

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i'' -e 's/tsvgz/tsv_gz/g' src/*.md src/*/*.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

---------

Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
yarikoptic and effigies authored Apr 19, 2024
1 parent bbe2283 commit 1afbfe8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ like in the example below.
### Compressed tabular files

Large tabular information, such as physiological recordings, MUST be stored with
[compressed tab-delineated (TSV.GZ) files](glossary.md#tsvgz-extensions) when
[compressed tab-delineated (TSV.GZ) files](glossary.md#tsv_gz-extensions) when
so established by the specifications.
Rules for formatting plain-text tabular files apply to TSVGZ files with three exceptions:

Expand Down
2 changes: 1 addition & 1 deletion src/modality-specific-files/physiological-recordings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Physiological recordings such as cardiac and respiratory signals MAY be
specified using a [compressed tabular file](../common-principles.md#compressed-tabular-files)
([TSV.GZ file](../glossary.md#tsvgz-extensions)) and a corresponding
([TSV.GZ file](../glossary.md#tsv_gz-extensions)) and a corresponding
JSON file for storing metadata fields (see below).

!!! example "Example datasets"
Expand Down
2 changes: 1 addition & 1 deletion src/modality-specific-files/task-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ in the accompanying JSON sidecar as follows (based on the example of the previou
Signals related to stimuli (such as parameters of a film or audio stimuli) that are
evenly recorded at a constant sampling frequency MUST be specified using a
[compressed tabular file](../common-principles.md#compressed-tabular-files)
([TSV.GZ file](../glossary.md#tsvgz-extensions)) and a corresponding
([TSV.GZ file](../glossary.md#tsv_gz-extensions)) and a corresponding
JSON file for storing metadata fields (see below).

Template:
Expand Down
4 changes: 2 additions & 2 deletions src/schema/objects/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ nii:
display_name: NIfTI
description: |
A Neuroimaging Informatics Technology Initiative (NIfTI) data file.
niigz:
nii_gz:
value: .nii.gz
display_name: Compressed NIfTI
description: |
Expand Down Expand Up @@ -274,7 +274,7 @@ tsv:
display_name: Tab-Delimited
description: |
A tab-delimited file.
tsvgz:
tsv_gz:
value: .tsv.gz
display_name: Compressed Tab-Delimited
description: |
Expand Down
4 changes: 2 additions & 2 deletions tools/schemacode/bidsschematools/render/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ def make_filename_template(

ext_headings = []
for extension in extensions:
# The glossary indexes by the extension identifier (niigz instead of .nii.gz),
# but the rules reference the actual suffix string (.nii.gz instead of niigz),
# The glossary indexes by the extension identifier (nii_gz instead of .nii.gz),
# but the rules reference the actual suffix string (.nii.gz instead of nii_gz),
# so we need to look it up.
key = ext_key_table.get(extension)
if key:
Expand Down

0 comments on commit 1afbfe8

Please sign in to comment.