Skip to content

Commit 27c9371

Browse files
authored
Use local coverage (#6839)
* use local coverage * bump min jupyterlab_server version * bump min jupyterlab_server version * add fail_under
1 parent f0ec5f3 commit 27c9371

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

.github/workflows/build.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,17 @@ jobs:
5757
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
5858
python -m jupyterlab.browser_check
5959
60-
- name: Codecov
61-
run: |
62-
pip install codecov coverage[toml]
63-
codecov
60+
- uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1
61+
62+
coverage:
63+
runs-on: ubuntu-latest
64+
needs:
65+
- test
66+
steps:
67+
- uses: actions/checkout@v3
68+
- uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1
69+
with:
70+
fail_under: 78
6471

6572
test_docs:
6673
name: Test Docs
@@ -184,7 +191,7 @@ jobs:
184191
tests_check: # This job does nothing and is only used for the branch protection
185192
if: always()
186193
needs:
187-
- test
194+
- coverage
188195
- install
189196
- test_lint
190197
- test_docs

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
![Github Actions Status](https://github.com/jupyter/notebook/workflows/Build/badge.svg)
44
[![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](https://jupyter-notebook.readthedocs.io/en/latest/?badge=latest)
55
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter/notebook/main?urlpath=tree)
6-
[![codecov](https://codecov.io/gh/jupyter/notebook/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyter/notebook)
76
[![Gitpod](https://img.shields.io/badge/gitpod_editor-open-blue.svg)](https://gitpod.io/#https://github.com/jupyter/notebook)
87

98
The Jupyter notebook is a web-based notebook environment for interactive

codecov.yml

-9
This file was deleted.

pyproject.toml

+7-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"jupyter_server>=2.0.1,<3",
3434
"importlib-resources>=5.0;python_version<\"3.9\"",
3535
"jupyterlab>=4.0.0b0,<5",
36-
"jupyterlab_server>=2.19.0,<3",
36+
"jupyterlab_server>=2.22.1,<3",
3737
"notebook_shim>=0.2,<0.3",
3838
"tornado>=6.2.0",
3939
]
@@ -50,17 +50,15 @@ Tracker = "https://github.com/jupyter/notebook/issues"
5050

5151
[project.optional-dependencies]
5252
test = [
53-
"coverage",
5453
"nbval",
5554
"pytest>=7.0",
56-
"pytest-cov",
5755
"requests",
5856
"pytest-tornasync",
5957
"pytest-timeout",
6058
"pytest-console-scripts",
6159
"ipykernel",
6260
"jupyter_server[test]>=2.0.1,<3",
63-
"jupyterlab_server[test]>=2.19.0,<3",
61+
"jupyterlab_server[test]>=2.22.1,<3",
6462
]
6563
docs = [
6664
"myst_parser",
@@ -130,7 +128,7 @@ nowarn = "test -W default {args}"
130128

131129
[tool.hatch.envs.cov]
132130
features = ["test"]
133-
dependencies = ["coverage", "pytest-cov"]
131+
dependencies = ["coverage[toml]", "pytest-cov"]
134132
[tool.hatch.envs.cov.scripts]
135133
test = "python -m pytest -vv --cov notebook --cov-branch --cov-report term-missing:skip-covered {args}"
136134
nowarn = "test -W default {args}"
@@ -222,6 +220,10 @@ exclude_lines = [
222220
"@(abc\\.)?abstractmethod",
223221
]
224222

223+
[tool.coverage.run]
224+
relative_files = true
225+
source = ["notebook"]
226+
225227
[tool.mypy]
226228
check_untyped_defs = true
227229
disallow_incomplete_defs = true

0 commit comments

Comments
 (0)