forked from qBraid/qBraid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
89 lines (80 loc) · 2.05 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
[tox]
minversion = 4.2.0
envlist =
unit-tests
docs
linters
format-check
skip_missing_interpreter = true
[testenv]
commands_pre = python -m pip install .
basepython = python3
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
pass_env =
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
QBRAID_RUN_REMOTE_TESTS
[testenv:unit-tests]
description = Run pytests and generate coverage report.
commands =
pip install --upgrade attrs
python3 -c "import qbraid; qbraid.about()"
pytest tests --cov=qbraid --cov-config=pyproject.toml --cov-report=term --cov-report=xml {posargs}
[testenv:docs]
description = Use sphinx to build the HTML docs.
extras =
docs
commands =
sphinx-build -W -b html docs/ docs/build/html {posargs}
[testenv:isort]
envdir = .tox/linters
skip_install = true
deps = isort
commands =
isort . {posargs} qbraid tools tests
[testenv:pylint]
envdir = .tox/linters
skip_install = true
deps = pylint
commands =
pylint {posargs} qbraid tools tests --disable=C0103,E0401,R0801,R0902,R0903,R0911,R0912,R0914,W0212,W0511 --extension-pkg-whitelist=rustworkx
[testenv:black]
envdir = .tox/linters
skip_install = true
deps = black
commands =
black qbraid tools tests {posargs}
[testenv:headers]
envdir = .tox/linters
skip_install = true
deps = qbraid-cli>=0.8.2
commands =
qbraid admin headers tests tools qbraid --type=gpl {posargs}
[testenv:linters]
allowlist_externals = qbraid
envdir = .tox/linters
skip_install = true
deps =
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:headers]deps}
commands =
{[testenv:isort]commands}
{[testenv:black]commands}
{[testenv:headers]commands} {posargs:--fix}
[testenv:format-check]
allowlist_externals = qbraid
envdir = .tox/linters
skip_install = true
deps =
{[testenv:pylint]deps}
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:headers]deps}
commands =
{[testenv:pylint]commands}
{[testenv:isort]commands} {posargs:--check-only}
{[testenv:black]commands} {posargs:--check}
{[testenv:headers]commands}