-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
85 lines (74 loc) · 1.67 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
[tox]
requires =
tox>=4.2
env_list =
lint
py311
py310
py39
py38
py37
docs
pkg_meta
skip_missing_interpreters = true
[testenv]
deps =
pytest
pytest-cov
pytest-mock
set_env =
PYTHONDONTWRITEBYTECODE = true
commands =
pytest tests/
[testenv:lint]
base_python = py311
deps =
pre-commit>=3.2
commands =
pre-commit run --all-files --show-diff-on-failure {posargs}
python -c 'print(r"hint: run {envbindir}{/}pre-commit install to add checks as pre-commit hook")'
escription = format the code base to adhere to our styles, and complain about what we cannot do automatically
[testenv:docs]
deps =
sphinx
sphinx_rtd_theme
commands =
sphinx-build -q -W -b html -d "{envtmpdir}{/}doctree" docs "{toxinidir}{/}dist{/}docs"
python -c 'print(r"documentation available under file://{toxinidir}{/}dist{/}docs{/}index.html")'
[testenv:pkg_meta]
description = check that generated pacakges are valid
base_python = py311
skip_install = true
deps =
build[virtualenv]>=1.0.3
check-wheel-contents>=0.4
twine>=4.0.2
commands =
python3 -m build --outdir {envtmpdir} --sdist --wheel .
twine check --strict {envtmpdir}{/}*
check-wheel-contents {envtmpdir}
[flake8]
exclude = .tox
max_line_length = 120
count = 1
show-pep8 = 1
show-source = 1
statistics = 1
[pytest]
addopts = --cov=ib3 --cov-report=term --cov-report=html --cov-report=xml
[coverage:run]
branch = True
[coverage:report]
show_missing = True
skip_empty = True
[coverage:html]
directory = dist/htmlcov
[coverage:xml]
output = dist/coverage.xml
[gh]
python =
3.7 = py37
3.8 = py38
3.9 = py39
3.10 = py310
3.11 = lint, py311, docs, pkg_meta