This repository has been archived by the owner on Aug 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 749
/
tox.ini
90 lines (83 loc) · 2.1 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
[tox]
minversion = 3.15.0
envlist = py36, py37, py38, py39, py310, lint, docs
skipsdist = True
[testenv]
usedevelop = true
install_command = pip install -c{toxinidir}/constraints.txt -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
commands =
pip check
python -m unittest -v
[testenv:fmt]
deps =
-r requirements-dev.txt
commands =
black docs/ test/ tools/ setup.py
isort docs/ test/ tools/ setup.py
[testenv:lint]
deps =
-r requirements-dev.txt
pylint
doc8
ipython
commands =
black --check docs/ test/ tools/ setup.py
isort --check docs/ test/ tools/ setup.py
pylint -rn --rcfile={toxinidir}/.pylintrc test
doc8 docs --ignore-path docs/_templates --ignore-path docs/stubs
[testenv:asv]
deps =
asv
virtualenv
commands =
asv run {posargs}
[testenv:docs]
# Editable mode breaks macOS: https://github.com/sphinx-doc/sphinx/issues/10943
usedevelop = false
envdir = .tox/docs
passenv =
QISKIT_DOCS_BUILD_TUTORIALS
QISKIT_ENABLE_ANALYTICS
extras =
all
deps =
-r requirements-dev.txt
sphinx-intl
# On macOS Tox 3.28, setting `extras` resulted in the package not being installed at all.
# It does not hurt to also install the package in the `deps` stage.
.[all]
commands =
sphinx-build -W --keep-going -j auto -b html {posargs} -d {toxinidir}/docs/.doctrees {toxinidir}/docs/ {toxinidir}/docs/_build/html
[testenv:docs-clean]
skip_install = true
deps =
allowlist_externals =
rm
commands =
rm -rf \
{toxinidir}/stubs/ \
{toxinidir}/docs/_build \
{toxinidir}/docs/stubs \
{toxinidir}/docs/apidoc \
{toxinidir}/docs/tutorials \
{toxinidir}/docs/migration_guides \
{toxinidir}/docs/source_images \
{toxinidir}/docs/_templates \
{toxinidir}/docs/plot_directive \
{toxinidir}/docs/jupyter_execute \
{toxinidir}/docs/.doctrees
[testenv:gettext]
envdir = .tox/docs
deps =
-r requirements-dev.txt
sphinx-intl
commands =
sphinx-build -b gettext docs/ docs/_build/gettext {posargs}
sphinx-intl -c docs/conf.py update -p docs/_build/gettext -l en -d docs/locale
[doc8]
max-line-length=200
ignore-path=docs/_build