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
Replace codespell
with pyspelling
#663
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
internal
To filter out internal PRs and issues
bug
Something isn't working
labels
May 30, 2022
schustmi
approved these changes
Jun 1, 2022
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.
LGTM!
AlexejPenner
approved these changes
Jun 1, 2022
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.
Luuks Gud tu mi!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR Quick Summary:
pyspelling
codespell
.pyspelling-ignore-words
We use
pyspelling
at ZenML to guard against typos and other non-standard uses of words being used in our codebase. (We previously usedcodespell
for this but it only checked against a known list of typos and therefore missed lots of errors).It takes one or two minutes to run a
pyspelling
check over the entire codebase, unfortunately, so this spellcheck only runs at the Github Action CI level by default. (In other words, it is no longer part of ourpre-commit
checks.)If you wish to run the spellchecks manually on your local machine, first install
aspell
(usingbrew
orapt-get
), runpoetry update
to get the relevant dependency and then simply use:Note that there are some quirks / less-than-ideal realities of working with
pyspelling
:codespell
was.md
markdown filesWhen spelling errors are detected, it won’t suggest an alternative (as
codespell
did) so you’ll have to examine your text to see whether it’s a legitimate failure or not. If you find a word that is legitimate and not a typo, you will need to add it to our list of ignored words:.pyspelling-ignore-words
. As you’ll note, this file is already fairly long. Just add your word onto a new line anywhere. If you want to sort it at the end, you can runsort -o .pyspelling-ignore-words .pyspelling-ignore-words
on a *nix machine but no need to do that forpyspelling
to work.June 2022 UPDATE:
pyspelling
is currently only added on thezenml
repo, but I’ll likely add it to all the other key repos (ZenBytes, ZenFiles, Blog) in due course once we’ve ironed out any issues.(This note is currently captured in Notion as well, for future reference).
Pre-requisites
Please ensure you have done the following:
Types of changes