forked from spotify/klio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
95 lines (84 loc) · 3.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
[tox]
envlist = {py37,py38}-beam{33,34,35},docs,manifest,check-formatting,lint
[testenv]
install_command = python -m pip install {opts} {packages}
extras = tests
deps =
{toxinidir}/../core
beam33: apache-beam[gcp]>=2.33.0,<2.34.0
beam34: apache-beam[gcp]>=2.34.0,<2.35.0
beam35: apache-beam[gcp]>=2.35.0,<2.36.0
commands =
coverage run -m pytest {posargs}
[testenv:docs]
basepython = python3.7
extras = docs
; this otherwise inherits from [testenv]
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]
; a safety check for source distributions
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 tests --line-length 79 --diff --check
[testenv:format]
basepython = python3.7
deps = black==19.10b0
skip_install = true
commands =
black --line-length 79 src/klio tests
[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'
; The sections defined below are for configuring specific tools that are used
; in the above testenvs. Usually, if the tool is ran directly/outside of tox,
; i.e. `(env) $ pytest`, it will still pick up this configuration.
[flake8]
show-source = true
max-line-length = 80
exclude = .venv,.tox,.git,dist,doc,*.egg,build
import-order-style = edited
application-import-names = klio,tests
application-package-names = klio_core
[pytest]
addopts = -v --cov=klio --cov-config .coveragerc --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
; Apache Beam-related warnings
ignore:Running the Apache Beam SDK on Python 3:UserWarning
ignore:Some syntactic constructs of Python 3 are not yet fully supported by Apache Beam:UserWarning
ignore:the imp module is deprecated in favour of importlib:DeprecationWarning
ignore:You are using Apache Beam with Python 2:UserWarning
; protobuf & past packages (via Apache Beam) hasn't updated use of collections
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated:DeprecationWarning
; required for mapping envs -> github runtimes/envs
; will inherently run all beam versions in `envlist` per py version
[gh-actions]
python =
3.7: py37, docs, manifest, check-formatting,lint
3.8: py38