/
tox.ini
96 lines (80 loc) · 1.79 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]
envlist = lint, py, optional-artifactory, coverage-report, pypi-description
isolated_build = True
[testenv]
deps = -r requirements.txt
extras = tests
commands = pytest --cov --cov-config=tox.ini --cov-append --cov-report= {posargs}
[testenv:optional-artifactory]
deps = -r requirements.txt
extras = tests,artifactory
commands = pytest {posargs} --cov --cov-config=tox.ini --cov-append --cov-report= -k test_artifactory
[testenv:coverage-report]
skip-install = True
deps = coverage
commands =
coverage report
coverage xml
coverage html
coverage erase
[testenv:lint]
skip_install = True
deps = pre-commit
commands = pre-commit run --all-files
[testenv:docs]
extras = docs
passenv =
REQUESTS_CA_BUNDLE
http_proxy
https_proxy
setenv =
ML_LOGGING=0
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
python -m doctest README.md
[testenv:pypi-description]
skip_install = True
deps =
twine
pip >= 18.0.0
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
[testenv:black]
skip_install = True
deps = black
commands = black src tests {posargs}
[testenv:mypy]
skip_install = True
deps = mypy
commands = mypy --ignore-missing-imports ./src
[flake8]
max-line-length = 100
ignore = W605,W503
exclude =
.git
build
dist
notebooks
__pycache__
.tox
.pytest_cache
*.egg-info
[coverage:run]
source = ml_tooling
branch = true
[coverage:report]
exclude_lines = def __repr__
raise NotImplementedError
except ImportError
show_missing = true
[coverage:paths]
source =
src
.tox/*/site-packages
[pytest]
addopts = -ral
testpaths = tests
filterwarnings =
once::Warning