forked from spotify/klio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
84 lines (73 loc) · 2.43 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
[tox]
envlist = py37,py38,docs,manifest,check-formatting,lint
[testenv]
install_command = python -m pip install {opts} {packages}
deps =
{toxinidir}/../core
extras = tests
commands =
coverage run -m pytest {posargs} -vv
[testenv:docs]
basepython = python3.7
extras = docs
deps =
{toxinidir}/../core
commands =
interrogate src --ignore-init-module --ignore-init-method \
--ignore-semiprivate --ignore-private \
--verbose --fail-under 0
interrogate tests --ignore-init-module --ignore-init-method \
--ignore-semiprivate --ignore-private \
--fail-under 0 --verbose
[testenv:manifest]
basepython = python3.7
deps = check-manifest
skip_install = true
commands = check-manifest
; This env just runs `black` and fails tox if it's not formatted correctly.
; If this env fails, run `tox -e format` locally in order to apply changes.
[testenv:check-formatting]
basepython = python3.7
deps = black==19.10b0
skip_install = true
commands =
black src/klio_cli tests --line-length 79 --diff --check --exclude tests/commands/job/utils/fixtures/expected/*
[testenv:format]
basepython = python3.7
deps = black==19.10b0
skip_install = true
commands =
black --line-length 79 src/klio_cli tests --exclude tests/commands/job/utils/fixtures/expected/*
[testenv:lint]
basepython = python3.7
deps =
flake8
flake8-import-order
apache-license-check
skip_install = true
commands =
flake8
apache-license-check src tests setup.py --include-empty --copyright "Spotify AB" --exclude tests/commands/job/utils/fixtures
; tool-specific config below
[flake8]
show-source = true
max-line-length = 80
exclude = .venv,.tox,.git,dist,doc,*.egg,build,tests/commands/job/utils/fixtures/expected
# comply with black
ignore = E203, W503
import-order-style = edited
application-import-names = klio_cli,tests,transforms
application-package-names = klio_core
[pytest]
addopts = -v --ignore tests/commands/job/utils/fixtures --cov=klio_cli --cov-report=xml:cobertura/coverage.xml --cov-report=term-missing
testpaths = tests
filterwarnings =
; 3rd party libraries haven't updated their string escaping (py36+)
ignore:invalid escape sequence:DeprecationWarning
; 3rd party libraries haven't updated their use of collections.abc (py37+)
ignore:Using or importing the ABCs from:DeprecationWarning
; required for mapping envs -> github runtimes
[gh-actions]
python =
3.7: py37, docs, manifest, check-formatting, lint
3.8: py38