File: tox.ini

package info (click to toggle)
python-semver 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 700 kB
  • sloc: python: 1,972; makefile: 28
file content (118 lines) | stat: -rw-r--r-- 2,273 bytes parent folder | download
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
110
111
112
113
114
115
116
117
118
[tox]
envlist =
    checks
    py3{7,8,9,10,11,12}
isolated_build = True
skip_missing_interpreters = True

[gh-actions]
python =
    # setuptools >=62 needs Python >=3.7
    3.7: py37,check
    3.8: py38
    3.9: py39
    3.10: py310
    3.11: py311
    3.12: py312


[testenv]
description = Run test suite for {basepython}
skip_install = true
allowlist_externals = make
commands = pytest {posargs:}
deps =
    pytest
    pytest-cov
    setuptools>=62.0
    setuptools-scm
setenv =
    PIP_DISABLE_PIP_VERSION_CHECK = 1


[testenv:black]
description = Check for formatting changes
basepython = python3
skip_install = true
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:src}


[testenv:docstrings]
description = Check for PEP257 compatible docstrings
basepython = python3
deps = docformatter
commands =
	docformatter --check --diff {posargs: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:docstrings]commands}
    {[testenv:black]commands}
    {[testenv:flake8]commands}
    {[testenv:mypy]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 =
    twine
    build
commands =
    # Same as python3 -m build
    pyproject-build
    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}