-
Notifications
You must be signed in to change notification settings - Fork 142
Miscellaneous Spell Checks + Potential Typo-Checking PR #824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Ran ``` typos --words --config=typos.toml | sort -u | hunspell -p hunspell_whitelist - ``` and manually fixed. `hunspell` is from apt's `hunspell hunspell-en-us` and `typos` from https://github.com/crate-ci/typos
Runs `hunspell` spell checker on each PR, using `typos` as a tokenizer. It uses `docs/typos.toml` to ignore certain file types and the `hunspell_whitelist` for correct words (/tokens) not in the default dictionary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Many of these typos have been bugging me for a long time.
I'm not sure it needs to be run automatically but others should weigh in.
I found only
- two sets of comments/textual correcting to the wrong words
- one code false correction (which would break everything 👎 )
|
Do please point your PR at the |
Changed to programmatically
Changed lines 34, 35, 36 to planning instead of planing
Changed BffExpr to AffExpr
|
Caught up on the recent But don't know what the feeling is on it automatically running on PR's. There were some amount of typos in the Allam cycle push, which points towards having it in PR. But, unless the whitelist is maintained, it can quickly get annoying. And I'd want to make it so it only checks files which are changed within-PR so it isn't spamming a PR with unrelated typos. I don't mind setting an every-so-often reminder to rerun it myself and opening a PR, but it could mean more periodic PR's I was also trying to think of a way to programatically find changes which were in the code not strings to examine much closer, to avoid a future |
|
Thanks so much @JZL for this PR! |
|
Cool I think we're on the same page :-). I can make the scheduled GH PR directly from my commit above. Barring it being too annoying, I have a slight preference for weekly/monthly scheduled because when there are lots of separate typos, it can be pretty time consuming to do. But I'll assign the scheduled PR's to myself! For the on-PR feedback, as a low priority task, I'd like to see if I can get the CI to give non-blocking feedback on PR's (maybe an automated comment after it runs?) and have it only check the PR's specific changed files (to avoid cascading false positives). If I can figure it out reliably with the |
|
The plan sounds great to me (weekly checks work well)! Thanks @JZL. Feel free to assign it to both of us, it shouldn't take too long. Maybe we can also put together a short guide and see if an Agent can automate it :) Regarding the second GH workflow (just in case it’s helpful) I was thinking of something similar to the format check we used to have. That action used reviewdog to perform the review and leave GH comments directly on the PR. |
Hi
This is an (almost entirely) cosmetic PR which corrects some miscellaneous spelling and drafts a github workflow to add spell-checking to PR's.
In the first commit, there are only two changes in the code not comments/docs:
'decsending':
https://github.com/GenXProject/GenX.jl/compare/main...JZL:GenX.jl:main?expand=1#diff-3e1f1a69aa608c8d13fdc9a7d5914c977cb05adab35375d068cf13d1502795a0L323
'realtive': https://github.com/GenXProject/GenX.jl/compare/main...JZL:GenX.jl:main?expand=1#diff-98c77a10644c3370e15c36edcecf9de57ae641903d7511a9ab7b8c53b109f357L29
but which should only affect those blocks.
In the second commit, I added a github workflow which runs the same commands automatically. However there will almost certainly be false-positives due to how stringently
hunspellchecks, which the committer would have to manually add to the whitelist. I don't want to annoy people. I'm equally happy to automate periodically running the commands on my own side (or even make a github action which runs on a schedule, opening a new PR if it finds typos).If we do think adding a workflow is a good idea, it might be best to only run on the files changed within the PR. Otherwise, if one PR/commit adds a typo, it will error on all future PR until it's fixed.
Here's an example on my branch of the bot
What type of PR is this? (check all applicable)
Checklist
How this can be tested
Only cosmetic doc/comment changes. I will read through one more time to make sure I didn't inadvertently change actual code.
Post-approval checklist for GenX core developers
After the PR is approved