8000 pre-commit hook for codespell by cyschneck · Pull Request #579 · NCAR/geocat-comp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pre-commit hook for codespell #579

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

Merged
merged 2 commits into from
Mar 19, 2024
Merged

pre-commit hook for codespell #579

merged 2 commits into from
Mar 19, 2024

Conversation

cyschneck
Copy link
Contributor
@cyschneck cyschneck commented Mar 18, 2024

PR Summary

Closes #578

PR Checklist

General

  • Make an issue if one doesn't already exist
  • Link the issue this PR resolves by adding closes #XXX to the PR description where XXX is the number of the issue.
  • Add a brief summary of changes to docs/release-notes.rst in a relevant section for the next unreleased release. Possible sections include: Documentation, New Features, Bug Fixes, Internal Changes, Breaking Changes/Deprecated
  • Add appropriate labels to this PR
  • Make your changes in a forked repository rather than directly in this repo
  • Open this PR as a draft if it is not ready for review
  • Convert this PR from a draft to a full PR before requesting reviewers
  • Passes precommit. To set up on your local, run pre-commit install from the top level of the repository. To manually run pre-commits, use pre-commit run --all-files and re-add any changed files before committing again and pushing.
  • If needed, squash and merge PR commits into a single commit to clean up commit history

@cyschneck cyschneck added the developer feature For development standardization / best practices / enhancement label Mar 18, 2024
@cyschneck cyschneck self-assigned this Mar 18, 2024
@cyschneck cyschneck marked this pull request as ready for review March 18, 2024 20:49
@anissa111
Copy link
Member

This seems reasonable, but I have one discussion point. The rest of our pre-commits use --in-place or -w flags, so that they fix everything automatically on commit locally. Should we also use the -w flag here?

I could see either side, either updating it to match the behavior of the pre-commits or leaving it to manual correction to prevent unexpected changes of purposeful non-standard spellings.

@cyschneck
Copy link
Contributor Author

I think current/future work will probably include some jargon specific words that automatically changing will cause unexpected errors once committed that could be confusing to try and fix after the fact. yapf auto formatting isn't likely to impact behavior but changing a word in a string or variable name could. I included an update in the contributing guide about how to handle jargon words to pass this pre-commit stage

Copy link
Contributor
@kafitzgerald kafitzgerald left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Looks good to me and happy to adapt to edge cases as we go if need be.

@anissa111
Copy link
Member

I think current/future work will probably include some jargon specific words that automatically changing will cause unexpected errors once committed that could be confusing to try and fix after the fact. yapf auto formatting isn't likely to impact behavior but changing a word in a string or variable name could. I included an update in the contributing guide about how to handle jargon words to pass this pre-commit stage

Sounds good to me!

@anissa111 anissa111 merged commit 70c8087 into NCAR:main Mar 19, 2024
@cyschneck cyschneck deleted the codespell_578 branch March 19, 2024 19:54
anissa111 pushed a commit to anissa111/geocat-comp that referenced this pull request Mar 29, 2024
* pre-commit hook for codespell, spelling fixes

* update release-notes.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer feature For development standardization / best practices / enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add codespell to pre-commit hooks
3 participants
0