forked from pypa/twine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
130 lines (118 loc) · 2.81 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
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
119
120
121
122
123
124
125
126
127
128
129
130
[tox]
minversion = 3.3
envlist = lint,types,py{37,38,39,310},integration,docs
isolated_build = True
[testenv]
deps =
pretend
pytest
pytest-socket
build
coverage
passenv =
PYTEST_ADDOPTS
commands =
python -m coverage run -m pytest --ignore-glob '*integration*.py'
python -m coverage html --show-contexts
python -m coverage report -m --fail-under 90
[testenv:integration]
deps =
{[testenv]deps}
jaraco.envs
munch
portend
pytest-rerunfailures
pytest-services
passenv =
PYTEST_ADDOPTS
commands =
pytest -r aR tests/test_integration.py
[testenv:docs]
deps =
-rdocs/requirements.txt
commands =
sphinx-build -W --keep-going -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W --keep-going -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
doc8 docs README.rst --ignore-path docs/_build/html
sphinx-build -W --keep-going -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
python -m twine check --strict {distdir}/*
[testenv:watch-docs]
deps =
-rdocs/requirements.txt
sphinx-autobuild
commands =
sphinx-autobuild -b html -d {envtmpdir}/doctrees \
--watch twine \
{posargs:--host 127.0.0.1} \
docs docs/_build/html
[testenv:format]
skip_install = True
deps =
isort
black
commands =
isort twine/ tests/
black twine/ tests/
[testenv:lint]
skip_install = True
deps =
{[testenv:format]deps}
flake8
flake8-docstrings
commands =
isort --check-only --diff twine/ tests/
black --check --diff twine/ tests/
flake8 twine/ tests/
[testenv:types]
deps =
mypy
lxml
# required for more thorough type declarations
keyring >= 22.3
# consider replacing with `mypy --install-types` when
# https://github.com/python/mypy/issues/10600 is resolved
types-requests
commands =
mypy --html-report mypy --txt-report mypy {posargs:twine}
python -c 'with open("mypy/index.txt") as f: print(f.read())'
[testenv:changelog]
basepython = python3
deps =
towncrier
commands =
towncrier build {posargs}
[testenv:release]
# specify Python 3 to use platform's default Python 3
basepython = python3
deps =
build
passenv =
TWINE_PASSWORD
TWINE_REPOSITORY
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import shutil; shutil.rmtree('dist', ignore_errors=True)"
python -m build
python -m twine upload dist/*
[testenv:dev]
envdir = {posargs:venv}
recreate = True
deps =
{[testenv]deps}
{[testenv:integration]deps}
{[testenv:format]deps}
{[testenv:lint]deps}
{[testenv:types]deps}
download = True
usedevelop = True
commands =
python -c 'import sys; print(sys.executable)'
python --version
[testenv:devpi]
deps =
devpi-server
devpi
[testenv:pypiserver]
deps =
pypiserver