-
Notifications
You must be signed in to change notification settings - Fork 55
/
tox.ini
130 lines (118 loc) · 2.38 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.7
envlist = lint,py{39,310,311,312},docs,manifest,pypi-description
[testenv]
description = run the test suite
usedevelop = true
setenv =
PYTHONPATH = {toxinidir}
passenv =
GDAL_VERSION
CPLUS_INCLUDE_PATH
C_INCLUDE_PATH
commands =
python -m pip install GDAL=={env:GDAL_VERSION}
coverage run pytest {posargs}
extras =
dev
test
[testenv:cleanup]
description = remove coverage files
deps =
coverage
commands =
coverage erase
[testenv:docs]
description = run sphinx to build the documentation
allowlist_externals=make
changedir={toxinidir}/docs
setenv =
PYTHONPATH = {toxinidir}/src/centerline
deps =
sphinx
commands =
make {posargs:html}
[testenv:manifest]
basepython = python3
deps = check-manifest
skip_install = true
commands = check-manifest
[testenv:pypi-description]
basepython = python3
skip_install = true
deps =
twine
pip>=19.0.1
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:lint]
basepython=python3
skip_install=true
deps =
flake8
isort
black
commands =
flake8
isort . --check
black --check .
[testenv:changelog]
description = build the changelog
basepython = python3
skip_install = true
deps =
towncrier>=18.6.0
commands =
towncrier {posargs}
[testenv:release]
description = build the changelog, bump the package version, commit and tag
basepython = python3
skip_install = true
allowlist_externals =
git
tox
passenv =
HOME
deps =
bumpversion>=0.5.3
commands_pre =
tox -e changelog -- --yes
git commit -m "Build changelog"
bumpversion {posargs:minor}
commands =
git push origin
git push origin --tags
[testenv:build]
description = build the package
basepython = python3
isolated_build = True
skip_install = true
setenv =
PYTHONPATH = {toxinidir}
requires =
setuptools>=42.0.2
wheel>=0.33.6
deps =
build>=0.8.0
twine>=3.1.1
commands =
python -m build --sdist --wheel --outdir dist/ .
commands_post =
twine check dist/*
[testenv:deploy]
description = build the package and deploy it to PyPI.org
basepython = python3
isolated_build = True
skip_install = true
setenv =
PYTHONPATH = {toxinidir}
requires =
setuptools>=42.0.2
wheel>=0.33.6
deps =
twine>=3.1.1
commands_pre =
tox -e build
commands =
twine upload {posargs} --repository centerline --skip-existing dist/*