From 2a83ecf8e0aed38c6a4b4551178016e457765587 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Apr 2023 15:41:28 -0500 Subject: [PATCH 1/3] use local coverage --- .github/workflows/main.yml | 17 ++++++++++++----- README.md | 1 - codecov.yml | 9 --------- pyproject.toml | 3 ++- 4 files changed, 14 insertions(+), 16 deletions(-) delete mode 100644 codecov.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc128bf57..af75dcf7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,10 +65,17 @@ jobs: if: ${{ startsWith(matrix.os, 'windows') }} run: | hatch run cov:nowarn || hatch run test:nowarn --lf - - name: Code coverage - run: | - pip install codecov coverage[toml] - codecov + - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 + + coverage: + runs-on: ubuntu-latest + needs: + - test + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 + with: + fail_under: 84 docs: runs-on: windows-latest @@ -148,7 +155,7 @@ jobs: tests_check: # This job does nothing and is only used for the branch protection if: always() needs: - - test + - coverage - docs - lint - check_links diff --git a/README.md b/README.md index baa122828..e3d59ec5a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Jupyter Client [![Build Status](https://github.com/jupyter/jupyter_client/workflows/CI/badge.svg)](https://github.com/jupyter/jupyter_client/actions) -[![codecov](https://codecov.io/gh/jupyter/jupyter_client/branch/main/graph/badge.svg?token=kxoFu4KnhT)](https://codecov.io/gh/jupyter/jupyter_client) [![Documentation Status](https://readthedocs.org/projects/jupyter-client/badge/?version=latest)](http://jupyter-client.readthedocs.io/en/latest/?badge=latest) `jupyter_client` contains the reference implementation of the [Jupyter protocol]. diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index b75c3e2db..000000000 --- a/codecov.yml +++ /dev/null @@ -1,9 +0,0 @@ -coverage: - status: - project: - default: - target: auto - threshold: 1 - patch: - default: - target: 0% diff --git a/pyproject.toml b/pyproject.toml index c5db1912e..666336d6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,6 @@ Source = "https://github.com/jupyter/jupyter_client" [project.optional-dependencies] test = [ - "codecov", "coverage", "ipykernel>=6.14", "mypy", @@ -141,6 +140,8 @@ filterwarnings= [ ] [tool.coverage.report] +relative_files = true +source = ["jupyter_client"] exclude_lines = [ "pragma: no cover", "def __repr__", From b9e13350505e24f5a60a192f5db95bd3f0d6c2b6 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Apr 2023 15:42:30 -0500 Subject: [PATCH 2/3] fix cov amount --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index af75dcf7c..d23d622c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: - uses: actions/checkout@v3 - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 with: - fail_under: 84 + fail_under: 78 docs: runs-on: windows-latest From 60e107eec1bb3e55d86ce29ad51ea95a14b9edb2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 13 Apr 2023 17:13:20 -0500 Subject: [PATCH 3/3] fix config --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 666336d6d..505db1dae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,8 +140,6 @@ filterwarnings= [ ] [tool.coverage.report] -relative_files = true -source = ["jupyter_client"] exclude_lines = [ "pragma: no cover", "def __repr__", @@ -158,6 +156,10 @@ omit = [ "jupyter_client/ssh/forward.py" ] +[tool.coverage.run] +relative_files = true +source = ["jupyter_client"] + [tool.mypy] check_untyped_defs = true disallow_any_generics = false