-
Notifications
You must be signed in to change notification settings - Fork 46
/
tox.ini
98 lines (83 loc) · 2.53 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
97
98
[tox]
envlist = py3,
py37
py38,
py39
skip_missing_interpreters = true
isolated_build = true
minversion = 3.7
distshare= {toxinidir}/dist/tox
[testenv]
changedir = .
passenv = *
setenv =
PYTHONPATH = {toxinidir}{:}{toxinidir}/test
PIP_DISABLE_PIP_VERSION_CHECK = 1
PIP_EXTRA_INDEX_URL={env:FACET_PATH_URI}/pytools/dist/tox/simple {env:FACET_PATH_URI}/sklearndf/dist/tox/simple
# We change the install command to build packages from source that depend on numpy's
# binary API.
# This is necessary to prevent the notorious "RuntimeError: module compiled against API
# version 0x… but this version of numpy is 0x…" error.
install_command =
python -m pip install {opts} {packages} --no-binary '{env:FACET_NO_BINARY}'
extras =
testing
commands =
# print all installed packages to stdout
python -m pip freeze
# run the tests
pytest test/ -s
[testenv:{py3,py37,py38,py39}-custom-deps]
deps =
boruta{env:FACET_V_BORUTA}
gamma-pytools{env:FACET_V_GAMMA_PYTOOLS}
joblib{env:FACET_V_JOBLIB}
lightgbm{env:FACET_V_LIGHTGBM}
matplotlib{env:FACET_V_MATPLOTLIB}
numpy{env:FACET_V_NUMPY}
pandas{env:FACET_V_PANDAS}
scikit-learn{env:FACET_V_SCIKIT_LEARN}
scipy{env:FACET_V_SCIPY}
shap{env:FACET_V_SHAP}
sklearndf{env:FACET_V_SKLEARNDF}
typing_inspect{env:FACET_V_TYPING_INSPECT}
[flake8]
max-line-length = 88
show-source = true
ignore =
W504, # line break after binary operator
E402, # module level import not at top of file
E731, # do not assign a lambda expression, use a def
E741, # ignore not easy to read variables like i l I etc
C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal
S001, # found modulo formatter (incorrect picks up mod operations)
# Ignores below are added to prevent conflicts with Black formatter
E231, # Missing whitespace after ',', ';', or ':'
E203, # space before :
W503, # line break before binary operator
per-file-ignores =
__init__.py: F401, F403, F405
exclude =
.eggs/*.py,
venv/*,
.venv/*,
.git/*
[coverage:report]
ignore_errors = False
show_missing = True
[isort]
profile=black
src_paths=src,test
known_local_folder=facet,test
known_first_party=pytools,sklearndf
known_third_party=numpy,pandas,joblib,sklearn,matplot
[pytest]
adopts =
--cov-report=html:coverage_html
--cov-report=xml:coverage.xml
--cov-config=setup.cfg
--cov-report=term-missing:skip-covered
--no-cov-on-fail
testpaths= test/test/
log_cli_level=ERROR
cache_dir=.pytest_cache