British-english spell checking of markdown and notebooks - #2837
British-english spell checking of markdown and notebooks#2837erikvansebille wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
One of the difficulties with this is that it only checks part of the codebase (i.e., prose).
Not code variable/parameter names, not docstrings, and not comments.
To what degree we want spellchecking is worth considering. Perhaps CSpell would be a better option.
Happy to merge if you think its helpful (the tooling is orthogonal anyway). Merging the corrections themselves is already good.
| with: | ||
| name: Mypy report | ||
| path: mypy-report | ||
| spell-check-tutorial-prose: |
There was a problem hiding this comment.
| spell-check-tutorial-prose: | |
| qaqc: |
| name: Mypy report | ||
| path: mypy-report | ||
| spell-check-tutorial-prose: | ||
| name: "Documentation: pixi run docs-spelling" |
There was a problem hiding this comment.
| name: "Documentation: pixi run docs-spelling" | |
| name: "Additional QAQC (separate to pre-commit - pixi run more-qaqc)" |
| "docs-only-clean", | ||
| ] } | ||
| docs-linkcheck = { cmd = "make linkcheck", cwd = "docs", description = "Verify all links in documentation don't 404." } | ||
| docs-spelling = { cmd = "python tools/lint_british_english.py docs/user_guide/examples/tutorial*.ipynb docs/user_guide/examples/tutorial*.md docs/user_guide/getting_started/tutorial*.ipynb docs/user_guide/getting_started/tutorial*.md", description = "Check tutorial prose uses British English." } |
There was a problem hiding this comment.
| docs-spelling = { cmd = "python tools/lint_british_english.py docs/user_guide/examples/tutorial*.ipynb docs/user_guide/examples/tutorial*.md docs/user_guide/getting_started/tutorial*.ipynb docs/user_guide/getting_started/tutorial*.md", description = "Check tutorial prose uses British English." } | |
| docs-spelling = { cmd = "python tools/lint_british_english.py docs/user_guide/examples/tutorial*.ipynb docs/user_guide/examples/tutorial*.md docs/user_guide/getting_started/tutorial*.ipynb docs/user_guide/getting_started/tutorial*.md", description = "Check tutorial prose uses British English." } | |
| more-qaqc = { depends-on = ["docs-spelling"], description = "Additional QAQC tooling separate to pre-commit hooks" } |
| hooks: | ||
| - id: vale | ||
| name: Vale British-English tutorial prose | ||
| files: ^docs/user_guide/(examples|getting_started)/tutorial.*\.md$ |
There was a problem hiding this comment.
I suggest we remove this in favour of using the GitHub action (avoiding doubling up on the file selection).
| by any developer or user, so the documentation teaches all of us how to do something with Parcels. Sometimes it can be | ||
| more natural to take on the tone of a teacher, writing to a student/learner, in which case it is okay to use "you". | ||
| Please refrain from using impersonal subjects such as "the user". | ||
| - **Use British English in tutorial prose.** The Vale check covers Markdown files and Markdown cells in tutorial |
There was a problem hiding this comment.
| - **Use British English in tutorial prose.** The Vale check covers Markdown files and Markdown cells in tutorial | |
| - Use British English. This is validated by a spellchecker that is run in CI. |
Remove "in tutorial prose"? (from what we discussed this was intended to be a codebase-wide policy)
Description
This PR uses vale.sh to implement British-English spelling rules for only the markdown files and markdown notebooks cells - and checks these in pre-commit using the new
pixi run docs-spelling.So far, it seems 'light; in the sense that it only targets markdown and not code. Is this what we want, @VeckoTheGecko?
Checklist
mainfor normal development,v3-supportfor v3 support)AI Disclosure