Skip to content

Add codespell support with configuration and fixes#95

Open
yarikoptic wants to merge 7 commits intoGabrielKP:mainfrom
yarikoptic:enh-codespell
Open

Add codespell support with configuration and fixes#95
yarikoptic wants to merge 7 commits intoGabrielKP:mainfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic
Copy link

Add codespell configuration and fix existing typos. Triggered by me spotting a typo right in the subtitle.

More about codespell: https://github.com/codespell-project/codespell

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.

Changes

Configuration & Infrastructure

  • Added [tool.codespell] section in pyproject.toml with skip patterns for .git, .gitignore, .gitattributes, *.lock, .npm, .cache
  • Created GitHub Actions workflow (.github/workflows/codespell.yml) to check spelling on push/PRs to main
  • Added codespell hook to .pre-commit-config.yaml (with tomli dependency for Python < 3.11)

Domain-Specific Whitelist

  • nd - variable name for number of dimensions (for nd in ndimlist in SemanticModel.py)

Typo Fixes

Non-ambiguous typos fixed automatically (22 fixes in 11 files):
Common fixes include: concatinated -> concatenated (x3), posible -> possible (x3), arameters -> parameters (x2), specificed -> specified (x2), framwork -> framework, submiting -> submitting, mathc -> match, chanel -> channel, occuring -> occurring, featres -> features, swithch -> switch, continously -> continuously, diretory -> directory, encorders -> encoders, Boostrap -> Bootstrap, multipled -> multiplied, endocing -> encoding

Historical Context

This project has had 5 prior commits fixing typos manually, demonstrating the value of automated spell-checking.

Testing

Codespell passes with zero errors after all fixes.


Generated with Claude Code and love to typos free code

yarikoptic and others added 7 commits March 12, 2026 12:49
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e s,endocing,encoding,g README.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
…e-commit

- Add .npm,.cache to skip list (local cache dirs, not project files)
- Add 'nd' to ignore-words-list (variable for number of dimensions)
- Fix pre-commit comment to reference pyproject.toml (not .pre-commit-config.yaml)
- Add tomli dependency for pre-commit on Python < 3.11

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Code 2.1.63 / Claude Opus 4.6 <noreply@anthropic.com>
…despell

Fixed typos (22 fixes across 10 files):
- framwork -> framework (README.md)
- submiting -> submitting (hpc/README.md)
- mathc -> match (src/encoders/data.py)
- chanel -> channel (src/encoders/features.py)
- occuring -> occurring (src/encoders/features.py)
- featres -> features (src/encoders/plot.py)
- arameters -> parameters (src/encoders/plot.py, x2)
- posible -> possible (src/encoders/plot.py x2, run_all.py)
- concatinated -> concatenated (regression.py, run_all.py, run_all_replication.py)
- specificed -> specified (run_all.py, run_all_replication.py)
- swithch -> switch (src/encoders/run_all.py)
- continously -> continuously (src/encoders/run_all.py)
- diretory -> directory (src/encoders/utils.py)
- encorders -> encoders (run_all_replication.py)
- Boostrap -> Bootstrap (significance_testing.py)
- multipled -> multiplied (interpdata.py)

Co-Authored-By: Claude Code 2.1.63 / Claude Opus 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 ^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant