This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
generated from qiskit-community/quantum-prototype-template
-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
56 lines (50 loc) · 1.42 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
[tox]
minversion = 2.4
envlist = py36, py37, py38, py39, py310, lint, coverage, docs
# CI: skip-next-line
skip_missing_interpreters = true
[testenv]
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
passenv = QISKIT_IBM_*
deps =
-rrequirements.txt
-rrequirements-dev.txt
extras = notebook-dependencies
commands =
pip check
python -m pytest {posargs}
treon docs --threads 2
[testenv:lint]
commands =
black --check .
pylint -rn --py-version=3.7 --disable=fixme,invalid-name,missing-function-docstring,protected-access,duplicate-code qrao tests
nbqa pylint -rn --py-version=3.7 --disable=missing-module-docstring,wrong-import-position,invalid-name,missing-function-docstring,pointless-statement,duplicate-code docs/ tests/
mypy qrao tests
[testenv:black]
skip_install = true
deps =
-rrequirements-dev.txt
extras =
commands = black .
[testenv:coverage]
basepython = python3
setenv =
{[testenv]setenv}
extras =
commands =
coverage3 run --source qrao --parallel-mode -m pytest {posargs}
coverage3 combine
coverage3 html
coverage3 report --fail-under=80
[testenv:docs]
deps =
-rrequirements-dev.txt
commands =
python -c 'import shutil, pathlib; shutil.rmtree(pathlib.Path("docs") / "stubs", ignore_errors=True)'
sphinx-build -b html -W {posargs} docs/ docs/_build/html
[pytest]
addopts = --verbose --doctest-modules --capture=no --durations=10