-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathtox.ini
More file actions
118 lines (107 loc) · 2.55 KB
/
tox.ini
File metadata and controls
118 lines (107 loc) · 2.55 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
[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-dev.txt
pass_env =
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AZURE_TENANT_ID
AZURE_CLIENT_ID
AZURE_CLIENT_SECRET
AZURE_QUANTUM_SUBSCRIPTION_ID
AZURE_QUANTUM_WORKSPACE_RG
AZURE_QUANTUM_WORKSPACE_NAME
AZURE_QUANTUM_CONNECTION_STRING
OQC_AUTH_TOKEN
IONQ_API_KEY
QISKIT_IBM_TOKEN
QISKIT_IBM_INSTANCE
QBRAID_API_KEY
QBRAID_RUN_REMOTE_TESTS
[testenv:unit-tests]
description = Run pytests for main package and generate coverage report.
commands =
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.
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 bin tests
[testenv:pylint]
envdir = .tox/linters
skip_install = true
deps = pylint
commands =
pylint {posargs} qbraid bin tests
[testenv:black]
envdir = .tox/linters
skip_install = true
deps = black<=25.12.0
commands =
black qbraid bin tests {posargs}
[testenv:mypy]
envdir = .tox/linters
skip_install = true
deps = mypy
commands =
mypy qbraid tests bin {posargs}
[testenv:ruff]
envdir = .tox/linters
skip_install = true
deps = ruff
commands =
ruff check qbraid tests bin {posargs}
[testenv:headers]
envdir = .tox/linters
skip_install = true
deps = qbraid-cli>=0.12.0
commands =
qbraid admin headers tests bin qbraid --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:ruff]deps}
{[testenv:headers]deps}
commands =
{[testenv:pylint]commands}
{[testenv:isort]commands} {posargs:--check-only}
{[testenv:black]commands} {posargs:--check}
{[testenv:ruff]commands}
{[testenv:headers]commands}