qiskit-aer/tox.ini

57 lines
1.4 KiB
INI

[tox]
minversion = 2.1
envlist = py37, py38, py39, py310, py311, lint
skipsdist = True
[testenv]
install_command = pip install -c{toxinidir}/constraints.txt -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
SETUPTOOLS_ENABLE_FEATURES=legacy-editable
whitelist_externals = sh
deps =
-r requirements-dev.txt
build
commands =
python -I -m build --wheel -C=--build-option=-- -C=--build-option=-- -C=--build-option=-j4
pip install --find-links={toxinidir}/dist qiskit_aer
stestr run {posargs}
[testenv:coverage]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage3 run --source qiskit_aer --parallel-mode
commands =
stestr run {posargs}
coverage3 combine
coverage3 report
[testenv:lint]
envdir = .tox/lint
basepython = python3
commands =
sh tools/clang-format.sh --Werror -n
black --check {posargs} qiskit_aer test tools setup.py
pylint -j 2 -rn qiskit_aer
[testenv:clang-format]
envdir = .tox/lint
commands = sh tools/clang-format.sh -i
[testenv:black]
envdir = .tox/lint
commands = black qiskit_aer test tools setup.py
[testenv:docs]
deps =
-r requirements-dev.txt
build
qiskit-ibmq-provider
commands =
python -I -m build --wheel -C=--build-option=-- -C=--build-option=-- -C=--build-option=-j4
pip install --find-links={toxinidir}/dist qiskit_aer
sphinx-build -W -b html docs/ docs/_build/html -j auto {posargs}