Skip to content

Commit

Permalink
MNT: Add codespell configuration and infrastructure
Browse files Browse the repository at this point in the history
Adds codespell to our collection of linting tools.
  • Loading branch information
dopplershift committed Nov 4, 2024
1 parent 3849324 commit f5b67d7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
Empty file added .codespellexclude
Empty file.
1 change: 1 addition & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NAM
11 changes: 10 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,13 @@ jobs:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter
doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter
- name: Run codespell
# Don't skip codespell if any other steps fail
if: always()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
codespell | reviewdog -efm='%f:%l: %m' -name=codespell -reporter=github-check -filter-mode=nofilter
4 changes: 3 additions & 1 deletion ci/linting_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ flake8-requirements==2.2.1
flake8-rst-docstrings==0.2.7

doc8==1.0.0
restructuredtext_lint==1.4.0
restructuredtext_lint==1.4.0

codespell==2.3.0
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ extras = [
"Bug Tracker" = "https://github.com/Unidata/siphon/issues"
"Source Code" = "https://github.com/Unidata/siphon"

[tool.codespell]
skip = "*.ipynb,*.pdf,.git,./docs/build,./docs/examples,./tests/fixtures,./tests/cdmr/fixtures,AUTHORS.txt"
exclude-file = ".codespellexclude"
ignore-words = ".codespellignore"

[tool.doc8]
ignore-path = ["docs/build", "docs/api/generated", "docs/_templates", "docs/examples"]
file-encoding = "utf8"
Expand Down

0 comments on commit f5b67d7

Please sign in to comment.