Add an optional en-GB-oxendict spelling gate (default on)#27
Conversation
Generated repositories now enforce en-GB Oxford ("-ize") spelling in
documentation, mechanizing the mandate the generated documentation
style guide already carries. The mechanism follows stilyagi commit
ee77d08a19bc9c1107f30fc2b5bb63ced979fbc4, taking the generator and its
test module from the leynos/netsuke import (which includes the parse
tests from stilyagi issue #57 so duplicate extend-words keys fail
fast):
- new copier boolean en_gb_oxendict (default true) gates every piece
via conditional filenames and in-file blocks; toggle-off renders
carry no trace;
- scripts/generate_typos_config.py renders typos.toml (committed,
generated by running the templated generator) with the two-layer
design: the en-gb locale plus generated extend-words entries
restoring Oxford -ize;
- tests/test_generate_typos_config.py rides the generated pytest
suite, including the drift check and the issue #57 tomllib parse
tests (with a tomli fallback for pre-3.11 baselines);
- the Makefile markdownlint target gains a pinned
`uv tool run typos@$(TYPOS_VERSION)` pass, and the generated CI
gains a "Lint documentation" step calling make markdownlint;
- AGENTS.md and the developers' guide document the gate, regeneration,
and where to add stems or accepted words.
Wiring the docs-lint target into CI surfaced pre-existing markdownlint
failures in rendered output (blank-line residue from untrimmed Jinja
blocks in AGENTS.md and README.md, and an over-length line in the
developers' guide); these are fixed so the new gate passes. The typos
gate itself flagged twelve genuine spelling errors in rendered prose
(afterward, summarise, artifact(s), signaling, serialisation,
standardised, emphasises, parameterised, parameterisation), which are
corrected, and one verbatim citation title now carried by an
extend-ignore-re entry.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 14 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Generated repositories now enforce en-GB Oxford ("-ize") spelling in documentation via a
typosgate, mechanizing the mandate the generated documentation style guide already carries. The feature is a copier option, default enabled.Provenance
ee77d08a19bc9c1107f30fc2b5bb63ced979fbc4— the two-layertypos.tomldesign (theen-gblocale corrects American spellings; generatedextend-wordsentries restore Oxford-ize), theTYPOS_VERSIONsingle source of truth, and theuv tool run typos@$(TYPOS_VERSION)join onto themarkdownlintgate.enforce-oxendict-spelling), which carries the fix for stilyagi issue #57 — parse-based tests:tomllib.loads()ofrender_config()asserting the exact extend-words count (len(EXTRA_ACCEPTED_WORDS) + 2*len(STEMS)*len(SUFFIX_PAIRS)), so duplicate keys fail fast at generation time, plus a parse of the committedtypos.toml.Toggle semantics
New copier boolean
en_gb_oxendict(defaulttrue). Everything is gated with the template's own conditional mechanisms — conditional filenames for whole files ({% if en_gb_oxendict %}scripts{% endif %}/generate_typos_config.py,{% if en_gb_oxendict %}typos.toml{% endif %}, the test module) and in-file blocks for the Makefile, CI, pyproject, AGENTS.md, and developers'-guide fragments. Toggle-off renders contain no trace (verified: zerotyposmentions), and the toggle composes withuse_rust(all four combinations render clean).What generated repositories get
scripts/generate_typos_config.py— netsuke's generator, minimally adapted: generic accepted-words list (netsuke-specific entries dropped),requires-python >= 3.10to match the template floor, and anextend-ignore-reentry for a verbatim citation title in the generated docs.typos.toml— committed artefact generated by running the templated generator (1,766 extend-words entries; drift-checked by the test suite).tests/test_generate_typos_config.py— rides the generated pytest suite (testpaths = ["tests"]), including the #57 parse tests and the committed-file drift check. Usestomllibwith atomlidev-group fallback (tomli; python_version < '3.11') so pre-3.11 baselines typecheck and run.TYPOS_VERSION ?= 1.48.0single source of truth;make markdownlintruns markdownlint thenfind … | xargs -0 env $(UV_ENV) uv tool run typos@$(TYPOS_VERSION) --config typos.toml --force-exclude(stilyagi'sMD_FILES_FINDpattern, with the Rust target directory excluded foruse_rustvariants).ci.ymldid not previously run the docs-lint target, so aLint documentationstep callingmake markdownlintis wired in (gated on the toggle).Spelling and lint fixes surfaced by the gate
Wiring
make markdownlintinto CI surfaced pre-existing failures in rendered output, now fixed: MD012 blank-line residue from untrimmed Jinja blocks inAGENTS.md.jinjaandREADME.md.jinja, and an MD013 over-length line in the developers' guide. Runningtyposover rendered docs flagged twelve genuine errors, corrected in template prose:afterward→afterwards,summarise→summarize,parameterisation→parameterization(AGENTS.md);artifact(s)→artefact(s)×3 (developers' guide);signaling→signalling(complexity guide — the same fix stilyagi made);serialisation→serialization,standardised→standardized,emphasises→emphasizes,parameterised→parameterized(.rules/). One verbatim citation title ("… Azure Architecture Center | Microsoft Learn") is carried by anextend-ignore-reentry rather than a prose change.Validation
en_gb_oxendict×use_rust): files present/absent exactly per toggle;mbake validate Makefilepasses in both states; renderedci.ymlpasses actionlint in all states.markdownlint-cli2clean;uvx typos@1.48.0 --config typos.toml --force-excludeclean over all rendered Markdown (both pure and Rust variants);make markdownlintexercised end-to-end; committedtypos.tomltomllib-parses with the expected 1,766 entries and matches generator output.make check-fmt,make lint(ruff, interrogate 100%, pylint 10/10),make typecheck(ty), and pytest (9 passed, including the 8 generator tests).make helpsnapshot updated for the new target description.🤖 Generated with Claude Code