Skip to content

Commit

Permalink
Use local coverage (#6839)
Browse files Browse the repository at this point in the history
* use local coverage

* bump min jupyterlab_server version

* bump min jupyterlab_server version

* add fail_under
  • Loading branch information
blink1073 authored Apr 14, 2023
1 parent f0ec5f3 commit 27c9371
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand All @@ -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",
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 27c9371

Please sign in to comment.