-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
109 lines (101 loc) · 2.39 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
[tox]
requires =
tox~=3.20
envlist =
py3.7
py3.8
py3.9
py3.10
py3.11
pypy3.9
coverage
skip_missing_interpreters = True
[testenv]
setenv =
VIRTUALENV_NO_DOWNLOAD=1
COVERAGE_FILE=.coverage.{envname}
deps =
-r {toxinidir}/requirements-tests.txt
-r {toxinidir}/requirements-lint.txt
commands =
flake8 {toxinidir}/src {toxinidir}/tests
mypy {toxinidir}/src {toxinidir}/tests
pytest --showlocals --cov=statsd --cov-report={env:COV_REPORT:} --no-cov-on-fail --junit-xml junit.{envname}.xml {toxinidir}/src/statsd {toxinidir}/tests
[testenv:coverage]
deps = coverage
skipsdist = true
skip_install = true
allowlist_externals = bash
basepython = python3.11
depends =
py3.7
py3.8
py3.9
py3.10
py3.11
pypy3.9
commands =
bash -c '{envpython} -m coverage combine --keep .coverage.py*'
coverage report
coverage html
coverage xml
[testenv:fmt]
skip_install = true
skipsdist = true
basepython = python3.11
deps = -r {toxinidir}/requirements-fmt.txt
commands =
black --config black.toml src tests
isort src tests
[testenv:clean]
skip_install = true
skipsdist = true
deps =
basepython = python3.11
allowlist_externals =
find
rm
commands =
find src tests -type f -name "*.pyc" -delete
find src tests -type f -name "*.pyo" -delete
find src tests -type f -name "*.pyd" -delete
find src tests -type d -name "__pycache__" -delete
find src tests -type f -name "*.c" -delete
find src tests -type f -name "*.so" -delete
find . src tests -type f -path "*.egg-info*" -delete
rm -rf .pytest_cache
rm -rf .mypy_cache
find . -type f -name "junit*.xml" -delete
rm -rf htmlcov
find . -type f -name "coverage*.xml" -delete
find . -type f -name ".coverage*" -delete
find . -type f -name "flake8.*" -delete
rm -rf dist build docs/build
[testenv:build]
skip_install = true
skipsdist = true
basepython = python3.11
deps = -r requirements-build.txt
depends =
clean
commands =
python -m build
twine check dist/*
[testenv:upload]
skip_install = true
skipsdist = true
basepython = python3.11
deps = -r requirements-build.txt
depends =
build
commands =
twine check dist/*
twine upload dist/*
[testenv:docs]
basepython = python3.11
deps = -r requirements-docs.txt
allowlist_externals =
rm
commands =
rm -rf docs/build
sphinx-build -v -W -b html docs/source docs/build