Use local coverage (#6839)

* use local coverage

* bump min jupyterlab_server version

* bump min jupyterlab_server version

* add fail_under
Steven Silvester 3 years ago committed by GitHub
parent f0ec5f30e9
commit 27c93719e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,10 +57,17 @@ jobs:
jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" -
python -m jupyterlab.browser_check
- name: Codecov
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: 78
test_docs:
name: Test Docs
@ -184,7 +191,7 @@ jobs:
tests_check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
- coverage
- install
- test_lint
- test_docs

@ -3,7 +3,6 @@
![Github Actions Status](https://github.com/jupyter/notebook/workflows/Build/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/jupyter-notebook/badge/?version=latest)](https://jupyter-notebook.readthedocs.io/en/latest/?badge=latest)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter/notebook/main?urlpath=tree)
[![codecov](https://codecov.io/gh/jupyter/notebook/branch/main/graph/badge.svg)](https://codecov.io/gh/jupyter/notebook)
[![Gitpod](https://img.shields.io/badge/gitpod_editor-open-blue.svg)](https://gitpod.io/#https://github.com/jupyter/notebook)
The Jupyter notebook is a web-based notebook environment for interactive

@ -1,9 +0,0 @@
coverage:
status:
project:
default:
target: auto
threshold: 1
patch:
default:
target: 0%

@ -33,7 +33,7 @@ dependencies = [
"jupyter_server>=2.0.1,<3",
"importlib-resources>=5.0;python_version<\"3.9\"",
"jupyterlab>=4.0.0b0,<5",
"jupyterlab_server>=2.19.0,<3",
"jupyterlab_server>=2.22.1,<3",
"notebook_shim>=0.2,<0.3",
"tornado>=6.2.0",
]
@ -50,17 +50,15 @@ Tracker = "https://github.com/jupyter/notebook/issues"
[project.optional-dependencies]
test = [
"coverage",
"nbval",
"pytest>=7.0",
"pytest-cov",
"requests",
"pytest-tornasync",
"pytest-timeout",
"pytest-console-scripts",
"ipykernel",
"jupyter_server[test]>=2.0.1,<3",
"jupyterlab_server[test]>=2.19.0,<3",
"jupyterlab_server[test]>=2.22.1,<3",
]
docs = [
"myst_parser",
@ -130,7 +128,7 @@ nowarn = "test -W default {args}"
[tool.hatch.envs.cov]
features = ["test"]
dependencies = ["coverage", "pytest-cov"]
dependencies = ["coverage[toml]", "pytest-cov"]
[tool.hatch.envs.cov.scripts]
test = "python -m pytest -vv --cov notebook --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"
@ -222,6 +220,10 @@ exclude_lines = [
"@(abc\\.)?abstractmethod",
]
[tool.coverage.run]
relative_files = true
source = ["notebook"]
[tool.mypy]
check_untyped_defs = true
disallow_incomplete_defs = true

Loading…
Cancel
Save