-
Notifications
You must be signed in to change notification settings - Fork 32
/
tox.ini
95 lines (82 loc) · 1.74 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
[tox]
envlist = py{37,38,39,310,311,312},lint,typing
[testenv]
pip_pre = False
deps =
idna
-rdev-requirements.txt
commands =
py.test {posargs:--cov rfc3986 --cov-fail-under 100 tests/}
[testenv:pypy]
deps = {[testenv]deps}
commands = py.test {posargs}
[testenv:pre-commit]
basepython = python3
skip_install = true
deps = pre-commit
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:lint]
basepython = python3
skip_install = true
deps =
{[testenv:flake8]deps}
isort
black
commands =
isort src/rfc3986 tests/
black {env:BLACK_ARGS:} src/rfc3986 tests/
{[testenv:flake8]commands}
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8
flake8-docstrings
commands = flake8 {posargs} src/rfc3986
[testenv:typing]
deps =
pyright
commands = python tests/verify_types.py
[testenv:venv]
commands = {posargs}
[testenv:build]
deps =
build
wheel
commands =
python -m build
[testenv:release]
deps =
{[testenv:build]deps}
twine>=1.4.0
commands =
python -c 'import shutil; shutil.rmtree("dist/", ignore_errors=True); shutil.rmtree("build/", ignore_errors=True)'
{[testenv:build]commands}
twine upload {posargs:--skip-existing dist/*}
[testenv:docs]
basepython = python3
deps =
-rdocs/source/requirements.txt
commands =
sphinx-build -WE -c docs/source/ -b html docs/source/ docs/build/html
sphinx-build -WE -c docs/source/ -b doctest docs/source/ docs/build/html
[testenv:readme]
deps =
readme
commands =
python setup.py check -r -s
[pytest]
addopts = -q
norecursedirs = *.egg .git .* _*
[flake8]
extend-ignore = D203, W503, E203
exclude =
.tox,
.git,
__pycache__,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10