-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
77 lines (70 loc) · 1.77 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
69
70
71
72
73
74
75
76
77
[tox]
minversion = 4.4.3
envlist = py{310,311,312}{,-notebook}, lint, coverage, docs
isolated_build = True
[testenv]
package = wheel
wheel_build_env = .pkg
parallel_show_output = True
extras =
test
commands =
pytest {posargs}
[testenv:style]
extras =
style
commands =
ruff format qiskit_addon_sqd/ docs/ test/
ruff check --fix qiskit_addon_sqd/ docs/ test/
nbqa ruff --fix docs/
[testenv:lint]
basepython = python3.10
extras =
lint
commands =
ruff format --check qiskit_addon_sqd/ docs/ test/
ruff check qiskit_addon_sqd/ docs/ test/
ruff check --preview --select CPY001 --exclude "*.ipynb" qiskit_addon_sqd/ test/
nbqa ruff docs/
mypy qiskit_addon_sqd/
pylint -rn qiskit_addon_sqd/ test/
nbqa pylint -rn docs/
reno lint
[testenv:{,py-,py3-,py310-,py311-,py312-}notebook]
extras =
nbtest
notebook-dependencies
commands =
pytest --nbmake \
--nbmake-timeout=3000 \
--ignore=docs/how_tos/benchmark_pauli_projection.ipynb \
--ignore=docs/how_tos/integrate_dice_solver.ipynb \
--ignore=docs/how_tos/use_oo_to_optimize_hamiltonian_basis.ipynb \
--ignore=docs/how_tos/choose_subspace_dimension.ipynb \
{posargs} docs/
[testenv:coverage]
deps =
coverage>=7.5
extras =
test
commands =
coverage3 run --source qiskit_addon_sqd --parallel-mode -m pytest test/ {posargs}
coverage3 combine
coverage3 html
coverage3 report --fail-under=100 --show-missing
[testenv:docs]
basepython = python3.10
extras =
docs
commands =
sphinx-build -j auto -W -T --keep-going -b html {posargs} {toxinidir}/docs/ {toxinidir}/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/