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

Instructions for adding Codespell to pre-commit #173

Closed
bobleesj opened this issue Oct 31, 2024 · 1 comment
Closed

Instructions for adding Codespell to pre-commit #173

bobleesj opened this issue Oct 31, 2024 · 1 comment

Comments

@bobleesj
Copy link
Collaborator

bobleesj commented Oct 31, 2024

Problem

We want to minimize our time to identify typos. It is a part of the release checklist items.

Solution

Catch typos by running pre-commit run --all-files. Ex) diffpy/diffpy.srmise#148

Please follow the instructions (will take 2-10 mins):

Instructions

  1. Create two new files in your repository: .codespell/ignore_words.txt and .codespell/ignore_lines.txt. Copy these from https://github.com/Billingegroup/cookiecutter/tree/main/{{ cookiecutter.repo_name }}/.codespell.

  2. Update your pre-commit-config.yaml using the latest template at https://github.com/Billingegroup/cookiecutter/blob/main/{{ cookiecutter.repo_name }}/.pre-commit-config.yaml

  3. Add the [tool.codespell] section to your package's pyproject.toml file. Use the example at https://github.com/Billingegroup/cookiecutter/blob/main/{{ cookiecutter.repo_name }}/pyproject.toml

Example: please cross-check with diffpy.snmf: diffpy/diffpy.snmf#121

For news/codespell.rst, one could write:

**Added:**

* Spelling check via Codespell in pre-commit

How to ignore words/lines/files

For customization instructions, please refer to Pre-commit workflow Step 13 in https://github.com/Billingegroup/cookiecutter/blob/main/README.md

This was referenced Oct 31, 2024
@bobleesj
Copy link
Collaborator Author

Closing - srfit, pdfgui, srreal need to be re-cookiecuttered.

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

No branches or pull requests

1 participant