From ceda135abf7d76864d218741cedb52473de58740 Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Tue, 26 Sep 2023 11:21:01 +0200 Subject: [PATCH 1/4] Introduce coverage settings and failure number --- pyproject.toml | 16 ---------------- vizro-core/pyproject.toml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 16 deletions(-) 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/pyproject.toml b/vizro-core/pyproject.toml index bf728e011..102b5d33c 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] +source = ["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 = 90 +show_missing = true +skip_covered = true + +[tool.coverage.run] +branch = true +parallel = true +source_pkgs = ["vizro"] From 608208a8e342af2de6376429e6b88154a057490c Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Tue, 26 Sep 2023 11:28:36 +0200 Subject: [PATCH 2/4] Set coverage to current level --- vizro-core/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vizro-core/pyproject.toml b/vizro-core/pyproject.toml index 102b5d33c..3e8575b60 100644 --- a/vizro-core/pyproject.toml +++ b/vizro-core/pyproject.toml @@ -56,7 +56,7 @@ exclude_lines = [ "if __name__ == .__main__.:", "if TYPE_CHECKING:" ] -fail_under = 90 +fail_under = 82 show_missing = true skip_covered = true From d84d0821b3ec04beeff02d359bbc660668740586 Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Tue, 26 Sep 2023 11:31:00 +0200 Subject: [PATCH 3/4] changelog --- ...52_maximilian_schulz_introduce_coverage.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 vizro-core/changelog.d/20230926_113052_maximilian_schulz_introduce_coverage.md 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 @@ + + + + + + + + From 628ba129dffbc472af1adbe199eb59b4e1429c9c Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Tue, 26 Sep 2023 13:20:01 +0200 Subject: [PATCH 4/4] small typo in toml --- vizro-core/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vizro-core/pyproject.toml b/vizro-core/pyproject.toml index 3e8575b60..8f32c3692 100644 --- a/vizro-core/pyproject.toml +++ b/vizro-core/pyproject.toml @@ -48,7 +48,7 @@ Issues = "https://github.com/mckinsey/vizro/issues" Source = "https://github.com/mckinsey/vizro" [tool.coverage.paths] -source = ["src/vizro"] # omit tests for clarity, although this can be useful to see what test lines DID NOT run +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 = [