Add codespell support with configuration and fixes - #8
Open
yarikoptic wants to merge 4 commits into
Open
yarikoptic wants to merge 4 commits into
yarikoptic wants to merge 4 commits into
Conversation
Config changes (.codespellrc):
- Add .git-meta, *.html, *.rtf, *.PDF to skip list (generated/binary formats)
- Add domain-specific words to ignore-words-list with explanatory comments:
- Proper names: losin (E. Reynolds Losin), sepulcre (J. Sepulcre),
claus (Claus Svarer), weerd (Peter De Weerd)
- Journal abbreviations: mapp (Hum Brain Mapp), commun (Nat Commun)
- Neuroimaging acronyms: te (Echo Time), fwe (Family-Wise Error),
bu (author initials), ans (Autonomic Nervous System)
- MATLAB identifiers: indx (index var), som (self-other-map), ttest,
als (alternating-least-squares), whos (MATLAB command)
- Brain region: pres (Presubiculum)
- Data column: anyother (meta-analysis coding category)
Ambiguous typo fixes (manual, context-based):
- interally -> internally (iglesias thalamic README)
- obtaine -> obtain (hcp_groupICAs README)
- agument -> argument (tck2trk.py error message)
- clutser -> cluster (divide_KMeans.py, divide_mask.py docstrings)
- fo rshen -> for shen (create_CANLab2023_atlas.m comment)
- combinate -> combine (two CANLab atlas MATLAB section headers)
- achive -> achieve (levinson_bari README)
- differents -> differences (CANLab2023 README)
- labled -> labeled, labeld -> labeled (FreeSurferColorLUT, Tian files)
- saggital -> sagittal (three Iglesias thalamic MATLAB scripts)
Co-Authored-By: Claude Code 2.1.270 / Claude Sonnet 4.6 <noreply@anthropic.com>
Fixed single-suggestion typos across documentation and code:
- probablistic/Probablistic -> probabilistic (many files)
- probabilty -> probability (many .m files)
- publically -> publicly (README.md)
- datset -> dataset
- doens't -> doesn't
- compatable -> compatible
- formated -> formatted
- aleady/alread -> already
- asign/asigned/asigning -> assign/assigned/assigning
- uesrs -> users
- imort -> import
- filenmae -> filename
- accomodate -> accommodate
- yeilded -> yielded
- supercede/supercedes -> supersede/supersedes
- splitted -> split
- propogate -> propagate
- probabalistic -> probabilistic
- funtion -> function
- connnector -> connector
- Saggital -> Sagittal (two READMEs)
- versoin -> version
- varible -> variable
- uknown -> unknown
- trunctates -> truncates
- transfrom -> transform
- tihs -> this
- theshold -> threshold
- stuctural -> structural
- stabalize -> stabilize
- specificaiton -> specification
- softwares -> software
- seperated/seperate -> separated/separate
- separatly -> separately
- refernece -> reference
- privide -> provide
- particpants -> participants
- particlar -> particular
- outputed -> outputted
- meaninful -> meaningful
- manally -> manually
- lables/labled -> labels/labeled
- indistiguishable -> indistinguishable
- idiosyncracies -> idiosyncrasies
- historgram -> histogram
- heterogenous -> heterogeneous
- genreation -> generation
- futher -> further
- extrenal -> external
- excedes -> exceeds
- erors -> errors
- encompases -> encompasses
- controling -> controlling
- continous -> continuous
- contiguious -> contiguous
- consituents -> constituents
- compatability -> compatibility
- collocalized -> colocalized
- avialable -> available
- asymetric/assymetric -> asymmetric
- applicaitons -> applications
- agument -> argument
- achive -> achieve
- Weerd -> Weird (where not a proper name)
- Treshold -> Threshold
- Tranform -> Transform
- REALATION -> RELATION
- Asending -> Ascending
Co-Authored-By: Claude Code 2.1.270 / Claude Sonnet 4.6 <noreply@anthropic.com>
=== Do not change lines below ===
{
"chain": [],
"cmd": "uvx codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
yarikoptic
commented
Sep 14, 2026
| thisMorelAtlas = [newAtlas2{:}]; | ||
|
|
||
| for orientation = {'saggital','coronal','axial'} | ||
| for orientation = {'sagittal','coronal','axial'} |
Author
There was a problem hiding this comment.
as relates to code, not sure if "kosher" or I should just whitelist the sagittal. please advise
Contributor
There was a problem hiding this comment.
Thanks Yarik! I think we've replaced this error in most/all of the core code with codespell, and this is historical. i would correct the spelling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add codespell configuration, CI workflow, and fix existing typos.
More about codespell: https://github.com/codespell-project/codespell
I personally introduced it to over a hundred projects already mostly with positive feedback
(see the "improveit-dashboard").
CI workflow has
permissionsset only toreadso it is also safe.Changes
Configuration & Infrastructure
.codespellrcwith skip patterns for generated/binary formats (.html,.rtf,.PDF,.gii,.pdf,.svg,.css) and.git-meta.github/workflows/codespell.yml) to check spelling on push and PRs tomasterDomain-Specific Whitelist
Added legitimate terms that codespell flags as typos, with explanatory inline comments:
losin(E. Reynolds Losin),sepulcre(Jorge Sepulcre),claus(Claus Svarer),weerd(Peter De Weerd)mapp(Hum Brain Mapp),commun(Nat Commun)te(Echo Time),fwe(Family-Wise Error),bu(author initials),ans(Autonomic Nervous System)indx(index var),som(self-other-map),ttest,als(alternating-least-squares),whos(MATLAB command)pres(Presubiculum)anyother(meta-analysis coding category in RunMeta090809.txt)Ambiguous Typo Fixes (manual, context-reviewed)
interally→internally(Iglesias thalamic README)obtaine→obtain(hcp_groupICAs README)agument→argument(tck2trk.py error message)clutser→cluster(divide_KMeans.py, divide_mask.py docstrings)fo rshen→for shen(create_CANLab2023_atlas.m comment)combinate→combine(two CANLab atlas MATLAB section headers)achive→achieve(levinson_bari README)differents→differences(CANLab2023 README)labled/labeld→labeled(FreeSurferColorLUT.txt, Tian atlas .m files)saggital→sagittal(three Iglesias thalamic MATLAB scripts — also a potential bug fix since the string was passed to a function that rejected it)Non-Ambiguous Typo Fixes (via
codespell -w, recorded with datalad run)~185 single-suggestion fixes across documentation and code, including:
probablistic→probabilistic(×48),datset→dataset(×13),probabilty→probability(×9),doens't→doesn't,compatable→compatible,formated→formatted,aleady→already, and many more.Historical Context
This project has had 14 prior commits fixing typos manually, demonstrating the value of automated spell-checking.
Testing
✅
codespellpasses with zero errors after all fixes🤖 Generated with Claude Code and love to typos free code
As it is quite sizeable -- might be worth first to run by your favorite agent ;-)