From 9efd012d79290065b166947fbdfaad210a9a55dd Mon Sep 17 00:00:00 2001 From: Chris Bunney <48915820+ukmo-ccbunney@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:44:26 +0100 Subject: [PATCH] Add repo-review (#456) * Added repo-review CI workflow. * Update ci-repo-review.yml Fixed dodgy indents * Update ci-repo-review.yml Added actions/checkout * Moved repo-review from GHA to pre-commit --------- Co-authored-by: Henry Wright <84939917+HGWright@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++++++ pyproject.toml | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7bfa4f59..db55a13f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,6 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +# See https://github.com/scientific-python/cookie#sp-repo-review for repo-review repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -44,3 +45,10 @@ repos: hooks: - id: sort-all types: [file, python] + +- repo: https://github.com/scientific-python/cookie + rev: 2024.08.19 + hooks: + - id: sp-repo-review + additional_dependencies: ["repo-review[cli]"] # TODO: Only neededed if extra dependencies are required + #args: ["--show=errskip"] # show everything for the moment diff --git a/pyproject.toml b/pyproject.toml index 77faa797..ccbd563b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,3 +73,26 @@ line_length = 79 profile = "black" skip_gitignore = "True" verbose = "False" + +[tool.repo-review] +# These are a list of the currently failing tests: +ignore = [ + "PY005", # Has tests folder + "PP003", # Does not list wheel as a build-dep + "PP304", # Sets the log level in pytest + "PP305", # Specifies xfail_strict + "PP306", # Specifies strict config + "PP307", # Specifies strict markers + "PP309", # Filter warnings specified + "GH104", # Use unique names for upload-artifact + "GH212", # Require GHA update grouping + "PC110", # Uses black or ruff-format + "PC140", # Uses a type checker + "PC160", # Uses a spell checker + "PC170", # Uses PyGrep hooks (only needed if rST present) + "PC180", # Uses a markdown formatter + "PC190", # Uses Ruff + "PC901", # Custom pre-commit CI message + "MY100", # Uses MyPy (pyproject config) + "RF001", # Uses RUFF +]