From ccee4177d243585fcd300b0a3dad2ea5dd1bdd60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Stucke?= Date: Tue, 12 Nov 2024 13:49:24 +0100 Subject: [PATCH] chore: update coverage config and move it to pyproject.toml --- .coveragerc | 2 -- pyproject.toml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index c0239a3cd..000000000 --- a/.coveragerc +++ /dev/null @@ -1,2 +0,0 @@ -[run] -omit = install.py diff --git a/pyproject.toml b/pyproject.toml index 826d66f55..0035f724a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,3 +100,22 @@ docstring-quotes = "double" [tool.ruff.format] quote-style = "single" + +[tool.coverage.run] +omit = [ + # ignore install scripts + "src/install.py", + "src/install/*", + # ignore alembic migration scripts + "src/storage/migration/**", + # ignore files only run inside docker + "src/plugins/analysis/*/docker/**", +] + +[tool.coverage.report] +exclude_also = [ + # exclude type checking blocks which are not executed during runtime + "if TYPE_CHECKING:", + # also don't complain about abstract methods (as they're also not run) + "@(abc\\.)?abstractmethod", +]