-
Notifications
You must be signed in to change notification settings - Fork 57
/
tox.ini
53 lines (46 loc) · 1.02 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
[tox]
minversion = 3.25
envlist = py{38,39,310,311}, lint, mypy, format, coverage, docs
isolated_build = True
[testenv]
extras =
dev
commands =
pytest test/ {posargs}
[testenv:lint]
base_python = 3.10
extras =
dev
commands =
pylint qiskit_research test
[testenv:mypy]
base_python = 3.10
extras =
dev
commands =
mypy --exclude=docs/_build .
[testenv:format]
base_python = 3.10
extras =
dev
commands =
black --check .
[testenv:coverage]
base_python = 3.10
extras =
dev
commands =
coverage3 run --source qiskit_research --parallel-mode -m pytest test/ {posargs}
coverage3 combine
coverage3 html
coverage3 report --fail-under=50
[testenv:docs]
base_python = 3.10
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