forked from qiskit-community/qiskit-machine-learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
87 lines (78 loc) · 2.36 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
[tox]
# Sets this min.version because of differences with env_tmp_dir env.
minversion = 4.0.2
envlist = py39, py310, py311, py312, lint, gpu, gpu-amd
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -c constraints.txt -U {opts} {packages}
passenv = *
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
ARGS="-V"
deps = git+https://github.com/Qiskit/qiskit.git
git+https://github.com/Qiskit/qiskit-aer.git
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-dev.txt
torch
sparse
commands =
stestr run {posargs}
[testenv:gpu]
basepython = python3
setenv =
{[testenv]setenv}
QISKIT_GPU=true
deps =
{[testenv]deps}
qiskit-aer-gpu; sys_platform == 'linux'
commands =
python3 {toxinidir}/tools/find_gpu_decorated_methods.py -path {env_tmp_dir}/include_list.log
stestr run --serial --include-list {env_tmp_dir}/include_list.log {posargs}
[testenv:gpu-amd]
basepython = python3
platform = linux
setenv =
{[testenv]setenv}
QISKIT_GPU=true
deps =
{[testenv]deps}
qiskit-aer-gpu; sys_platform == 'linux'
commands =
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm4.5.2
python3 {toxinidir}/tools/find_gpu_decorated_methods.py -path {env_tmp_dir}/include_list.log
stestr run --serial --include-list {env_tmp_dir}/include_list.log {posargs}
[testenv:lint]
envdir = .tox/lint
basepython = python3
commands =
black --check {posargs} qiskit_machine_learning test tools docs
pylint -rn qiskit_machine_learning test tools
mypy qiskit_machine_learning test tools
python3 {toxinidir}/tools/check_copyright.py -path {toxinidir}
python3 {toxinidir}/tools/verify_headers.py qiskit_machine_learning test tools
python3 {toxinidir}/tools/find_stray_release_notes.py
[testenv:black]
envdir = .tox/lint
commands = black {posargs} qiskit_machine_learning test tools docs
[testenv:coverage]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage3 run --source qiskit_machine_learning --parallel-mode
commands =
stestr run {posargs}
coverage3 combine
coverage3 report
[testenv:docs]
envdir = .tox/docs
basepython = python3
commands =
sphinx-build -j auto -W -T --keep-going -b html {posargs} docs/ docs/_build/html
[testenv:docs-clean]
skip_install = true
deps =
allowlist_externals = rm
commands = rm -rf {toxinidir}/docs/stubs/ {toxinidir}/docs/_build