-
Notifications
You must be signed in to change notification settings - Fork 48
/
tox.ini
96 lines (83 loc) · 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
isolated_build = true
skip_missing_interpreters = true
parallel_show_output = true
envlist = lint,py37,docs
[testenv]
whitelist_externals =
poetry
skip_install = true
setenv =
PYTHONHASHSEED=0
PYTHONPATH={toxinidir}
;commands =
; poetry install -v
; {[testenv:test]commands}
[testenv:test]
skip_install = true
usedevelop = true
envdir = {toxworkdir}/py37
commands =
poetry install -v -E search -E mlflow
poetry run coverage erase
poetry run pytest --cov=kiwi --cov-report term --cov-report xml --cov-append {posargs:tests}
[testenv:lint]
skip_install = true
usedevelop = true
envdir = {toxworkdir}/py37
commands =
poetry install -v
poetry run flake8 {posargs:kiwi}
poetry run black --check {posargs:kiwi}
poetry run isort --check-only --diff --recursive {posargs:kiwi}
[testenv:py37]
commands =
poetry install -v
{[testenv:test]commands}
[testenv:docs]
skip_install = true
usedevelop = true
;envdir = {toxworkdir}/docs
envdir = {toxworkdir}/py37
changedir = {toxinidir}/docs
commands =
poetry install -v
; poetry run sphinx-apidoc -f -o source {toxinidir}/kiwi
poetry run sphinx-build -b html -d ./.doctrees . ../public
[testenv:gh-pages]
skip_install = true
usedevelop = true
envdir = {toxworkdir}/py37
commands =
poetry install -v
; poetry run sphinx-apidoc -f -o docs/source {toxinidir}/kiwi
poetry run sphinx-build -b html -d docs/.doctrees docs gh-pages
# Other packages config
[flake8]
max_line_length = 88
select = C,E,F,W,B,B950
ignore = W503,E203
[pytest]
python_files =
test_*.py
*_test.py
tests.py
norecursedirs =
.git
.tox
.env
dist
build
[coverage:run]
branch = true
parallel = true
omit =
kiwi/__main__.py
[coverage:report]
exclude_lines =
pragma: no cover
if __name__ == .__main__.: