Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit c8e04ad0 authored by ANDREY Paul's avatar ANDREY Paul
Browse files

Configure coverage tool with 'pyproject.toml'.

* Add 'pytest-cov' (hence, indirectly, 'coverage') to third-party
  dependencies of test environments.
* Add configuration of 'coverage' to properly target declearn code
  (excluding auto-generated protobuf code as well as `test_utils`
  submodule) and be compatible with the use of multiprocessing in
  some functional~integration tests.
parent 34779af9
No related branches found
No related tags found
1 merge request!38Compute coverage as part of CI/CD.
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment