mirror of https://github.com/Qiskit/qiskit.git
91 lines
3.0 KiB
INI
91 lines
3.0 KiB
INI
[tox]
|
|
minversion = 3.3.0
|
|
envlist = py37, py38, py39, py310, py311, lint-incr
|
|
isolated_build = true
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -c{toxinidir}/constraints.txt -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
LANGUAGE=en_US
|
|
LC_ALL=en_US.utf-8
|
|
ARGS="-V"
|
|
QISKIT_SUPRESS_PACKAGING_WARNINGS=Y
|
|
QISKIT_TEST_CAPTURE_STREAMS=1
|
|
QISKIT_PARALLEL=FALSE
|
|
passenv = RAYON_NUM_THREADS, OMP_NUM_THREADS, QISKIT_PARALLEL, RUST_BACKTRACE, SETUPTOOLS_ENABLE_FEATURES, QISKIT_TESTS, QISKIT_IN_PARALLEL
|
|
deps = setuptools_rust # This is work around for the bug of tox 3 (see #8606 for more details.)
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/requirements-dev.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
|
|
[testenv:lint]
|
|
envdir = .tox/lint
|
|
basepython = python3
|
|
commands =
|
|
black --check {posargs} qiskit test tools examples setup.py
|
|
pylint -rn qiskit test tools
|
|
# This line is commented out until #6649 merges. We can't run this currently
|
|
# via tox because tox doesn't support globbing
|
|
# pylint -rn --disable='invalid-name,missing-module-docstring,redefined-outer-name' examples/python/*.py
|
|
{toxinidir}/tools/verify_headers.py qiskit test tools examples
|
|
{toxinidir}/tools/find_optional_imports.py
|
|
{toxinidir}/tools/find_stray_release_notes.py
|
|
reno lint
|
|
|
|
[testenv:lint-incr]
|
|
envdir = .tox/lint
|
|
basepython = python3
|
|
allowlist_externals = git
|
|
commands =
|
|
black --check {posargs} qiskit test tools examples setup.py
|
|
-git fetch -q https://github.com/Qiskit/qiskit-terra.git :lint_incr_latest
|
|
{toxinidir}/tools/pylint_incr.py -rn -j4 -sn --paths :/qiskit/*.py :/test/*.py :/tools/*.py
|
|
{toxinidir}/tools/pylint_incr.py -rn -j4 -sn --disable='invalid-name,missing-module-docstring,redefined-outer-name' --paths :(glob,top)examples/python/*.py
|
|
{toxinidir}/tools/verify_headers.py qiskit test tools examples
|
|
{toxinidir}/tools/find_optional_imports.py
|
|
{toxinidir}/tools/find_stray_release_notes.py
|
|
reno lint
|
|
|
|
[testenv:black]
|
|
envdir = .tox/lint
|
|
commands = black {posargs} qiskit test tools examples setup.py
|
|
|
|
[testenv:coverage]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage3 run --source qiskit --parallel-mode
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/requirements-dev.txt
|
|
qiskit-aer
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage3 combine
|
|
coverage3 report
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
QISKIT_SUPPRESS_PACKAGING_WARNINGS=Y
|
|
deps =
|
|
setuptools_rust # This is work around for the bug of tox 3 (see #8606 for more details.)
|
|
-r{toxinidir}/requirements-dev.txt
|
|
qiskit-aer
|
|
commands =
|
|
sphinx-build -W -j auto -T --keep-going -b html docs/ docs/_build/html {posargs}
|
|
|
|
[pycodestyle]
|
|
max-line-length = 105
|
|
# default ignores + E741 because of opflow global variable I
|
|
# + E203 because of a difference of opinion with black
|
|
# codebase does currently comply with: E133, E242, E704, W505
|
|
ignore = E121, E123, E126, E133, E226, E241, E242, E704, W503, W504, W505, E741, E203
|
|
|
|
[flake8]
|
|
max-line-length = 105
|
|
extend-ignore = E203, E741
|