Skip to content

Commit 944f634

Browse files
committed
[DATALAD RUNCMD] Rename <source_entities> into <source-entities> for uniformity
=== Do not change lines below === { "chain": [], "cmd": "git-sedi source_entities source-entities", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent d98df88 commit 944f634

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

src/derivatives/common-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Template:
182182
sub-<label>/
183183
[ses-<label>/]
184184
<datatype>/
185-
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
185+
<source-entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
186186
```
187187

188188
Data is considered to be *preprocessed* or *cleaned* if the data type of the input,

src/derivatives/imaging.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Template:
1212
sub-<label>/
1313
[ses-<label>/]
1414
<datatype>/
15-
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
15+
<source-entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
1616
```
1717

1818
Volumetric preprocessing does not modify the number of dimensions, and so
@@ -150,8 +150,8 @@ Template:
150150
sub-<label>/
151151
[ses-<label>/]
152152
anat|func|dwi/
153-
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
154-
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
153+
<source-entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
154+
<source-entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
155155
```
156156

157157
A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
@@ -269,9 +269,9 @@ Template:
269269
sub-<label>/
270270
[ses-<label>/]
271271
anat|func|dwi/
272-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
273-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
274-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
272+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
273+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
274+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
275275
```
276276

277277
Example:
@@ -336,8 +336,8 @@ Template:
336336
sub-<label>/
337337
[ses-<label>/]
338338
func|anat|dwi/
339-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
340-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
339+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
340+
<source-entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
341341
```
342342

343343
Example:
@@ -412,10 +412,10 @@ Template:
412412
sub-<label>/
413413
[ses-<label>/]
414414
anat/
415-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
416-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
417-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
418-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
415+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
416+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
417+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
418+
<source-entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
419419
```
420420

421421
The [`hemi-<label>`](../appendices/entities.md#hemi) entity is REQUIRED for GIFTI files storing information about

src/derivatives/introduction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ in [Derived dataset and pipeline description][derived-dataset-description].
6060
copy of that raw file.
6161

6262
- Each Derivatives filename MUST be of the form:
63-
`<source_entities>[_keyword-<value>]_<suffix>.<extension>`
63+
`<source-entities>[_keyword-<value>]_<suffix>.<extension>`
6464
(where `<value>` could either be an `<index>` or a `<label>` depending on
6565
the keyword; see [Definitions][definitions])
6666

6767
- When the derivatives chain involves outputs derived from a single raw input,
68-
`source_entities` MUST be the entire source filename, with the omission of
68+
`source-entities` MUST be the entire source filename, with the omission of
6969
the source suffix and extension. One exception to this rule is filename
7070
entities that are no longer relevant. Depending on the nature of the
7171
derivative file, the suffix can either be the same as the source file if

src/schema/objects/metaentities.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ matches:
4343
4444
`<matches>` could correspond to `sub-control01_task-nback_run-1`.
4545
46-
source_entities:
46+
source-entities:
4747
display_name: source entities
4848
description: |
49-
`source_entities` is used as a placeholder in BIDS derivatives filenames templates.
49+
`source-entities` is used as a placeholder in BIDS derivatives filenames templates.
5050
51-
`source_entities` MUST be the entire source filename, with the omission of
51+
`source-entities` MUST be the entire source filename, with the omission of
5252
the source suffix and extension.
5353
One exception to this rule is filename entities that are no longer relevant.

src/schema/rules/metaentities.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file simply defines the order in which the meta-entities and placeholders are presented in the specification.
33
# The actual term definitions appear in `objects/metaentities.yaml`.
44
- matches
5-
- source_entities
5+
- source-entities

tools/schemacode/src/bidsschematools/render/text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def make_filename_template(
266266
If True, placeholder meta-entities will replace keyword-value entities in the
267267
filename.
268268
If ``dstype`` is ``"raw"``, the placeholder meta-entity is ``<matches>``.
269-
If ``dstype`` is ``"derivatives"``, the placeholder meta-entity is ``<source_entities>``.
269+
If ``dstype`` is ``"derivatives"``, the placeholder meta-entity is ``<source-entities>``.
270270
Default is False.
271271
empty_dirs: bool, optional
272272
If False, empty datatype directories are not included. If ``placeholders`` is True,
@@ -333,7 +333,7 @@ def make_filename_template(
333333
entity_list = schema.rules.entities
334334
start_string = ""
335335
if placeholders:
336-
metaentity_name = "matches" if dstype == "raw" else "source_entities"
336+
metaentity_name = "matches" if dstype == "raw" else "source-entities"
337337
start_string = (
338338
lt
339339
+ utils._link_with_html(
@@ -501,7 +501,7 @@ def append_filename_template_legend(text, pdf_format=False):
501501
legend = f"""{info_str}
502502
- `<matches>` is a placeholder to denote an arbitrary (and valid) sequence of entities
503503
and labels at the beginning of the filename (only BIDS "raw").
504-
- `<source_entities>` is a placeholder to denote an arbitrary sequence of entities and labels
504+
- `<source-entities>` is a placeholder to denote an arbitrary sequence of entities and labels
505505
at the beginning of the filename matching a source file from which the file derives
506506
(only BIDS-Derivatives).
507507
- Filename entities or directories between square brackets

0 commit comments

Comments
 (0)