Skip to content
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

CI: implement codespell check for custom word mappings #1322

Merged
merged 22 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
- uses: actions/setup-python@v4
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
with:
skip: js,*.svg
ignore_words_list: fo,te,als
python-version: 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install codespell
- name: Run codespell
run: |
codespell \
--skip js,*.svg,*.eps,.git \
--ignore-words-list fo,te,als \
--builtin clear,rare \
--dictionary codespell_words.txt \
--exclude-file src/CHANGES.md

# Markdown formatting
remark:
Expand Down
4 changes: 4 additions & 0 deletions codespell_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sub-directory->subdirectory
sub-directories->subdirectories
sappelhoff marked this conversation as resolved.
Show resolved Hide resolved
file name->filename
folder->directory
10 changes: 5 additions & 5 deletions src/02-common-principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,25 @@ instead of specified with an `n/a` value, or included as an empty file

## Filesystem structure

Data for each subject are placed in sub-directories named "`sub-<label>`",
Data for each subject are placed in subdirectories named "`sub-<label>`",
where string "`<label>`" is substituted with the unique identification
label of each subject.
Additional information on each participant MAY be provided in a
[participants file](03-modality-agnostic-files.md#participants-file)
in the root directory of the dataset.

If data for the subject were acquired across multiple sessions, then within
the subject directory resides sub-directories named "`ses-<label>`",
the subject directory resides subdirectories named "`ses-<label>`",
where string "`<label>`" is substituted with a unique identification
label for each session.
In datasets where at least one subject has more than one session, this
additional sub-directory later SHOULD be added for all subjects in the dataset.
additional subdirectory later SHOULD be added for all subjects in the dataset.
Additional information on each session MAY be provided in a
[sessions file](03-modality-agnostic-files.md#sessions-file)
within the subject directory.

Within the session sub-directory (or the subject sub-directory if no
session sub-directories are present) are sub-directories named according to
Within the session subdirectory (or the subject subdirectory if no
session subdirectories are present) are subdirectories named according to
data type as defined above.
A data type directory SHOULD NOT be defined if there are no files to be placed
in that directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ whenever possible. See also

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -359,7 +359,7 @@ and a guide for using macros can be found at

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -567,7 +567,7 @@ and a guide for using macros can be found at

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -777,7 +777,7 @@ and can be used for practical guidance when curating a new dataset.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -1009,7 +1009,7 @@ containing that type of fieldmap can be found here:

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -1055,7 +1055,7 @@ second echos are available.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -1091,7 +1091,7 @@ In some cases (for example GE), the scanner software will directly reconstruct a

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -1140,7 +1140,7 @@ AFNI `3dqwarp`.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
12 changes: 6 additions & 6 deletions src/04-modality-specific-files/02-magnetoencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ the [BIDS examples repository](https://github.com/bids-standard/bids-examples).

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -203,7 +203,7 @@ Date time information MUST be expressed as indicated in [Units](../02-common-pri

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -287,7 +287,7 @@ UADC001 AUDIO V envelope of audio signal presented to participant

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -400,7 +400,7 @@ Photos of the anatomical landmarks and/or head localization coils

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand All @@ -427,7 +427,7 @@ actual anatomical nasion: `sub-0001_ses-001_acq-NAS_photo.jpg`

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -510,7 +510,7 @@ A guide for using macros can be found at

Example 2:

One recording per session, stored within the session folder.
One recording per session, stored within the session directory.

<!-- This block generates a file tree.
A guide for using macros can be found at
Expand Down
10 changes: 5 additions & 5 deletions src/04-modality-specific-files/03-electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and can be used for practical guidance when curating a new dataset.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -183,7 +183,7 @@ Date time information MUST be expressed as indicated in [Units](../02-common-pri

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -258,7 +258,7 @@ UADC001 MISC n/a envelope of audio signal n/a good n/a

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -305,7 +305,7 @@ the recording.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -423,7 +423,7 @@ Photos of the anatomical landmarks and/or fiducials.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and can be used for practical guidance when curating a new dataset.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -203,7 +203,7 @@ Date time information MUST be expressed as indicated in [Units](../02-common-pri

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -276,7 +276,7 @@ Example of free-form text for field `description`:

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -350,7 +350,7 @@ H01 27 -42 -21 5 AdTech

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -430,7 +430,7 @@ Example:

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ In this example, tracer injection coincides with scan start.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -296,7 +296,7 @@ ses-02 59

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
4 changes: 2 additions & 2 deletions src/04-modality-specific-files/10-microscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Further Microscopy datasets are available:

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -433,7 +433,7 @@ in a sample.

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
4 changes: 2 additions & 2 deletions src/appendices/file-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ included in this appendix:

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down Expand Up @@ -59,7 +59,7 @@ and a guide for using macros can be found at

<!--
This block generates a filename templates.
The inputs for this macro can be found in the folder
The inputs for this macro can be found in the directory
src/schema/rules/datatypes
and a guide for using macros can be found at
https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
Expand Down
16 changes: 8 additions & 8 deletions src/schema/objects/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ chn:
A file generated by KRISS MEG systems containing the position of the center of the MEG coils.

Each experimental run on the KRISS system produces a file with extension `.kdf`.
Additional files that may be available in the same folder include
Additional files that may be available in the same directory include
the digitized positions of the head points (`\_digitizer.txt`),
the position of the center of the MEG coils (`.chn`),
and the event markers (`.trg`).
Expand All @@ -70,9 +70,9 @@ dat:
A fine-calibration file used for Neuromag/Elekta/MEGIN MEG recording hardware.
CTF:
value: .ds/
display_name: CTF MEG Dataset Folder
display_name: CTF MEG Dataset Directory
description: |
A folder for MEG data, typically containing a `.meg4` file for the data and a `.res4` file for the resources.
A directory for MEG data, typically containing a `.meg4` file for the data and a `.res4` file for the resources.
dlabelnii:
value: .dlabel.nii
display_name: CIFTI-2 Dense Label File
Expand Down Expand Up @@ -132,7 +132,7 @@ kdf:
A KRISS (file with extension `.kdf`) file.

Each experimental run on the KRISS system produces a file with extension `.kdf`.
Additional files that may be available in the same folder include
Additional files that may be available in the same directory include
the digitized positions of the head points (`\_digitizer.txt`),
the position of the center of the MEG coils (`.chn`),
and the event markers (`.trg`).
Expand All @@ -152,7 +152,7 @@ mefd:
value: .mefd/
display_name: Multiscale Electrophysiology File Format Version 3.0
description: |
A folder in the [MEF3](https://osf.io/e3sf9/) format.
A directory in the [MEF3](https://osf.io/e3sf9/) format.

Each recording consists of a `.mefd` directory.
mhd:
Expand Down Expand Up @@ -263,7 +263,7 @@ trg:
A file generated by KRISS MEG systems containing the event markers.

Each experimental run on the KRISS system produces a file with extension `.kdf`.
Additional files that may be available in the same folder include
Additional files that may be available in the same directory include
the digitized positions of the head points (`\_digitizer.txt`),
the position of the center of the MEG coils (`.chn`),
and the event markers (`.trg`).
Expand Down Expand Up @@ -312,7 +312,7 @@ None:
A file with no extension.
Directory:
value: /
display_name: Folder
display_name: Directory
description: |
A folder with no extension.
A directory with no extension.
Corresponds to BTi/4D data.
Loading