Skip to content

Commit 2bb67d8

Browse files
sappelhoffeffigies
andauthored
[INFRA] Migrate md and yml checks from travis to GH actions (#693)
* [MAINT] migrate md and yml checks from travis to GH actions * fix node with --global install * try with fixed PATH * iter 1 * iter 2 * iter 3 * back to beginnning * path tricks * try with npx * Apply suggestions from code review Co-authored-by: Chris Markiewicz <[email protected]> * not recommended -> deprecated * fix linter 10-file-collections.md * fix pipes in mri md except for lines in conflict with bep005 pr Co-authored-by: Chris Markiewicz <[email protected]>
1 parent 8e72425 commit 2bb67d8

File tree

7 files changed

+59
-48
lines changed

7 files changed

+59
-48
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check Markdown style
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
markdown-style:
7+
runs-on : ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Setup NodeJS
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: 10
14+
- name: Install dependencies
15+
run: npm install `cat npm-requirements.txt`
16+
- name: Run style checks
17+
# try npx: https://stackoverflow.com/a/45164863/5201771
18+
run: npx remark src/*.md src/*/*.md --frail

.github/workflows/yml_lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint yml files
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
yml-lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: 3.9
14+
- name: Install dependencies
15+
run: pip install yamllint
16+
- name: Lint yml files in src/schema
17+
run: yamllint -f standard src/schema/

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/02-common-principles.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ by changing acquisition parameters one (or multiple) at a time
169169
or by being inherent components of the same data.
170170
Entity-linked collections are identified by a common suffix,
171171
indicating the group of files that should be considered a logical unit.
172-
Within each collection, files MUST be distinguished from each other by at least one
172+
Within each collection, files MUST be distinguished from each other by at least one
173173
entity (for example, `echo`) that corresponds to an altered acquisition parameter
174174
(`EchoTime`) or that defines a component relationship (for example, `part`).
175175
Note that these entities MUST be described by the specification and
176176
the parameter changes they declare MUST NOT invalidate the definition of the accompanying suffix.
177177
For example, the use of the `echo` entity along with the `T1w` suffix casts doubt on
178-
the validity of the identified contrast weighting.
178+
the validity of the identified contrast weighting.
179179
Provided the conditions above are satisfied,
180180
any suffix (such as `bold`) can identify an entity-linked file collection,
181181
although certain suffixes are exclusive for this purpose (for example, `MP2RAGE`).

src/04-modality-specific-files/01-magnetic-resonance-imaging-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ JSON file. See [Common metadata fields](#common-metadata-fields) for a
197197
list of terms and their definitions. There are also some OPTIONAL JSON
198198
fields specific to anatomical scans:
199199

200-
| **Key name** | **Requirement level** | **Data type** | **Description** |
201-
| ----------------------- | --------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
202-
| ContrastBolusIngredient | OPTIONAL | [string][] | Active ingredient of agent. Values MUST be one of: IODINE, GADOLINIUM, CARBON DIOXIDE, BARIUM, XENON Corresponds to DICOM Tag 0018,1048. |
203-
| RepetitionTimeExcitation | OPTIONAL | [number][] | The interval, in seconds, between two successive excitations. The DICOM tag that best refers to this parameter is [(0018, 0080)](http://dicomlookup.com/lookup.asp?sw=Tnumber&q=(0018,0080)). This field may be used together with the `RepetitionTimePreparation` for certain use cases, such as [MP2RAGE](https://doi.org/10.1016/j.neuroimage.2009.10.002). Use `RepetitionTimeExcitation` (in combination with `RepetitionTimePreparation` if needed) for anatomy imaging data rather than `RepetitionTime` as it is already defined as the amount of time that it takes to acquire a single volume in the [task imaging data](#task-including-resting-state-imaging-data) section. |
204-
| RepetitionTimePreparation | OPTIONAL | [number][] or [array][] of [numbers][] | The interval, in seconds, that it takes a preparation pulse block to re-appear at the beginning of the succeeding (essentially identical) pulse sequence block. The data type number may apply to files from any MRI modality concerned with a single value for this field. The data type array provides a value for each volume in a 4D dataset and should only be used when the volume timing is critical for interpretation of the data, such as in [ASL](#arterial-spin-labeling-perfusion-data). |
200+
| **Key name** | **Requirement level** | **Data type** | **Description** |
201+
| ------------------------- | --------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
202+
| ContrastBolusIngredient | OPTIONAL | [string][] | Active ingredient of agent. Values MUST be one of: IODINE, GADOLINIUM, CARBON DIOXIDE, BARIUM, XENON Corresponds to DICOM Tag 0018,1048. |
203+
| RepetitionTimeExcitation | OPTIONAL | [number][] | The interval, in seconds, between two successive excitations. The DICOM tag that best refers to this parameter is [(0018, 0080)](http://dicomlookup.com/lookup.asp?sw=Tnumber&q=(0018,0080)). This field may be used together with the `RepetitionTimePreparation` for certain use cases, such as [MP2RAGE](https://doi.org/10.1016/j.neuroimage.2009.10.002). Use `RepetitionTimeExcitation` (in combination with `RepetitionTimePreparation` if needed) for anatomy imaging data rather than `RepetitionTime` as it is already defined as the amount of time that it takes to acquire a single volume in the [task imaging data](#task-including-resting-state-imaging-data) section. |
204+
| RepetitionTimePreparation | OPTIONAL | [number][] or [array][] of [numbers][] | The interval, in seconds, that it takes a preparation pulse block to re-appear at the beginning of the succeeding (essentially identical) pulse sequence block. The data type number may apply to files from any MRI modality concerned with a single value for this field. The data type array provides a value for each volume in a 4D dataset and should only be used when the volume timing is critical for interpretation of the data, such as in [ASL](#arterial-spin-labeling-perfusion-data). |
205205

206206
The [`part-<label>`](../99-appendices/09-entities.md#part) key/value pair is
207207
used to indicate which component of the complex representation of the MRI

src/99-appendices/08-coordinate-systems.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ Unless specified explicitly in the sidecar file in the
128128
| ICBM452AirSpace | Reference space defined by the "average of 452 T1-weighted MRIs of normal young adult brains" with "linear transforms of the subjects into the atlas space using a 12-parameter affine transformation" [https://www.loni.usc.edu/research/atlases](https://www.loni.usc.edu/research/atlases) |
129129
| ICBM452Warp5Space | Reference space defined by the "average of 452 T1-weighted MRIs of normal young adult brains" "based on a 5th order polynomial transformation into the atlas space" [https://www.loni.usc.edu/research/atlases](https://www.loni.usc.edu/research/atlases) |
130130
| IXI549Space | Reference space defined by the average of the "549 (...) subjects from the IXI dataset" linearly transformed to ICBM MNI 452.Used by SPM12. [https://brain-development.org/](https://brain-development.org/) |
131-
| fsaverage\[3\|4\|5\|6\|sym\] | NOT RECOMMENDED, please use `fsaverage` without modifiers. Images were sampled to the FreeSurfer surface reconstructed from the subject’s T1w image, and registered to an fsaverage template |
132131
| fsaverage | The `fsaverage` is a **dual template** providing both volumetric and surface coordinates references. The volumetric template corresponds to a FreeSurfer variant of `MNI305` space. The `fsaverage` atlas also defines a surface reference system (formerly described as fsaverage\[3\|4\|5\|6\|sym\]). |
133132
| fsaverageSym | The `fsaverage` is a **dual template** providing both volumetric and surface coordinates references. The volumetric template corresponds to a FreeSurfer variant of `MNI305` space. The `fsaverageSym` atlas also defines a symmetric surface reference system (formerly described as `fsaveragesym`). |
134133
| fsLR | The `fsLR` is a **dual template** providing both volumetric and surface coordinates references. The volumetric template corresponds to `MNI152NLin6Asym`. Surface templates are given at several sampling densities: 164k (used by HCP pipelines for 3T and 7T anatomical analysis), 59k (used by HCP pipelines for 7T MRI bold and DWI analysis), 32k (used by HCP pipelines for 3T MRI bold and DWI analysis), or 4k (used by HCP pipelines for MEG analysis) fsaverage_LR surface reconstructed from the T1w image. |
@@ -143,17 +142,15 @@ Unless specified explicitly in the sidecar file in the
143142
| OASIS30Atropos | [https://mindboggle.info/data.html](https://mindboggle.info/data.html) |
144143
| Talairach | Piecewise linear scaling of the brain is implemented as described in TT88. [http://talairach.org/](http://talairach.org/) |
145144
| UNCInfant | Infant Brain Atlases from Neonates to 1- and 2-year-olds. [https://www.nitrc.org/projects/pediatricatlas](https://www.nitrc.org/projects/pediatricatlas) |
146-
| UNCInfant\[0\|1\|2\]V\[21\|22\|23\] | NOT RECOMMENDED, please use `UNCInfant` without modifiers. Infant Brain Atlases from Neonates to 1- and 2-year-olds. [https://www.nitrc.org/projects/pediatricatlas](https://www.nitrc.org/projects/pediatricatlas) |
147145

148146
The following template identifiers are retained for backwards compatibility
149147
of BIDS implementations.
150-
Their use is NOT RECOMMENDED for new BIDS datasets and tooling, but their
151-
presence MUST NOT produce a validation error.
148+
However, their use is [DEPRECATED][deprecated].
152149

153-
| Coordinate System | Recommended identifier |
154-
| ----------------------------------- | ---------------------- |
155-
| fsaverage\[3\|4\|5\|6\|sym\] | fsaverage\[Sym\] |
156-
| UNCInfant\[0\|1\|2\]V\[21\|22\|23\] | UNCInfant |
150+
| Coordinate System | Description | RECOMMENDED alternative identifier |
151+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
152+
| fsaverage\[3\|4\|5\|6\|sym\] | Images were sampled to the FreeSurfer surface reconstructed from the subject’s T1w image, and registered to an fsaverage template | fsaverage\[Sym\] |
153+
| UNCInfant\[0\|1\|2\]V\[21\|22\|23\] | Infant Brain Atlases from Neonates to 1- and 2-year-olds. [https://www.nitrc.org/projects/pediatricatlas](https://www.nitrc.org/projects/pediatricatlas) | UNCInfant |
157154

158155
### Nonstandard coordinate system identifiers
159156

@@ -181,3 +178,4 @@ Please note that `space-scanner` SHOULD NOT be used, it is mentioned in this spe
181178
<!-- Link Definitions -->
182179

183180
[common file level metadata fields]: ../05-derivatives/02-common-data-types.md#common-file-level-metadata-fields
181+
[deprecated]: ../02-common-principles.md#definitions

0 commit comments

Comments
 (0)