forked from econchick/interrogate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (59 loc) · 1.67 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
[tox]
minversion = 3.4.0
envlist = py{36,37,38,39,310},lint,check-formatting,manifest
isolated_build = True
[testenv]
; TODO: fix CI workflows when installing `png` extras
extras = tests
commands = python -m pytest {posargs}
[testenv:lint]
basepython = python3.8
deps =
pre-commit
commands = pre-commit run --all-files
; This env just runs `black` and fails tox if it's not formatted correctly.
; If this env fails on CI, run `tox -e format` locally in order to apply changes.
[testenv:check-formatting]
basepython = python3.8
deps = black==21.8b0
skip_install = true
commands =
black src tests --diff --check --config {toxinidir}/pyproject.toml
[testenv:docs]
basepython = python3.8
extras = docs
commands =
interrogate --config {toxinidir}/pyproject.toml
sphinx-build -n -T -b html -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:manifest]
basepython = python3.8
deps = check-manifest
skip_install = true
commands = check-manifest
[testenv:format]
basepython = python3.8
deps = black==21.8b0
skip_install = true
commands =
black src tests --config {toxinidir}/pyproject.toml
[testenv:generate-badge]
basepython = python3.8
commands =
interrogate --config {toxinidir}/pyproject.toml --generate-badge {toxinidir}/docs/_static
; tool-specific config below
[flake8]
show-source = true
max-line-length = 80
exclude = .venv,.tox,.git,dist,doc,*.egg,build,tests/functional/sample
# comply with black
ignore = E203, E231, W503
[pytest]
addopts = -v --cov=interrogate --cov-report=xml:coverage.xml --cov-report=term-missing
testpaths = tests
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38, docs, lint, manifest, check-formatting
3.9: py39
3.10: py310