Skip to content

Commit

Permalink
CI/STY: Fix spelling errors, update style check
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Jun 4, 2024
1 parent 36b5562 commit 01368c1
Show file tree
Hide file tree
Showing 13 changed files with 620 additions and 619 deletions.
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
skip = .git,*.pdf,*.svg,*.html,dataset_description.json,*.bib
# te - TE
# Weill - name
# reson - Reson. abbreviation in citation
ignore-words-list = te,weill,reson
39 changes: 18 additions & 21 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Style check
name: Style + spelling check

on:
push:
Expand All @@ -11,30 +11,27 @@ defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run ruff check .
- run: pipx run ruff format --diff .

codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1 # Only fetch the latest commit
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install black isort
- name: black code formatting check
run: |
black --check nibabies/
- name: isort formatting check
run: isort nibabies/ --check-only
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Previous, *NiBabies* expected input from the `--derivatives` flag to be in T1w s
* DKR: Add M-CRIB-S to Docker container (#283)
* DKR: Update dependencies, split into multi-stage build
* ENH: Add option to exclude projecting high variance voxels to surface (#278)
* ENH: Resample morphometrics to fsLR CIFTI-2 files when outputing CIFTIs (#279)
* ENH: Resample morphometrics to fsLR CIFTI-2 files when outputting CIFTIs (#279)
* ENH: Add MCRIBReconAll as alternative surface reconstruction method (#283)
* ENH: Reorder anatomical processsing, run ANTs DenoiseImage on anatomicals (#286)
* ENH: Reorder anatomical processing, run ANTs DenoiseImage on anatomicals (#286)
* ENH: Extract participant ages from BIDS sources, deprecate `--age-months` (#287)
* ENH: Dilate BOLD mask by 2 voxels to prevent over-aggressive masking degrading T2star map estimation (#296)
* ENH: Allow precomputed derivatives in T1w or T2w space (#305)
Expand Down
2 changes: 1 addition & 1 deletion docs/community.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## NiPreps Community

Check out the [official NiPreps community page](https://www.nipreps.org/community/), where topics such as contributing, code of coduct, and licensing are outlined.
Check out the [official NiPreps community page](https://www.nipreps.org/community/), where topics such as contributing, code of conduct, and licensing are outlined.


## NiBabies Coding Style
Expand Down
2 changes: 1 addition & 1 deletion long_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ other challenges require a more specialized workflow. *NiBabies*, an open-source
pipeline extending from fMRIPrep for infant structural and functional MRI
preprocessing, aims to address this need.

The workflow is built atop [Nipype](https://nipype.readthedocs.io) and encompases a large
The workflow is built atop [Nipype](https://nipype.readthedocs.io) and encompasses a large
set of tools from well-known neuroimaging packages, including
[FSL](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/),
[ANTs](https://stnava.github.io/ANTs/),
Expand Down
4 changes: 2 additions & 2 deletions nibabies/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def _build_parser():
"""Build parser object."""
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, Action
from argparse import Action, ArgumentDefaultsHelpFormatter, ArgumentParser
from functools import partial
from pathlib import Path

Expand Down Expand Up @@ -300,7 +300,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_subset = parser.add_argument_group('Options for performing only a subset of the workflow')
Expand Down
2 changes: 1 addition & 1 deletion nibabies/cli/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def build_workflow(config_file):
from ..utils.misc import check_deps
from ..workflows.base import init_nibabies_wf

# initalize config
# initialize config
config.load(config_file)
build_logger = config.loggers.workflow

Expand Down
2 changes: 1 addition & 1 deletion nibabies/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,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)
Expand Down
Loading

0 comments on commit 01368c1

Please sign in to comment.