Skip to content
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

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #1126

Merged
merged 9 commits into from
Dec 2, 2024

Conversation

yarikoptic
Copy link
Contributor

@yarikoptic yarikoptic commented Oct 26, 2024

More about codespell: https://github.com/codespell-project/codespell .

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.

TODO

  • remove TEMP commit and potentially codespell workflow

@jeromedockes
Copy link
Member

thanks a lot @yarikoptic ! no objections on my side, seems like a nice addition but I don't have experience with codespell, maybe @glemaitre has an opinion about adding the workflow or not? IIRC in nilearn we use the precommit hook but not the github workflow

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./skrub/_gap_encoder.py ./benchmarks/utils/monitor.py",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
there is outstanding bug in codespell so not all excludes
are in effect while running codespell for pre-commit. So we need
to list this one explicitly
@yarikoptic yarikoptic marked this pull request as ready for review October 28, 2024 13:04
@yarikoptic
Copy link
Contributor Author

Thanks for triggering actions. I saw that pre-commit did pick up that intentionally added typo, so indeed no separate action is needed. Removed now. Also added explicit exclude for pre-commit of the package-lock.json : ref codespell-project/codespell#3196

@glemaitre
Copy link
Member

We have codespell correction in scikit-learn but we did not put it as a pre-commit. But it might be OK just to use as a pre-commit hook.

@jeromedockes jeromedockes added CI / build Continuous integration and build no changelog needed labels Nov 29, 2024
Copy link
Member

@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @yarikoptic !

@Vincent-Maladiere Vincent-Maladiere merged commit c74b0c0 into skrub-data:main Dec 2, 2024
25 checks passed
@jeromedockes
Copy link
Member

nice! Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI / build Continuous integration and build no changelog needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants