From 8290c5a6684301803102ecc9e32af54136d5e88a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 19:44:47 -0500 Subject: [PATCH 1/5] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..5768d7c63 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v1 From 9f8c805a3adb0b35121c7642bff56bd772f24a61 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 19:44:47 -0500 Subject: [PATCH 2/5] Add rudimentary .codespellrc --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..93eaad563 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +skip = .git,*.pdf,*.svg,*.html,dataset_description.json +# te - TE +# Weill - name +# reson - Reson. abbreviation in citation +ignore-words-list = te,weill,reson From 02a575972be41a114936c915764e931009ad2fe4 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 19:47:24 -0500 Subject: [PATCH 3/5] Manually fix one ambigous typo --- docs/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.rst b/docs/installation.rst index 249307f64..40541733c 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -39,7 +39,7 @@ of containerized execution drawn from the BIDS-Apps protocols. For detailed information of containerized execution of *NiPreps*, please visit the corresponding `Docker `__ or `Singularity `__ subsections. -The *NiPreps* portal also containes +The *NiPreps* portal also contains `extended details of execution with the Docker wrapper `__. Manually Prepared Environment (Python 3.8+) From 159a0a2c33a164e6e0dfe96d33c85f10ad0d6a85 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 19:53:41 -0500 Subject: [PATCH 4/5] [DATALAD RUNCMD] Run codespell throughout fixing some typos === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- CHANGES.rst | 4 ++-- docs/workflows.rst | 2 +- fmriprep/cli/parser.py | 2 +- fmriprep/config.py | 4 ++-- fmriprep/data/reports-spec.yml | 2 +- fmriprep/interfaces/confounds.py | 2 +- fmriprep/workflows/base.py | 2 +- fmriprep/workflows/bold/t2s.py | 2 +- long_description.rst | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e369a279e..72260cef8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -506,7 +506,7 @@ This release also includes some maintenance changes handling old versions of sof Bug-fix release in the 20.1.x series. * FIX: Dependency conflict between *NiWorkflows* and *TemplateFlow* (#2269) -* FIX: More targetted *TemplateFlow* queries to work with all later releases (#2268) +* FIX: More targeted *TemplateFlow* queries to work with all later releases (#2268) * MAINT: Update dependency pinnings including ``niworkflows~=1.2.9`` and three minimal bug-fixes. 20.1.2 (September 04, 2020) @@ -1498,7 +1498,7 @@ With thanks to @mgxd and @naveau for contributions. --------------------------- * FIX: Pin niworkflows-0.2.4 to fix (#868). * FIX: Roll back run/task groupings after BIDS query (#918). - Groupings for the multi-echo extension will be reenabled soon. + Groupings for the multi-echo extension will be re-enabled soon. 1.0.2 (2nd of January 2018) --------------------------- diff --git a/docs/workflows.rst b/docs/workflows.rst index 264e528e8..30561612a 100644 --- a/docs/workflows.rst +++ b/docs/workflows.rst @@ -431,7 +431,7 @@ original space. All volumes in the :abbr:`BOLD (blood-oxygen level-dependent)` series are resampled in their native space by concatenating the mappings found in previous correction workflows (:abbr:`HMC (head-motion correction)` and -:abbr:`SDC (susceptibility-derived distortion correction)` if excecuted) +:abbr:`SDC (susceptibility-derived distortion correction)` if executed) for a one-shot interpolation process. Interpolation uses a Lanczos kernel. diff --git a/fmriprep/cli/parser.py b/fmriprep/cli/parser.py index e42cc3ba1..d2c01444e 100644 --- a/fmriprep/cli/parser.py +++ b/fmriprep/cli/parser.py @@ -572,7 +572,7 @@ def _slice_time_ref(value, parser): dest="verbose_count", action="count", default=0, - help="Increases log verbosity for each occurence, debug level is -vvv", + help="Increases log verbosity for each occurrence, debug level is -vvv", ) g_other.add_argument( "-w", diff --git a/fmriprep/config.py b/fmriprep/config.py index 24e015911..1162345d5 100644 --- a/fmriprep/config.py +++ b/fmriprep/config.py @@ -28,7 +28,7 @@ each run and subject is left under ``/sub-/log//fmriprep.toml``. Settings are stored using :abbr:`ToML (Tom's Markup Language)`. -The module has a :py:func:`~fmriprep.config.to_filename` function to allow writting out +The module has a :py:func:`~fmriprep.config.to_filename` function to allow writing out the settings to hard disk in *ToML* format, which looks like: .. literalinclude:: ../fmriprep/data/tests/config.toml @@ -644,7 +644,7 @@ def _set_ants_seed(): def _set_numpy_seed(): - """NumPy's random seed is independant from Python's `random` module""" + """NumPy's random seed is independent from Python's `random` module""" import numpy as np val = random.randint(1, 65536) diff --git a/fmriprep/data/reports-spec.yml b/fmriprep/data/reports-spec.yml index 11ce4220d..f569d0663 100644 --- a/fmriprep/data/reports-spec.yml +++ b/fmriprep/data/reports-spec.yml @@ -86,7 +86,7 @@ sections: subtitle: Alignment between the anatomical reference of the fieldmap and the target EPI (debug mode) - bids: {datatype: figures, desc: fieldmap, suffix: bold} caption: Estimated fieldmap, as reconstructed on the target BOLD run space to allow - the assessment of its alignement with the distorted data. + the assessment of its alignment with the distorted data. The anatomical reference is the fieldmap's reference moved into the target EPI's grid through the estimated transformation. In other words, this plot should be equivalent to that of the diff --git a/fmriprep/interfaces/confounds.py b/fmriprep/interfaces/confounds.py index 2f30a2b4d..62fbbda12 100644 --- a/fmriprep/interfaces/confounds.py +++ b/fmriprep/interfaces/confounds.py @@ -343,7 +343,7 @@ def camel_to_snake(name): return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() def _adjust_indices(left_df, right_df): - # This forces missing values to appear at the beggining of the DataFrame + # This forces missing values to appear at the beginning of the DataFrame # instead of the end index_diff = len(left_df.index) - len(right_df.index) if index_diff > 0: diff --git a/fmriprep/workflows/base.py b/fmriprep/workflows/base.py index cc9642f2a..aae1d27d6 100644 --- a/fmriprep/workflows/base.py +++ b/fmriprep/workflows/base.py @@ -409,7 +409,7 @@ def init_single_subject_wf(subject_id: str): f"{[e.method for e in fmap_estimators]}." ) - # Append the functional section to the existing anatomical exerpt + # Append the functional section to the existing anatomical excerpt # That way we do not need to stream down the number of bold datasets func_pre_desc = """ Functional data preprocessing diff --git a/fmriprep/workflows/bold/t2s.py b/fmriprep/workflows/bold/t2s.py index 200599fe3..997c1ecef 100644 --- a/fmriprep/workflows/bold/t2s.py +++ b/fmriprep/workflows/bold/t2s.py @@ -126,7 +126,7 @@ def init_t2s_reporting_wf(name: str = 't2s_reporting_wf'): r""" Generate T2\*-map reports. - This workflow generates a histogram of esimated T2\* values (in seconds) in the + This workflow generates a histogram of estimated T2\* values (in seconds) in the cortical and subcortical gray matter mask. Parameters diff --git a/long_description.rst b/long_description.rst index d17c6e408..09856fcec 100644 --- a/long_description.rst +++ b/long_description.rst @@ -15,7 +15,7 @@ fMRIPrep equips neuroscientists with an easy-to-use and transparent preprocessin workflow, which can help ensure the validity of inference and the interpretability of results. -The workflow is based on `Nipype `_ and encompases a large +The workflow is based on `Nipype `_ and encompasses a large set of tools from well-known neuroimaging packages, including `FSL `_, `ANTs `_, From 5451bcdaaf4c31f6391abad04891e8699b33282f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 22 Feb 2023 20:52:39 -0500 Subject: [PATCH 5/5] Move codespell as a job within contrib.yml per @effigies request --- .github/workflows/codespell.yml | 19 ------------------- .github/workflows/contrib.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 5768d7c63..000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Codespell - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Codespell - uses: codespell-project/actions-codespell@v1 diff --git a/.github/workflows/contrib.yml b/.github/workflows/contrib.yml index 656f24c92..2620fc945 100644 --- a/.github/workflows/contrib.yml +++ b/.github/workflows/contrib.yml @@ -47,3 +47,13 @@ jobs: run: | python -m black --diff --color --check wrapper python -m isort --diff --color --check wrapper + + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v1