From 770df7eaedb933e2801c38b966b33d1020839a44 Mon Sep 17 00:00:00 2001 From: Maximilian Schulz <83698606+maxschulz-COL@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:05:14 +0200 Subject: [PATCH] Introduce coverage settings and failure number (#63) --- pyproject.toml | 16 ------- ...52_maximilian_schulz_introduce_coverage.md | 42 +++++++++++++++++++ vizro-core/pyproject.toml | 18 ++++++++ 3 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 vizro-core/changelog.d/20230926_113052_maximilian_schulz_introduce_coverage.md diff --git a/pyproject.toml b/pyproject.toml index 144e608f1..10cd78566 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,22 +12,6 @@ exclude_dirs = ["tests"] line-length = 120 target-version = ["py38"] -[tool.coverage.paths] -tests = ["tests"] -vizro = ["src/vizro"] - -[tool.coverage.report] -exclude_lines = [ - "no cov", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:" -] - -[tool.coverage.run] -branch = true -parallel = true -source_pkgs = ["vizro", "tests"] - [tool.mypy] # strict checks : strict = true check_untyped_defs = true diff --git a/vizro-core/changelog.d/20230926_113052_maximilian_schulz_introduce_coverage.md b/vizro-core/changelog.d/20230926_113052_maximilian_schulz_introduce_coverage.md new file mode 100644 index 000000000..d57e34cc2 --- /dev/null +++ b/vizro-core/changelog.d/20230926_113052_maximilian_schulz_introduce_coverage.md @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/vizro-core/pyproject.toml b/vizro-core/pyproject.toml index bf728e011..8f32c3692 100644 --- a/vizro-core/pyproject.toml +++ b/vizro-core/pyproject.toml @@ -46,3 +46,21 @@ kedro = [ Documentation = "https://github.com/mckinsey/vizro#readme" Issues = "https://github.com/mckinsey/vizro/issues" Source = "https://github.com/mckinsey/vizro" + +[tool.coverage.paths] +vizro = ["src/vizro"] # omit tests for clarity, although this can be useful to see what test lines DID NOT run + +[tool.coverage.report] +exclude_lines = [ + "no cov", + "if __name__ == .__main__.:", + "if TYPE_CHECKING:" +] +fail_under = 82 +show_missing = true +skip_covered = true + +[tool.coverage.run] +branch = true +parallel = true +source_pkgs = ["vizro"]