diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 505a38db3fbc742ebc929bd2ab81ef238bb84724..c74881a8cfaee431ad893c19b4c9ca8fa5792a1b 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 a8b12aae164d7f03c775022628fe418d765a66be..2ac662f6dd434361f33f74e88ac4bcf6fa5c4fe3 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", +]