File: tox.ini

package info (click to toggle)
python-semver 2.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 296 kB
  • sloc: python: 1,589; makefile: 29
file content (70 lines) | stat: -rw-r--r-- 1,433 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
[tox]
envlist =
    flake8
    py{27,34,35,36,37}
    pypy

[testenv]
description = Run test suite
whitelist_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:docstrings]
description = Check for PEP257 compatible docstrings
basepython = python3
deps = docformatter
commands = docformatter --check {posargs:--pre-summary-newline semver.py}

[testenv:checks]
description = Run code style checks
basepython = python3
deps =
    {[testenv:black]deps}
    {[testenv:flake8]deps}
    {[testenv:docstrings]deps}
commands =
    {[testenv:black]commands}
    {[testenv:flake8]commands}
    {[testenv:docstrings]commands}

[testenv:docs]
description = Build HTML documentation
basepython = python3
deps = -r{toxinidir}/docs/requirements.txt
skip_install = true
commands = make -C docs 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 --universal
    twine check dist/*