-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathtox.ini
163 lines (148 loc) · 4 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
[tox]
minversion = 4.24.0
envlist = py312,py311,py310,py39,py38,lint
[testenv]
package = editable
package_env = .pkg
wheel_build_env = .pkg
setenv =
VIRTUAL_ENV={envdir}
QISKIT_SUPPRESS_PACKAGING_WARNINGS=Y
QISKIT_TEST_CAPTURE_STREAMS=1
OMP_NUM_THREADS={env:OMP_NUM_THREADS:1}
QISKIT_PARALLEL={env:QISKIT_PARALLEL:FALSE}
RAYON_NUM_THREADS={env:RAYON_NUM_THREADS:1}
PYTHONSAFEPATH=1
deps =
dependency_groups =
testing
extras =
extras
passenv =
QISKIT_IBM_*
TEST_TIMEOUT
QE_USE_TESTTOOLS
commands = stestr run {posargs}
[testenv:.pkg]
# When testenv.package is set to external these settings will be used to build
# the wheel with pypa/build instead of tox's internal PEP517 support. pypa/build
# builds the sdist first and then builds the wheel from the sdist while tox
# builds the wheel directly and can miss packaging problems like a missing entry
# in MANIFEST.in.
deps = build
# tox does not do variable substitution in this environment so we have to write
# out .tox/dist and clean it explicitly rather than using {envtmpdir}
package_glob = .tox/dist/*.whl
commands =
python -c "import shutil; shutil.rmtree('.tox/dist', ignore_errors=True)"
python -m build -o .tox/dist
[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage3 run --source qiskit_experiments --parallel-mode
commands =
stestr run {posargs}
coverage3 combine
coverage3 lcov
[testenv:qiskit-main]
deps =
{[testenv]deps}
git+https://github.com/Qiskit/qiskit
commands = stestr run {posargs}
[testenv:lint]
dependency_groups =
formatting
linting
commands =
black --check qiskit_experiments test tools
pylint -rn {posargs} --rcfile={toxinidir}/.pylintrc qiskit_experiments/ test/ tools/
python {toxinidir}/tools/verify_headers.py
[testenv:lint-incr]
allowlist_externals = git
dependency_groups =
formatting
linting
commands =
black --check {posargs} qiskit_experiments test tools
-git fetch -q https://github.com/Qiskit-Community/qiskit-experiments :lint_incr_latest
python {toxinidir}/tools/pylint_incr.py -rn {posargs} -sn --paths :/qiskit_experiments/*.py :/test/*.py :/tools/*.py
python {toxinidir}/tools/verify_headers.py qiskit_experiments test tools
[testenv:black]
skip_install = true
dependency_groups =
formatting
commands = black {posargs} qiskit_experiments test tools
[testenv:docs]
passenv =
EXPERIMENTS_DEV_DOCS
PROD_BUILD
RELEASE_STRING
VERSION_STRING
dependency_groups =
docs
setenv =
PYDEVD_DISABLE_FILE_VALIDATION = 1
commands =
sphinx-build -T -W --keep-going -b html {posargs} docs/ docs/_build/html
[testenv:docs-parallel]
passenv =
EXPERIMENTS_DEV_DOCS
PROD_BUILD
RELEASE_STRING
VERSION_STRING
dependency_groups =
docs
setenv =
PYDEVD_DISABLE_FILE_VALIDATION = 1
commands =
sphinx-build -j auto -T -W --keep-going -b html {posargs} docs/ docs/_build/html
[testenv:docs-minimal]
passenv =
EXPERIMENTS_DEV_DOCS
PROD_BUILD
RELEASE_STRING
VERSION_STRING
dependency_groups =
docs
setenv =
QISKIT_DOCS_SKIP_EXECUTE = 1
PYDEVD_DISABLE_FILE_VALIDATION = 1
commands =
sphinx-build -T -W --keep-going -b html {posargs} docs/ docs/_build/html
[testenv:docs-qiskit-main]
passenv =
EXPERIMENTS_DEV_DOCS
PROD_BUILD
RELEASE_STRING
VERSION_STRING
deps =
{[testenv]deps}
git+https://github.com/Qiskit/qiskit
dependency_groups =
docs
setenv =
PYDEVD_DISABLE_FILE_VALIDATION = 1
commands =
sphinx-build -j auto -T -W --keep-going -b html {posargs} docs/ docs/_build/html
[testenv:docs-clean]
skip_install = true
deps =
commands = python -c "import shutil; shutil.rmtree('{toxinidir}/docs/stubs/', ignore_errors=True); shutil.rmtree('{toxinidir}/docs/_build', ignore_errors=True)"
[testenv:relnotes]
# Prepare release notes for a new minor release
skip_install = true
deps =
packaging
reno
dependency_groups =
commands =
python tools/prepare_release.py
[testenv:bumpversion]
# Prepare release notes for a new minor release
skip_install = true
deps =
packaging
dependency_groups =
commands =
python tools/bump_version.py