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

Well -- the regular -- codespell support #405

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within pyproject.toml
---
name: Codespell

on:
push:
branches: [dev]
pull_request:
branches: [dev]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ repos:
hooks:
- id: pyupgrade
exclude: ^(fitlins/_version.py|versioneer.py)
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in pyproject.toml
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Pull requests titles should begin with a descriptive prefix:
* ``DOC``: new or updated documentation
* ``STY``: style changes
* ``REF``: refactoring existing code
* ``CI``: updates to continous integration infrastructure
* ``CI``: updates to continuous integration infrastructure
* ``MAINT``: general maintenance

For example: `[ENH] Support for naive thresholding`
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Dataset: https://openneuro.org/datasets/ds000030/versions/00016

The balloon analog risk task (BART) is a risk-taking game where participants
decide whether to inflate a balloon, risking explosion, or cash out.
There are two trial types (``BALOON`` [*sic*] and ``CONTROL``), and three
There are two trial types (``BALLOON`` [*sic*] and ``CONTROL``), and three
possible actions (``ACCEPT``, ``CASHOUT``, ``EXPLODE``).

In this model, we contrast responses to ``ACCEPT`` and ``EXPLODE`` actions
in ``BALOON`` trials only.
in ``BALLOON`` trials only.

This model is similar to the word-pseudoword model above, but also demonstrates
the use of the ``And`` transformation, that takes the logical and of two binary
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/reports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ collinear regressor.

Correlations between regressors are plotted.
Bold black lines separate variables that are included in contrasts, or *variables
of interest*, and variables that are not, or *nuissance regressors*.
of interest*, and variables that are not, or *nuisance regressors*.

Contrast matrices
-----------------
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ For Windows users::
singularityware/docker2singularity \
poldracklab/fitlins:<VERSION>

This image may now be transfered to your cluster.
This image may now be transferred to your cluster.

Running a Singularity image
---------------------------
Expand Down
4 changes: 2 additions & 2 deletions examples/models/ds000030/models/model-001_smdl.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
"Name": "And",
"Input": [
"trial_type.BALOON",
"trial_type.BALLOON",
"action.ACCEPT"
],
"Output": [
Expand All @@ -28,7 +28,7 @@
{
"Name": "And",
"Input": [
"trial_type.BALOON",
"trial_type.BALLOON",
"action.EXPLODE"
],
"Output": [
Expand Down
2 changes: 1 addition & 1 deletion examples/notebooks/ds003_sample_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5645,7 +5645,7 @@
"rf_tb_img = image.load_img(rf_tb_path)\n",
"rf_aw_img = image.load_img(rf_aw_path)\n",
"\n",
"# subtract resuts to see dif\n",
"# subtract results to see dif\n",
"dif_wp_dat = nl_wp_img.get_fdata() - rf_wp_img.get_fdata()\n",
"dif_tb_dat = nl_tb_img.get_fdata() - rf_tb_img.get_fdata()\n",
"dif_aw_dat = nl_aw_img.get_fdata() - rf_aw_img.get_fdata()\n",
Expand Down
2 changes: 1 addition & 1 deletion fitlins/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command):
# TAG-NUM-gHEX
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
# unparsable. Maybe git-describe is misbehaving?
pieces["error"] = ("unable to parse git-describe output: '%s'"
% describe_out)
return pieces
Expand Down
4 changes: 2 additions & 2 deletions fitlins/interfaces/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class LoadBIDSModel(SimpleInterface):
The collection of specs from each level. Each dict at individual levels
contains the following keys:
'contrasts' : a list of ContrastInfo objects each unit of analysis.
A contrast specifiction is a list of contrast
A contrast specification is a list of contrast
dictionaries. Each dict has form:
{
'name': str,
Expand All @@ -224,7 +224,7 @@ class LoadBIDSModel(SimpleInterface):
'X' : The design matrix
'model' : The model part from the BIDS-StatsModels specification.
'metadata' (only higher-levels): a parallel DataFrame with the same number of
rows as X that contains all known metadata variabes that vary on a row-by-row
rows as X that contains all known metadata variables that vary on a row-by-row
basis but aren't actually predictiors

warnings : list of files
Expand Down
4 changes: 2 additions & 2 deletions fitlins/tests/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integration tests for the fitlins commandline

The tests in this directory call fitlins from the commandline in order to compare outputs with known reference values. Refernce data can be obtained with datalad via:
The tests in this directory call fitlins from the commandline in order to compare outputs with known reference values. Reference data can be obtained with datalad via:
```
datalad install -r -s https://gin.g-node.org/shotgunosine/fitlins_tests
datalad get fitlins_tests/ds003/ds003_fmriprep/sub-0{1,2,3}/func/*_space-MNI152NLin2009cAsym_desc-*.nii.gz \
Expand All @@ -20,5 +20,5 @@ pytest fitlins/fitlins/tests --bids-dir=${tests_dir}ds003/ds003_fmriprep/sourced

The three tests are:
- afni_smooth: AFNI estimator with 10mm isotropic smoothing added
- afni_blurto: AFNI estimator blured to 5mm smoothness
- afni_blurto: AFNI estimator blurred to 5mm smoothness
- nistats_smooth: Nistats estimator with 10mm isotropic smoothing added
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ line-length = 99
target-version = ['py37']
skip-string-normalization = true
extend-exclude = '_version.py|versioneer.py'

[tool.codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = '.git*,*.pdf,*.svg,venvs,versioneer.py,*.css,*.min.*,*.gii'
check-hidden = true
ignore-regex = '^\s*"image/\S+": ".*'
# ignore-words-list = ''
2 changes: 1 addition & 1 deletion tools/update_changes.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Collects the pull-requests since the latest release and
# aranges them in the CHANGES.txt file.
# arranges them in the CHANGES.txt file.
#
# This is a script to be run before releasing a new version.
#
Expand Down
Loading