From 70931a498b5ab07564b5edb7cbe532ad3ca29563 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Nov 2022 10:28:42 -0600 Subject: [PATCH 1/5] add codecov.yml and report config --- pyproject.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2bdcdedb7..3b7e822c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,6 +122,20 @@ filterwarnings= [ "error", ] +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "if self.debug:", + "if settings.DEBUG", + "raise AssertionError", + "raise NotImplementedError", + "if 0:", + "if __name__ == .__main__.:", + "class .*\bProtocol\\):", +"@(abc\\.)?abstractmethod", +] + [tool.mypy] check_untyped_defs = true disallow_any_generics = false From da6a2d74bdf9b19d70f1762e1992b26ef4554f49 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Nov 2022 10:29:10 -0600 Subject: [PATCH 2/5] add codecov.yml --- codecov.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..eb9b9dff3 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,9 @@ +coverage: + status: + project: + default: + target: auto + threshold: 10 + patch: + default: + target: 0% From f589d728a9ae8d7c2bc8ecfa50a55b29d56fd599 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Nov 2022 10:35:24 -0600 Subject: [PATCH 3/5] use codecov action --- .github/workflows/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b2872219..99b1c0daf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,10 +65,8 @@ jobs: pip install -e ".[test]" python -m pytest -vv -W ignore || python -m pytest -vv -W ignore --lf - - name: Code coverage - run: | - pip install codecov - codecov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 docs: runs-on: ubuntu-latest From 8b9569bc7af34dffa8aff6354eb694d9c586b6df Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Nov 2022 10:40:01 -0600 Subject: [PATCH 4/5] fix coverage target --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b7e822c1..9102fe6ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -93,7 +93,7 @@ nowarn = "python -m pytest -vv -W default {args}" features = ["test"] dependencies = ["coverage", "pytest-cov"] [tool.hatch.envs.cov.env-vars] -ARGS = "-vv --cov jupyter_core --cov-branch --cov-report term-missing:skip-covered" +ARGS = "-vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered" [tool.hatch.envs.cov.scripts] test = "python -m pytest $ARGS --cov-fail-under 70 {args}" From e522a04de8391e0148e02798654ab52037998fd9 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 12 Nov 2022 10:49:52 -0600 Subject: [PATCH 5/5] try again --- .github/workflows/main.yml | 6 ++++-- codecov.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99b1c0daf..8b2872219 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,8 +65,10 @@ jobs: pip install -e ".[test]" python -m pytest -vv -W ignore || python -m pytest -vv -W ignore --lf - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + - name: Code coverage + run: | + pip install codecov + codecov docs: runs-on: ubuntu-latest diff --git a/codecov.yml b/codecov.yml index eb9b9dff3..b75c3e2db 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,7 +3,7 @@ coverage: project: default: target: auto - threshold: 10 + threshold: 1 patch: default: target: 0%