Skip to content

Add codespell support with configuration and fixes#20

Merged
fabriciocravo merged 4 commits into
ROBACON:mainfrom
yarikoptic:enh-codespell
Jun 21, 2026
Merged

Add codespell support with configuration and fixes#20
fabriciocravo merged 4 commits into
ROBACON:mainfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic

Copy link
Copy Markdown
Contributor

Add codespell configuration, a GitHub Actions workflow that runs it on every push and PR, and fix the existing typos it detected.

I've personally introduced codespell to over a hundred of projects already mostly with positive feedback (see the "improveit-dashboard" for an example summary). The CI workflow has permissions: contents: read and uses a pinned action SHA, so it should be safe.

Changes

Configuration & Infrastructure

  • .codespellrc with skip patterns (.git, .git-meta, .gitignore, .gitattributes, *.svg, .codespellrc), check-hidden = true, and an ignore-regex that skips embedded base64 images in notebook JSON.
  • .github/workflows/codespell.yml — runs codespell on push and PRs to main, pinned to codespell-project/actions-codespell@8f01853... (v2.2).

Domain whitelist

  • inactivate — added to ignore-words-list because it is a valid English (and biology) term used in docs/example_models/application_models/NOR_gate.py ("any of them can inactivate the Promoter"). Codespell incorrectly suggested replacing it with "deactivate".

Typo fixes

Ambiguous (manually fixed with context review) — 2 fixes:

  • procededproceed in mobspy/modules/logic_operator_objects.py:38 (auxiliary "should" + infinitive: "string analysis should proceed")
  • thorughthrough in mobspy/plot_scripts/hierarchical_plot.py:40 (preposition: "looping through all of them")

Non-ambiguous (applied automatically via codespell -w) — 26 fixes across 21 files. Common ones:

  • bellowbelow (5×)
  • acessaccess (3×)
  • apearappear (2×)
  • IndepedentIndependent, FuthermoreFurthermore, conterpartscounterparts
  • charcteristic, characteritics, Characteriticscharacter(istic[s])
  • reapeatrepeat, debbugingdebugging, writtingwriting
  • generetesgenerates, paramtersparameters, experimetnsexperiments
  • staticsstatistics (in a comment only; the variable plots_for_spe_i_sta is unchanged)
  • PLOTINGPLOTTING, adddingadding

All fixes are in comments, docstrings, markdown cells, and section headers. No regex patterns, variable names, or code identifiers were modified.

Historical context

There have been a handful of prior commits in this repo manually fixing typos (607b3f3, 30527eb, ae895e6, 0a18615), which is exactly the kind of churn an automated check eliminates going forward.

Testing

  • uvx codespell passes with exit code 0 after all fixes.
  • All non-ambiguous fixes were produced by codespell -w wrapped in datalad run, so the exact command is recorded in the commit metadata and can be re-run with datalad rerun.

🤖 Generated with Claude Code and love to typo-free code

yarikoptic and others added 4 commits June 15, 2026 15:24
Two ambiguous typos required context review:
- proceded -> proceed in logic_operator_objects.py:38
  (auxiliary "should" + infinitive: "string analysis should proceed")
- thorugh -> through in hierarchical_plot.py:40
  (preposition: "looping through all of them")

Also added 'inactivate' to ignore-words-list in .codespellrc -- it is
a valid English/biology term used in the NOR_gate.py example
("any of them can inactivate the Promoter"); codespell incorrectly
suggested "deactivate".

Co-Authored-By: Claude Code 2.1.177 / Claude Opus 4.7 <noreply@anthropic.com>
Fixed 26 typos across 21 files:
- Indepedent -> Independent (README.md)
- conterparts -> counterparts (Synchronized_Cycles_of_Bacterial_Lysis.py)
- charcteristic, characteritics -> character(istic,istics) (01_Basic_Intro.ipynb)
- bellow/Bellow -> below/Below (5 occurrences: tutorial nb 01/18/20,
  compiler_operator_functions.py, meta_class.py:1031, order_operators.py)
- acess -> access (3 occurrences: 01_Basic_Intro.ipynb, 09_Result_Data.ipynb,
  hierarchical_plot.py)
- Futhermore -> Furthermore (11_Looping_Through_Species.ipynb)
- reapeat -> repeat (simulation.py)
- Characteritics -> Characteristics (compiler.py)
- apear -> appear (function_rate_code.py, logic_operator_objects.py)
- debbuging -> debugging (meta_class.py)
- writting -> writing (mobspy_expressions.py)
- generetes -> generates (species_string_generator.py)
- paramters -> parameters (parameters/README.md)
- experimetns -> experiments (basico_task_parametrization.py)
- statics -> statistics (default_plots.py)
- PLOTING -> PLOTTING (hierarchical_plot.py)
- addding -> adding (sbml_simulator/run.py)

Co-Authored-By: Claude Code 2.1.177 / Claude Opus 4.7 <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 ^^^
@fabriciocravo fabriciocravo self-requested a review June 21, 2026 07:11

@fabriciocravo fabriciocravo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Only typo fixes, no code was changed

@fabriciocravo fabriciocravo merged commit a6f4310 into ROBACON:main Jun 21, 2026
1 of 2 checks passed
@fabriciocravo

Copy link
Copy Markdown
Collaborator

Thank you for your contribution Yaroslav. I do tend to make a massive amount of typos.

The workflow application appears to be an import error. I will fix it in the next commit. The typo checker is not an issue and should be added.

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.

2 participants