From 5ca8e594431f23443fb13366676296cba83c8507 Mon Sep 17 00:00:00 2001 From: dcarron <daniel.carron@idiap.ch> Date: Fri, 2 Feb 2024 14:44:28 +0100 Subject: [PATCH] [pre-commit] Add numpydoc --- .pre-commit-config.yaml | 4 ++++ pyproject.toml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 505a38db..c74881a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,10 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: + - repo: https://github.com/numpy/numpydoc + rev: v1.6.0 + hooks: + - id: numpydoc-validation - repo: https://github.com/psf/black rev: 23.12.1 hooks: diff --git a/pyproject.toml b/pyproject.toml index a8b12aae..2ac662f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ dependencies = [ "lightning <2.2.0a0,>=2.1.0", "tensorboard", "grad-cam>=1.4.8", + "numpydoc", ] [project.urls] @@ -256,3 +257,13 @@ line-length = 80 addopts = ["--cov=mednet", "--cov-report=term-missing", "--import-mode=append"] junit_logging = "all" junit_log_passing_tests = false + +[tool.numpydoc_validation] +checks = [ + "all", # report on all checks, except the below + "PR04", + "EX01", + "SA01", + "ES01", + "GL01", +] -- GitLab