-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
90 lines (80 loc) · 1.89 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.2.0
envlist =
unit-tests
docs
linters
format-check
skip_missing_interpreter = true
[testenv]
commands_pre = python -m pip install .
basepython = python3
[testenv:unit-tests]
description = Run pytests and generate coverage report.
extras =
test
cli
commands =
pytest tests --cov=pyqasm --cov-config=pyproject.toml --cov-report=term --cov-report=xml {posargs}
[testenv:docs]
description = Use sphinx to build the HTML docs.
extras =
docs
commands =
sphinx-build -W -b html docs/ docs/build/html {posargs}
[testenv:isort]
envdir = .tox/linters
skip_install = true
deps = isort>=6.0.0
commands =
isort {posargs} src tests bin examples
[testenv:pylint]
envdir = .tox/linters
skip_install = true
deps = pylint
commands =
pylint {posargs} src tests bin examples
[testenv:black]
envdir = .tox/linters
skip_install = true
deps = black
commands =
black src tests bin examples {posargs}
[testenv:mypy]
envdir = .tox/linters
skip_install = true
deps = mypy
commands =
mypy src examples
[testenv:headers]
envdir = .tox/linters
skip_install = true
deps = qbraid-cli>=0.9.9
commands =
qbraid admin headers src tests bin examples --skip=src/pyqasm/_version.py --type=gpl -p PyQASM {posargs}
[testenv:linters]
envdir = .tox/linters
skip_install = true
deps =
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:headers]deps}
commands =
{[testenv:isort]commands}
{[testenv:black]commands}
{[testenv:headers]commands} {posargs:--fix}
[testenv:format-check]
envdir = .tox/linters
skip_install = true
deps =
{[testenv:pylint]deps}
{[testenv:isort]deps}
{[testenv:black]deps}
{[testenv:mypy]deps}
{[testenv:headers]deps}
commands =
{[testenv:pylint]commands}
{[testenv:isort]commands} {posargs:--check-only}
{[testenv:black]commands} {posargs:--check}
{[testenv:mypy]commands}
{[testenv:headers]commands}