-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
82 lines (74 loc) · 1.83 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
78
79
80
81
82
[tox]
minversion = 4.4.3
envlist = py{39,310,311,312}{,-notebook}, lint, coverage, docs, doctest
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_obp/ docs/ test/
ruff check --fix qiskit_addon_obp/ docs/ test/
nbqa ruff --fix docs/
[testenv:lint]
image-tester-commit = 7ae965ccf21c39e5170334ec7f4882756883860a
deps =
git+https://github.com/Qiskit/documentation.git@{[testenv:lint]image-tester-commit}\#egg=sphinx-alt-text-validator&subdirectory=scripts/image-tester
basepython = python3.10
extras =
lint
commands =
ruff format --check qiskit_addon_obp/ docs/ test/
ruff check qiskit_addon_obp/ docs/ test/
ruff check --preview --select CPY001 --exclude "*.ipynb" qiskit_addon_obp/ test/
nbqa ruff docs/
mypy qiskit_addon_obp/
pylint -rn qiskit_addon_obp/ test/
sphinx-alt-text-validator -f qiskit_addon_obp
nbqa pylint -rn docs/
typos
reno lint
[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}notebook]
extras =
nbtest
notebook-dependencies
commands =
pytest --nbmake --nbmake-timeout=3000 {posargs} docs/
[testenv:{,py-,py3-,py39-,py310-,py311-,py312-}doctest]
extras =
test
doctest
commands =
pytest --doctest-plus --doctest-only {posargs}
[testenv:coverage]
basepython = python3.10
deps =
coverage>=7.4.1
extras =
test
doctest
commands =
pytest --doctest-modules --cov=qiskit_addon_obp/
[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/