forked from qiskit-community/qiskit-research
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (46 loc) · 1.09 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[tox]
minversion = 3.25
envlist = py{38,39,310}{,-notebook}, lint, mypy, format, coverage, docs
isolated_build = True
[testenv]
extras =
dev
commands =
pytest test/ {posargs}
[testenv:{py38-,py39-,py310-,}notebook]
extras =
dev
commands =
pytest --nbmake --nbmake-timeout=3000 {posargs} docs/
[testenv:lint]
extras =
dev
commands =
pylint qiskit_research test
[testenv:mypy]
extras =
dev
commands =
mypy --exclude=docs/_build .
[testenv:format]
extras =
dev
commands =
black --check .
[testenv:coverage]
extras =
dev
commands =
coverage3 run --source qiskit_research --parallel-mode -m pytest test/ {posargs}
coverage3 combine
coverage3 html
coverage3 report --fail-under=80
[testenv:docs]
extras =
dev
commands =
python -c 'import shutil, pathlib; shutil.rmtree(pathlib.Path("docs") / "stubs", ignore_errors=True)'
python -c 'import shutil, pathlib; shutil.rmtree(pathlib.Path("docs") / "_build" / "html" / ".doctrees", ignore_errors=True)'
sphinx-build -b html -W {posargs} docs/ docs/_build/html
[pytest]
addopts = --doctest-modules --ignore=docs/getting_started.ipynb