From 33543e420165b4e6d80e2334775ebde16d12e8d8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 30 Mar 2024 18:06:42 -0400 Subject: [PATCH 1/3] Make extensions identifiers contain . to separate extensions where multiple used --- src/schema/objects/extensions.yaml | 4 ++-- tools/schemacode/bidsschematools/render/text.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schema/objects/extensions.yaml b/src/schema/objects/extensions.yaml index 96056e497d..ee6a781b7e 100644 --- a/src/schema/objects/extensions.yaml +++ b/src/schema/objects/extensions.yaml @@ -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: | @@ -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: | diff --git a/tools/schemacode/bidsschematools/render/text.py b/tools/schemacode/bidsschematools/render/text.py index c9fb6f2298..d2d1dd3785 100644 --- a/tools/schemacode/bidsschematools/render/text.py +++ b/tools/schemacode/bidsschematools/render/text.py @@ -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: From 8772f98c77f45a4c420f5ce984f43e37cfac7d4d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 13 Apr 2024 11:10:31 -0400 Subject: [PATCH 2/3] Use underscore since "." is used in path to any object --- src/schema/objects/extensions.yaml | 4 ++-- tools/schemacode/bidsschematools/render/text.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schema/objects/extensions.yaml b/src/schema/objects/extensions.yaml index ee6a781b7e..db38cf55b2 100644 --- a/src/schema/objects/extensions.yaml +++ b/src/schema/objects/extensions.yaml @@ -184,7 +184,7 @@ nii: display_name: NIfTI description: | A Neuroimaging Informatics Technology Initiative (NIfTI) data file. -nii.gz: +nii_gz: value: .nii.gz display_name: Compressed NIfTI description: | @@ -274,7 +274,7 @@ tsv: display_name: Tab-Delimited description: | A tab-delimited file. -tsv.gz: +tsv_gz: value: .tsv.gz display_name: Compressed Tab-Delimited description: | diff --git a/tools/schemacode/bidsschematools/render/text.py b/tools/schemacode/bidsschematools/render/text.py index d2d1dd3785..f26ba73204 100644 --- a/tools/schemacode/bidsschematools/render/text.py +++ b/tools/schemacode/bidsschematools/render/text.py @@ -401,8 +401,8 @@ def make_filename_template( ext_headings = [] for extension in extensions: - # 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), + # 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: From 95f4833d7c746a3c69485b135b960f10afe73b2d Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Fri, 19 Apr 2024 15:47:18 -0400 Subject: [PATCH 3/3] [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 ^^^ --- src/common-principles.md | 2 +- src/modality-specific-files/physiological-recordings.md | 2 +- src/modality-specific-files/task-events.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common-principles.md b/src/common-principles.md index 461842ddfc..ac05174e59 100644 --- a/src/common-principles.md +++ b/src/common-principles.md @@ -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: diff --git a/src/modality-specific-files/physiological-recordings.md b/src/modality-specific-files/physiological-recordings.md index 897deb3d1b..8db4a03a02 100644 --- a/src/modality-specific-files/physiological-recordings.md +++ b/src/modality-specific-files/physiological-recordings.md @@ -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" diff --git a/src/modality-specific-files/task-events.md b/src/modality-specific-files/task-events.md index c3822094a5..ca5925909d 100644 --- a/src/modality-specific-files/task-events.md +++ b/src/modality-specific-files/task-events.md @@ -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: