-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
tox.ini
96 lines (87 loc) · 2.04 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
[tox]
minversion = 3.3.0
isolated_build = True
skip_missing_interpreters = true
[testenv]
description = Test that the tzdata contents are accessible
deps =
pytest
pytest-subtests; python_version>='3.6'
importlib_resources; python_version<'3.7'
commands =
pytest {toxinidir} {posargs}
[testenv:precommit]
description = Run the pre-commit hooks on all files
deps =
pre-commit
commands =
pre-commit install -f --install-hooks
pre-commit run --all-files
[testenv:update]
description = Update the tzdata contents
skip_install = True
deps =
requests
click
parver
commands =
python update.py {posargs}
[testenv:bump]
description = Bump the current package version
skip_install = True
deps =
parver
commands =
python bump_version.py {posargs}
[testenv:typing]
description = Run typechecking
skip_install = True
deps =
mypy
parver
types-requests
types-click
commands =
mypy {posargs} update.py
mypy {posargs} bump_version.py
[testenv:format]
description = Run auto formatters
skip_install = True
deps =
black
isort >= 5.0.0
commands =
black .
isort update.py
isort --atomic -rc tests
[testenv:docs]
description = Build the documentation
deps =
-rdocs/requirements.txt
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" "{toxinidir}/docs" \
"{toxinidir}/docs/_output" {posargs: -j auto --color -bhtml}
[testenv:build]
description = Build a wheel and source distribution
skip_install = True
deps =
build
twine
commands =
python -c "from pathlib import Path; \
[x.unlink(missing_ok=True) for x in Path('{toxinidir}/dist').glob('*')]"
python -m build -o {toxinidir}/dist {toxinidir}
twine check {toxinidir}/dist/*
[testenv:release]
description = Make a release; must be called after "build"
skip_install = True
deps =
twine
depends =
build
passenv =
TWINE_*
commands =
twine check {toxinidir}/dist/*
twine upload {toxinidir}/dist/* \
{posargs:-r {env:TWINE_REPOSITORY:testpypi} --non-interactive}