From 23345c44dbd8bd63284e0b7808970304aaea2a96 Mon Sep 17 00:00:00 2001 From: harryswift01 Date: Wed, 2 Sep 2026 15:22:15 +0100 Subject: [PATCH 1/2] chore: include sphinx and docs checks within `.pre-commit-config.yaml` --- .pre-commit-config.yaml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a22bf01..76bd0fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.8 + rev: v0.16.5 hooks: - id: ruff-check args: [--fix] @@ -12,8 +12,26 @@ repos: - id: check-added-large-files - id: check-merge-conflict - id: check-yaml + exclude: ^conda-recipe/meta\.yaml$ - id: check-toml - - id: end-of-file-fixer - - id: trailing-whitespace - id: check-case-conflict - id: check-ast + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/rstcheck/rstcheck + rev: v6.3.0 + hooks: + - id: rstcheck + name: rstcheck (docstrings only) + files: \.py$ + args: ["--report-level", "warning"] + + - repo: local + hooks: + - id: sphinx-docs + name: sphinx-build (pre-push, warnings as errors) + entry: bash -lc 'make -C docs clean && make -C docs html SPHINXOPTS="-W --keep-going"' + language: system + pass_filenames: false + stages: [pre-push] \ No newline at end of file From 5119a62477f4e9cb398116ab295dce2fa9a443ae Mon Sep 17 00:00:00 2001 From: harryswift01 Date: Wed, 2 Sep 2026 15:23:40 +0100 Subject: [PATCH 2/2] chore: apply Ruff pre-commit to all files --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76bd0fd..02f4a34 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,4 +34,4 @@ repos: entry: bash -lc 'make -C docs clean && make -C docs html SPHINXOPTS="-W --keep-going"' language: system pass_filenames: false - stages: [pre-push] \ No newline at end of file + stages: [pre-push]