[PR #1215] [MERGED] Centralize codespell config and add 1 more fix #1178

Closed
opened 2026-03-22 16:03:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1215
Author: @yarikoptic
Created: 3/7/2026
Status: Merged
Merged: 3/18/2026
Merged by: @profvjreddi

Base: mainHead: enh-codespell


📝 Commits (3)

  • fa1130d Add github action to codespell main on push and PRs
  • 966990b Add rudimentary codespell config
  • 408c0a1 Consolidate codespell config into pyproject.toml for standalone use

📊 Changes

5 files changed (+46 additions, -43 deletions)

View changed files

.codespell-ignore-words.txt (+0 -39)
.github/workflows/codespell.yml (+23 -0)
📝 .pre-commit-config.yaml (+4 -3)
📝 book/quarto/filters/inject_quizzes.lua (+1 -1)
📝 pyproject.toml (+18 -0)

📄 Description

Made codespell to be usable standalone and aggregated and expanded its config.
Also found/fixed 1 extra typo

Changes

Configuration & Infrastructure

  • fa1130d76 Add github action to codespell main on push and PRs
  • 966990b97 Add rudimentary codespell config
  • 408c0a13c Consolidate codespell config into pyproject.toml for standalone use

What the consolidated config does

  • pyproject.toml is now the single source of truth — run codespell or uvx codespell standalone
  • Pre-commit hook updated to use pyproject.toml config (removed custom args overrides), bumped to v2.4.1
  • Removed .codespell-ignore-words.txt (had merge conflict markers; contents merged into pyproject.toml)

Skip patterns

  • *.bib (author surnames cause false positives), *.png (embedded text), *.scss
  • _extensions (third-party Quarto extension code with German variable names)
  • socratiQ (bundled JS), build outputs (_site, _book, htmlcov), caches (.cache, .npm)

Exclusions relaxed vs old pre-commit config

  • *.json — only .all-contributorsrc skipped now (not all JSON)
  • *.js — only socratiQ skipped now (not all JS)
  • *.tex — only _extensions skipped now (not all TeX)

Ignore patterns

  • camelCase/PascalCase regex for code identifiers (TikZ labels like ALine, LineZ, localY)
  • URL regex to protect links from corrections
  • 27 documented words in ignore-words-list (contributor names, abbreviations, domain terms)

Typo fix

  • akumulatorsaccumulators in inject_quizzes.lua

Testing

uvx codespell passes with zero errors


🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1215 **Author:** [@yarikoptic](https://github.com/yarikoptic) **Created:** 3/7/2026 **Status:** ✅ Merged **Merged:** 3/18/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `main` ← **Head:** `enh-codespell` --- ### 📝 Commits (3) - [`fa1130d`](https://github.com/harvard-edge/cs249r_book/commit/fa1130d7664204a7d45577b99bd694ed11044aa8) Add github action to codespell main on push and PRs - [`966990b`](https://github.com/harvard-edge/cs249r_book/commit/966990b9737a4daa30fd0e53ee83244525ca9dcd) Add rudimentary codespell config - [`408c0a1`](https://github.com/harvard-edge/cs249r_book/commit/408c0a13cee40bd2e5d69122ccadc795a3cf230f) Consolidate codespell config into pyproject.toml for standalone use ### 📊 Changes **5 files changed** (+46 additions, -43 deletions) <details> <summary>View changed files</summary> ➖ `.codespell-ignore-words.txt` (+0 -39) ➕ `.github/workflows/codespell.yml` (+23 -0) 📝 `.pre-commit-config.yaml` (+4 -3) 📝 `book/quarto/filters/inject_quizzes.lua` (+1 -1) 📝 `pyproject.toml` (+18 -0) </details> ### 📄 Description Made codespell to be usable standalone and aggregated and expanded its config. Also found/fixed 1 extra typo ## Changes ### Configuration & Infrastructure - fa1130d76 `Add github action to codespell main on push and PRs` - 966990b97 `Add rudimentary codespell config` - 408c0a13c `Consolidate codespell config into pyproject.toml for standalone use` ### What the consolidated config does - **pyproject.toml** is now the single source of truth — run `codespell` or `uvx codespell` standalone - Pre-commit hook updated to use pyproject.toml config (removed custom args overrides), bumped to v2.4.1 - Removed `.codespell-ignore-words.txt` (had merge conflict markers; contents merged into pyproject.toml) ### Skip patterns - `*.bib` (author surnames cause false positives), `*.png` (embedded text), `*.scss` - `_extensions` (third-party Quarto extension code with German variable names) - `socratiQ` (bundled JS), build outputs (`_site`, `_book`, `htmlcov`), caches (`.cache`, `.npm`) ### Exclusions relaxed vs old pre-commit config - `*.json` — only `.all-contributorsrc` skipped now (not all JSON) - `*.js` — only `socratiQ` skipped now (not all JS) - `*.tex` — only `_extensions` skipped now (not all TeX) ### Ignore patterns - camelCase/PascalCase regex for code identifiers (TikZ labels like `ALine`, `LineZ`, `localY`) - URL regex to protect links from corrections - 27 documented words in ignore-words-list (contributor names, abbreviations, domain terms) ### Typo fix - `akumulators` → `accumulators` in `inject_quizzes.lua` ## Testing ✅ `uvx codespell` passes with zero errors --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 16:03:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#1178