-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtox.ini
90 lines (82 loc) · 2.35 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 = 4.11
envlist = py39, py310, py311, py312, qiskit-{v0.45,v0.46,v1.0,v1.1}
skip_missing_interpreters = True
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv]
package = editable
setenv =
TOXINIDIR = {toxinidir}
VIRTUALENV_PIP=23.3.2
[testenv:py{39,310,311,312}]
description =
Invoke pytest to run automated tests.
extras =
testing
commands =
python -m black --check src tests
python -m isort --check-only src tests
python -m pytest --doctest-modules --pylint --verbose --strict-markers src
python -m mypy -p iqm.qiskit_iqm
python -m pytest --cov iqm.qiskit_iqm --cov-report=term-missing --junitxml=test_report.xml --doctest-modules --pylint --pylint-rcfile=tests/.pylintrc --verbose --strict-markers tests
python -m mypy tests
[testenv:qiskit-{v0.45,v0.46,v1.0,v1.1}]
description =
Invoke pytest to run automated tests for all supported Qiskit versions.
base_python = py310: python3.10
deps =
v0.45: qiskit >= 0.45, <0.46
v0.45: qiskit-aer >= 0.13.1, <0.14
v0.46: qiskit >= 0.46, <0.47
v0.46: qiskit-aer >= 0.13.1, < 0.14
v1.0: qiskit >= 1.0, <1.1
v1.1: qiskit >= 1.1, <1.2
extras =
testing
commands =
python -m pytest --cov iqm.qiskit_iqm --cov-report=term-missing --junitxml=test_report.xml --doctest-modules --pylint --pylint-rcfile=tests/.pylintrc --verbose --strict-markers tests
[testenv:test_resonance_example]
passenv =
RESONANCE_API_KEY
description =
Invoke pytest to run Resonance example against the real Resonance.
extras =
testing
commands =
python -m iqm.qiskit_iqm.examples.resonance_example --token {env:RESONANCE_API_KEY} --url https://cocos.resonance.meetiqm.com/pyrite:test
[testenv:format]
description =
Format the codebase.
skip_install = True
changedir = {toxinidir}
deps =
black ~= 23.12
isort ~= 5.13
commands =
python -m black src tests
python -m isort src tests
[testenv:docs]
description =
Invoke sphinx to build the docs.
setenv =
DOCSDIR = {toxinidir}/docs
BUILDDIR = {toxinidir}/build/sphinx
BUILD = html
extras =
docs
commands =
sphinx-build -b {env:BUILD} "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" -W
[testenv:build]
description =
Build the package.
skip_install = True
changedir = {toxinidir}
deps =
build[virtualenv] == 1.0.3
commands =
python -m build