forked from bloomberg/attrs-strict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
113 lines (101 loc) · 3.2 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
[tox]
envlist =
py27,
py36,
py37,
pypy,
pypy3,
coverage,
fix_lint,
docs,
package_description,
minversion = 3.7
isolated_build = true
skip_missing_interpreters = true
[testenv]
description = run the tests with pytest under {basepython}
setenv = PIP_DISABLE_VERSION_CHECK = 1
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
passenv = http_proxy https_proxy no_proxy SSL_CERT_FILE PYTEST_*
deps =
pytest
pytest-cov
py{27,py}: mock
py{27,py}: typing
changedir = tests
commands = python -m pytest \
--cov attrs_strict \
--cov-config "{toxinidir}/tox.ini" \
--junitxml {toxworkdir}/junit.{envname}.xml \
{posargs:.}
[testenv:docs]
description = invoke sphinx-build to build the HTML docs
basepython = python3.7
deps =
sphinx
commands = sphinx-build -d "{toxworkdir}/docs_doctree" "{toxinidir}/doc" "{toxworkdir}/docs_out" --color -W -bhtml {posargs}
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[testenv:package_description]
changedir = {toxinidir}
description = check that the long description is valid
basepython = python3.7
deps = twine >= 1.12.1
readme-renderer[md] >= 24.0
pep517
skip_install = true
commands = python -m pep517.build -s -b . -o {envtmpdir}
twine check {envtmpdir}/*
[testenv:pypi_publish]
changedir = {toxinidir}
description = Upload a new package to pypi
basepython = python3.7
deps = twine >= 1.12.1
pep517
passenv = TWINE_PASSWORD https_proxy no_proxy
skip_install = true
commands = python -m pep517.build -s -b . -o {envtmpdir}
twine upload --verbose -u __token__ {envtmpdir}/*
[testenv:fix_lint]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
basepython = python3.7
changedir = {toxinidir}
passenv = {[testenv]passenv}
# without PROGRAMDATA cloning using git for Windows will fail with an
# `error setting certificate verify locations` error
PROGRAMDATA
deps = pre-commit >= 1.14.4, < 2
skip_install = True
commands = pre-commit run --all-files --show-diff-on-failure
python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
line_length = 80
known_first_party = attrs_strict,tests
known_third_party = attr,pytest,setuptools
[flake8]
max-complexity = 22
max-line-length = 80
[pep8]
max-line-length = 80
[coverage:run]
branch = true
parallel = true
[coverage:report]
skip_covered = True
show_missing = True
exclude_lines =
\#\s*pragma: no cover
^\s*raise AssertionError\b
^\s*raise NotImplementedError\b
^\s*return NotImplemented\b
^\s*raise$
^if __name__ == ['"]__main__['"]:$
[coverage:paths]
source = attrs_strict
*/.tox/*/lib/python*/site-packages/attrs_strict
*/.tox/pypy*/site-packages/attrs_strict
*/.tox\*\Lib\site-packages\attrs_strict
*/attrs_strict
*\attrs_strict