forked from python-semver/python-semver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
108 lines (89 loc) · 2.09 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
[tox]
envlist =
checks
py{36,37,38,39,310}
isolated_build = True
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
[testenv]
description = Run test suite for {basepython}
allowlist_externals = make
commands = pytest {posargs:}
deps =
pytest
pytest-cov
setenv =
PIP_DISABLE_PIP_VERSION_CHECK = 1
[testenv:black]
description = Check for formatting changes
basepython = python3
deps = black
commands = black --check {posargs:.}
[testenv:flake8]
description = Check code style
basepython = python3
deps = flake8
commands = flake8 {posargs:}
[testenv:mypy]
description = Check code style
basepython = python3
deps = mypy
commands = mypy {posargs:--ignore-missing-imports --check-untyped-defs src}
[testenv:docstrings]
description = Check for PEP257 compatible docstrings
basepython = python3
deps = docformatter
commands = docformatter --check {posargs:--pre-summary-newline -r src}
[testenv:checks]
description = Run code style checks
basepython = python3
deps =
{[testenv:black]deps}
{[testenv:flake8]deps}
{[testenv:mypy]deps}
{[testenv:docstrings]deps}
commands =
{[testenv:black]commands}
{[testenv:flake8]commands}
{[testenv:mypy]commands}
{[testenv:docstrings]commands}
[testenv:docs]
description = Build HTML documentation
basepython = python3
deps = -r{toxinidir}/docs/requirements.txt
skip_install = true
allowlist_externals =
make
echo
commands =
make -C docs html
commands_post =
echo "Find the HTML documentation at {toxinidir}/docs/_build/html/index.html"
[testenv:man]
description = Build the manpage
basepython = python3
deps = sphinx
skip_install = true
commands = make -C docs man
[testenv:prepare-dist]
description = Prepare for TestPyPI
basepython = python3
deps =
wheel
twine
commands =
python3 setup.py sdist bdist_wheel
twine check dist/*
[testenv:changelog]
description = Run towncrier to check, build, or create the CHANGELOG.rst
basepython = python3
skip_install = true
deps =
git+https://github.com/twisted/towncrier.git
commands =
towncrier {posargs:build --draft}