-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
93 lines (82 loc) · 1.94 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
91
92
93
[tox]
min_version = 4.0
envlist =
lint
py311
py310
py39
py38
py37
type
docs
pkg_meta
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest under {envname}
deps =
PyYAML
pytest
pytest-cov
pytest-mock
commands =
pytest tests/
[testenv:lint]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
base_python = py311
skip_install = true
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")'
[testenv:type]
description = run type check on code base
base_python = py37
deps =
mypy
pytest
types-PyMySQL
types-PyYAML
types-decorator
types-requests
commands =
mypy src/toolforge
[testenv:docs]
description = generate documentation with sphinx
base_python = py311
deps =
PyYAML
sphinx
sphinx_rtd_theme
commands =
sphinx-build -d "{envtmpdir}{/}doctree" docs "{toxinidir}{/}dist{/}docs" --color -b html {posargs}
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]>=0.10
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
dictionaries = en_US,python,technical
whitelist = .local-dictionary.txt
[pytest]
addopts = --cov=toolforge --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