-
Notifications
You must be signed in to change notification settings - Fork 306
/
Copy pathtox.ini
84 lines (76 loc) · 1.71 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
[tox]
minversion = 2.4
envlist = lint,types,py{36,37,38},docs
[testenv]
deps =
coverage
pretend
pytest
jaraco.envs
portend
pytest-services
munch
commands =
coverage run --source twine -m pytest {posargs:tests}
coverage report -m
coverage html
[testenv:docs]
deps =
-rdocs/requirements.txt
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
doc8 docs
sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
python setup.py sdist
twine check dist/*
[testenv:format]
skip_install = True
deps =
isort
black
commands =
isort --recursive twine/ tests/
black twine/ tests/
[testenv:lint]
skip_install = True
deps =
{[testenv:format]deps}
flake8
commands =
isort --check-only --diff --recursive twine/ tests/
black --check --diff twine/ tests/
flake8 twine/ tests/
[testenv:types]
skip_install = True
deps =
mypy
lxml
commands =
mypy --html-report mypy --txt-report mypy {posargs:twine}
python -c 'with open("mypy/index.txt") as f: print(f.read())'
[testenv:release]
# disabled for twine to cause it to upload itself
# skip_install = True
# specify Python 3 to use platform's default Python 3
basepython = python3
deps =
pep517>=0.5
twine>=1.13
path.py
passenv =
TWINE_PASSWORD
TWINE_REPOSITORY
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .
python -m twine upload dist/*
[testenv:devpi]
deps =
devpi-server
devpi
[testenv:pypiserver]
deps =
pypiserver