Skip to content

Add spell check GitHub Action#553

Merged
kellertuer merged 8 commits intoJuliaManifolds:masterfrom
JoshuaLampert:typos
Nov 29, 2025
Merged

Add spell check GitHub Action#553
kellertuer merged 8 commits intoJuliaManifolds:masterfrom
JoshuaLampert:typos

Conversation

@JoshuaLampert
Copy link
Copy Markdown
Contributor

@JoshuaLampert JoshuaLampert commented Nov 28, 2025

I noticed some typos. So I added a GitHub action, which automatically detects typos. Is this something you want?
Edit: It detected 152 typos. Some of them are false positives, which can be ignored in a .typos.toml file.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7373e5b) to head (079935e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #553   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           91        91           
  Lines         9976      9976           
=========================================
  Hits          9976      9976           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kellertuer
Copy link
Copy Markdown
Member

I di not do typos ;)

No it is great to have something like that I think. Thanks!

A major decision is then, which one to take. For quite a while I am already experimenting with vale.sh, cf https://vale.sh, that even goes a bit beyond pure spell checking. I did run it on the docs and doc strings – but it not always found all of them and I think also struggled with doc strings.

For example, when currently running vale on the folder (it is set up but not run on CI for obvious reasons) It mainly reports that some authors names are wrong words. That it does not fine the ones yours finds, is probably because it struggles to “look into strings”

Which tools is the current one here based on? It has a few false positives, like

error: `Nd` should be `And`
   ╭▸ ./joss/paper.md:85:75
   │
85 │ $$ \operatorname*{arg\,min}_{x\in\mathcal M}\quad \displaystyle\sum_{k=1}^Nd_{\mathcal M}(x, p_k)^2, $$
   ╰╴   

(which, sure, can be fixed adding a space between N and d).

So yes, lets have something like this, the question is just a bit – what ;)

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

I did not know about vale. The one I use here is based on https://github.com/crate-ci/typos. As far as I can tell, it is relatively widely used, also in the Julia community. The false positive are easy to fix by telling typos to the ignore certain patterns.

@kellertuer
Copy link
Copy Markdown
Member

I will take a look ,especially also for ignore patterns, since that often includes names of people and such.

@kellertuer
Copy link
Copy Markdown
Member

Im, I have the cli now locally here and check it a bit. I fear that there are a lot a lot of false posivites – so the opposite of vale which ignored code and string, we here get things like

error: `als` should be `also`
    ╭▸ ./src/plans/stepsize/stepsize.jl:154:35
    │
154 │             sufficient_decrease=$(als.sufficient_decrease),
    ╰╴   

where, no, als is the variable name and short for a concrete variable of type ArmijoLinesearchStepsize.

@kellertuer
Copy link
Copy Markdown
Member

It also has a few ones of the form

error: `Annote` should be `Annotate`
    ╭▸ ./tutorials/InplaceGradient.html:618:21
    │
618 │         if (selectedAnnoteEl) {
    ╰╴     

which is in autogenerated code I do not even want to edit. I am not yet sure how much work it is to also add words like “Florida” or paper titles we have in French... Looks like a bit of work I have to think about.

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

Ok, if you think it would be too much work to make exceptions for the false positives, we could also not add the Action, but just fix the true positive it found. Then one could run it manually again from time to time to fix new typos.

@kellertuer
Copy link
Copy Markdown
Member

I fixed a few actual typos, but I am simply not yet sure how to handle most of the false positives, especially when we use abbreviated variables names like nd or als

Comment thread _typos.yml Outdated
@kellertuer
Copy link
Copy Markdown
Member

Fnord!

❯ typos
error: `sur` should be `sure`
  ╭▸ ./_typos.yml:2:1
  │
2 │ sur = "sur" # french
  ╰╴━━━

it now recognises that Sur is a wrong word in its own config file? This is all a bit too complicated for me. Should I also write a config file for the config file? But what for the typos in there? 🥸

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

I think the only thing you need to do is to rename _typos.yml to .typos.toml😉

@kellertuer
Copy link
Copy Markdown
Member

kellertuer commented Nov 28, 2025

I did most of the afternoon just these stupid bug hunting, merge conflict (on other things), typos,...

brain is now in fried mode – hope the renaming did the job then.

@kellertuer
Copy link
Copy Markdown
Member

Spell check here looks fine. We should carefully check the contributions.md file and take a look whether we can add a badge or so

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

Looks good. Thanks a lot for cleaning this up! And sorry for letting you spend so much time on it 🙈

@kellertuer
Copy link
Copy Markdown
Member

On the other side, it is nice to have less typos and even an action for it. We still have to update metadata; like the contributing.md

@kellertuer
Copy link
Copy Markdown
Member

So. I also added a short note to the news and the contributing.md – from my side this is good to go.

@JoshuaLampert
Copy link
Copy Markdown
Contributor Author

Great! Thanks again!

@kellertuer kellertuer merged commit 0ab9a4b into JuliaManifolds:master Nov 29, 2025
15 checks passed
@JoshuaLampert JoshuaLampert deleted the typos branch November 29, 2025 11:49
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