diff --git a/pyproject.toml b/pyproject.toml index 2d7af89823f7b6713f8e3cd0e1f6ca88989ee4ed..427d27ba2c0c5a6bb8e7fb13201f74debee30d45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,7 @@ tests = [ "pylint >= 2.14", "pytest >= 6.1", "pytest-asyncio", + "pytest-cov >= 4.0", ] [project.urls] @@ -96,6 +97,18 @@ repository = "https://gitlab.inria.fr/magnet/declearn/declearn2.git" line-length = 79 extend-exclude = "(.*_pb2.*py$)" # exclude auto-generated protobuf code files +[tool.coverage.run] +# enable coverage collection within multiprocessing +concurrency = ["multiprocessing"] +parallel = true +sigterm = true +# define rules to select the code files that need covering +source = ["declearn"] +omit = [ + ".*_pb2.*.py$", # auto-generated rotobuf code files + "declearn/test_utils/*.py", # dev-only test-oriented utils +] + [tool.mypy] exclude = [".*_pb2.*.py$"] follow_imports = "skip" # otherwise excluded files are checked