-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
93 lines (83 loc) · 1.98 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
[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
[testenv:unit-tests]
description = Run pytests and generate coverage report.
extras =
cirq
qasm3
test
commands =
pytest tests --cov=qbraid_qir --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_qir bin tests docker
[testenv:pylint]
envdir = .tox/linters
skip_install = true
deps = pylint
commands =
pylint {posargs} qbraid_qir bin tests docker --disable=R0801,E0401,R0917
[testenv:black]
envdir = .tox/linters
skip_install = true
deps = black
commands =
black qbraid_qir bin tests docker {posargs}
[testenv:mypy]
envdir = .tox/linters
skip_install = true
deps = mypy
commands =
mypy qbraid_qir
[testenv:headers]
envdir = .tox/linters
skip_install = true
deps = qbraid-cli>=0.8.7
commands =
qbraid admin headers tests bin qbraid_qir docker --type=gpl -p qbraid-qir {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:mypy]deps}
{[testenv:headers]deps}
commands =
{[testenv:pylint]commands}
{[testenv:isort]commands} {posargs:--check-only}
{[testenv:black]commands} {posargs:--check}
{[testenv:mypy]commands}
{[testenv:headers]commands}