Skip to content

Enable codespell on book docs to catch typos/misspellings - #7245

Merged
philrz merged 7 commits into
mainfrom
codespell-on-book
Aug 26, 2026
Merged

Enable codespell on book docs to catch typos/misspellings#7245
philrz merged 7 commits into
mainfrom
codespell-on-book

Conversation

@philrz

@philrz philrz commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Now that some known typos/nits in the book docs have been addressed (#7234, #7236, #7242) here a Makefile target is added to invoke codespell so we'll get an early notice locally and in CI if new mistakes are made in future book edits, rather than catching each other's mistakes manually in PR review as we've done in the past.

This takes < ~0.4 seconds to run locally on my Intel Macbook, so it comes cheap.

Here's an example of what it looks like flagging an intentional mistake:

$ make -C book codespell
git ls-files -c -o --exclude-standard | xargs codespell -S src/tutorials/prs.json
src/intro.md:22: teh ==> the
make: *** [codespell] Error 1

Comment thread .github/workflows/ci.yaml Outdated
Comment thread .codespellrc Outdated
@philrz philrz self-assigned this Aug 25, 2026
@philrz
philrz requested a review from a team August 25, 2026 20:52
@philrz
philrz marked this pull request as ready for review August 25, 2026 20:52
Comment thread .github/workflows/markdown-lint.yaml
Comment thread .github/workflows/markdown-lint.yaml
@philrz
philrz requested a review from nwt August 26, 2026 15:38
Comment thread CONTRIBUTING.md Outdated
Comment thread Makefile Outdated
Comment thread book/Makefile Outdated
Comment thread Makefile Outdated
Comment thread .github/workflows/markdown-lint.yaml Outdated
run: make markdown-lint

- name: Spell check
run: pipx install codespell && make -C book codespell

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any reason to use pipx instead of pip?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nwt: The Python people cite it at https://packaging.python.org/en/latest/guides/installing-stand-alone-command-line-tools/ as a best practice, but I've confirmed that the GitHub Actions Linux Runners would still run this fine with regular pip. Would you prefer I make that change before I merge this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, might as well.

@philrz
philrz merged commit d8e38c6 into main Aug 26, 2026
4 of 5 checks passed
@philrz
philrz deleted the codespell-on-book branch August 26, 2026 23:24
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