-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
55 lines (50 loc) · 1023 Bytes
/
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
[tox]
requires =
tox
env_list = format, lint, py{38,39,310,311}
[testenv]
description = run unit tests
deps =
pytest
pytest-sugar
commands =
pytest {posargs:tests}
[testenv:format]
description = run formatters
skip_install = true
deps =
black
commands =
black -l 79 {posargs:.}
[testenv:lint]
description = run linters
skip_install = true
deps =
flake8
flake8-docstrings
commands =
flake8 --docstring-convention pep257 {posargs:resolve_hosts}
[testenv:type]
description = run type checks
deps =
mypy
types-setuptools
types-tabulate
types-ujson
commands =
mypy {posargs:tests resolve_hosts}
[testenv:release]
# specify Python 3 to use platform's default Python 3
basepython = python3
deps =
build
twine
passenv =
TWINE_PASSWORD
TWINE_REPOSITORY
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python3 -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python3 -m build
python3 -m twine upload dist/*