-
Notifications
You must be signed in to change notification settings - Fork 31
/
tox.ini
68 lines (61 loc) · 1.51 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[tox]
minversion = 3.25
envlist = py{38,39,310,311,312,313}{,-notebook}, lint, coverage, docs
isolated_build = True
[testenv]
extras =
test
commands =
pytest {posargs}
[testenv:style]
extras =
style
commands =
ruff check --fix qiskit_addon_cutting/ docs/ test/
nbqa ruff --fix docs/
autoflake --in-place --recursive qiskit_addon_cutting/ docs/ test/
black qiskit_addon_cutting/ docs/ test/
[testenv:lint]
extras =
lint
commands =
ruff check qiskit_addon_cutting/ docs/ test/
nbqa ruff docs/
autoflake --check --quiet --recursive qiskit_addon_cutting/ docs/ test/
black --check qiskit_addon_cutting/ docs/ test/
mypy qiskit_addon_cutting/
reno lint
pylint -rn qiskit_addon_cutting/ test/
nbqa pylint -rn docs/
[testenv:{,py-,py3-,py38-,py39-,py310-,py311-,py312-,py313-}notebook]
extras =
nbtest
notebook-dependencies
commands =
pytest --nbmake --nbmake-timeout=300 {posargs} docs/ --ignore=docs/_build
[testenv:coverage]
deps =
coverage>=5.5
extras =
test
commands =
coverage3 run --source qiskit_addon_cutting --parallel-mode -m pytest --run-slow test/ --coverage {posargs}
coverage3 combine
coverage3 html
coverage3 report --fail-under=100 --show-missing
[testenv:docs]
extras =
docs
notebook-dependencies
commands =
sphinx-build -j auto -W -T --keep-going {posargs} docs/ docs/_build/html
passenv =
CI
GITHUB_BASE_REF
GITHUB_REF_NAME
[testenv:docs-clean]
skip_install = true
allowlist_externals =
rm
commands =
rm -rf {toxinidir}/docs/stubs/ {toxinidir}/docs/_build/