-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtox.ini
More file actions
121 lines (109 loc) · 2.81 KB
/
tox.ini
File metadata and controls
121 lines (109 loc) · 2.81 KB
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
[tox]
minversion = 4.2.0
envlist =
unit-tests
unit-tests-pyqir11
unit-tests-pyqir12
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 (default pyqir).
deps = -r {toxinidir}/requirements-test.txt
extras =
cirq
qasm3
squin
commands =
pytest tests --cov=qbraid_qir --cov-config=pyproject.toml --cov-report=term --cov-report=xml {posargs}
[testenv:unit-tests-pyqir11]
description = Run unit tests with pyqir 0.11.x (typed pointers).
deps = -r {toxinidir}/requirements-test.txt
extras =
cirq
qasm3
squin
test
commands_pre =
python -m pip install "pyqir>=0.10.0,<0.12"
commands =
pytest tests --cov=qbraid_qir --cov-config=pyproject.toml --cov-report=term --cov-report=xml {posargs}
[testenv:unit-tests-pyqir12]
description = Run unit tests with pyqir 0.12+ (opaque pointers).
deps = -r {toxinidir}/requirements-test.txt
extras =
cirq
qasm3
squin
test
commands_pre =
python -m pip install "pyqir>=0.12.0,<0.13.0"
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.
deps = -r {toxinidir}/docs/requirements.txt
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.12.0
commands =
qbraid admin headers tests bin qbraid_qir docker --type=apache {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}