diff --git a/{{cookiecutter.package_name}}/.github/workflows/docs_build_and_deploy.yml b/{{cookiecutter.package_name}}/.github/workflows/docs_build_and_deploy.yml index a3a4995..a88e21f 100644 --- a/{{cookiecutter.package_name}}/.github/workflows/docs_build_and_deploy.yml +++ b/{{cookiecutter.package_name}}/.github/workflows/docs_build_and_deploy.yml @@ -14,7 +14,15 @@ on: pull_request: workflow_dispatch: + jobs: + linting: + # scheduled workflows should not run on forks + if: (${{ github.event_name == 'schedule' }} && ${{ github.repository_owner == 'neuroinformatics-unit' }} && ${{ github.ref == 'refs/heads/main' }}) || (${{ github.event_name != 'schedule' }}) + runs-on: ubuntu-latest + steps: + - uses: neuroinformatics-unit/actions/lint@v2 + build_sphinx_docs: name: Build Sphinx Docs runs-on: ubuntu-latest diff --git a/{{cookiecutter.package_name}}/.pre-commit-config.yaml b/{{cookiecutter.package_name}}/.pre-commit-config.yaml index 8241bf2..768bcd4 100644 --- a/{{cookiecutter.package_name}}/.pre-commit-config.yaml +++ b/{{cookiecutter.package_name}}/.pre-commit-config.yaml @@ -39,3 +39,10 @@ repos: - id: check-manifest args: [--no-build-isolation] additional_dependencies: [setuptools-scm] + - repo: https://github.com/codespell-project/codespell + # Configuration for codespell is in pyproject.toml + rev: v2.2.6 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/{{cookiecutter.package_name}}/pyproject.toml b/{{cookiecutter.package_name}}/pyproject.toml index 43b98b1..ed2a6e9 100644 --- a/{{cookiecutter.package_name}}/pyproject.toml +++ b/{{cookiecutter.package_name}}/pyproject.toml @@ -143,3 +143,11 @@ extras = commands = pytest -v --color=yes --cov={{cookiecutter.module_name}} --cov-report=xml """ + + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git' +check-hidden = true +# ignore-regex = '' +# ignore-words-list = ''