diff --git a/.github/workflows/languagetool.yml b/.github/workflows/spelling.yml similarity index 60% rename from .github/workflows/languagetool.yml rename to .github/workflows/spelling.yml index 603c7ffe..32dd7573 100644 --- a/.github/workflows/languagetool.yml +++ b/.github/workflows/spelling.yml @@ -1,5 +1,5 @@ # Check for common grammar and spelling mistakes -name: LanguageTool +name: Spelling on: pull_request: @@ -23,3 +23,19 @@ jobs: reporter: github-pr-review patterns: '*.md src/**.rs python/differt/**.py docs/source/**.md docs/source/**.ipynb' level: warning + + codespell-jupyer: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Strip cell output + run: | + pip install nbstripout + find . -name '*.ipynb' -exec nbstripout {} + + + - name: Run codespell + run: | + pip install codespell tomli + find . -name '*.ipynb' -exec codespell {} + \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff3f687e..b2a0d3d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,10 +68,4 @@ repos: - id: codespell additional_dependencies: - tomli - exclude_types: [jupyter] - #- id: codespell - # entry: nbstripout "$@" > tmp & codespell tmp <&0 - # additional_dependencies: - # - nbstripout - # - tomli - # types: [jupyter] + exclude_types: [jupyter] # GitHub action will run on Notebooks