-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
61 lines (54 loc) · 1.23 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
# Tox (https://tox.wiki/) - run tests in isolation using virtualenv.
[tox]
envlist =
lint
format
py3{8,9,10,11,12}
pypy3{8,9}
package
docs
clean
[testenv]
description = Unit tests
deps =
coverage[toml]
pytest
commands =
coverage run -m pytest {posargs:tests}
coverage xml
coverage report
[testenv:clean]
description = Remove bytecode and other debris
skip_install = true
deps = pyclean
commands = pyclean {posargs:. --debris --erase docs/_build/**/* docs/_build/ tests/junit-report.xml --yes}
[testenv:docs]
description = Build package documentation (HTML)
skip_install = true
deps = sphinx
changedir = docs
commands = make html
allowlist_externals = make
[testenv:format]
description = Ensure consistent code style (Ruff)
skip_install = true
deps = ruff
commands = ruff format {posargs:--check --diff .}
[testenv:lint]
description = Lightening-fast linting (Ruff)
skip_install = true
deps = ruff
commands = ruff check {posargs:.}
[testenv:package]
description = Build package and check metadata (or upload package)
skip_install = true
deps =
build
twine
commands =
python -m build
twine {posargs:check --strict} dist/*
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL