From 45d0318ae6ce230cdb33c38945c7be8c8a4e4cf9 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Tue, 16 Jul 2024 06:17:20 -0700 Subject: [PATCH] Gh workflow for spelling errors (#265) * Gh workflow for spelling errors * add files to check --- .github/workflows/check-spelling-errors.yml | 30 +++++++++++++++++++++ .pre-commit-config.yaml | 17 ------------ 2 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/check-spelling-errors.yml delete mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/check-spelling-errors.yml b/.github/workflows/check-spelling-errors.yml new file mode 100644 index 00000000..37d76b5e --- /dev/null +++ b/.github/workflows/check-spelling-errors.yml @@ -0,0 +1,30 @@ +name: Spell Check + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + spellcheck: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install codespell + run: | + python -m pip install --upgrade pip + pip install codespell + + - name: Run codespell + run: | + codespell -L "ocassion,occassion,ot,te,tje" **/*.{txt,md,py,ipynb} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index f1d78be3..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# A tool used by developers to identify spelling errors in text. -# Readers may ignore this file. - -default_stages: [commit] - -repos: - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - name: codespell - description: Check for spelling errors in text. - entry: codespell - language: python - args: - - "-L ocassion,occassion,ot,te,tje" - files: \.txt$|\.md$|\.py|\.ipynb$