-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
96 lines (81 loc) · 2.13 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 = py3
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
# 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-custom-deps]
deps =
joblib{env:FACET_V_JOBLIB}
matplotlib{env:FACET_V_MATPLOTLIB}
numpy{env:FACET_V_NUMPY}
pandas{env:FACET_V_PANDAS}
scipy{env:FACET_V_SCIPY}
typing_inspect{env:FACET_V_TYPING_INSPECT}
[flake8]
max-line-length = 88
show-source = true
ignore =
# line break before binary operator
W504,
# do not assign a lambda expression, use a def
E731,
# ignore not easy to read variables like i l I etc
E741,
# Unnecessary (dict/list/tuple) call - rewrite as a literal
C408,
# found modulo formatter (incorrect picks up mod operations)
# S001,
# Ignores below are added to prevent conflicts with Black formatter
# Missing whitespace after ',', ';', or ':'
E231,
# space before :
E203,
# line break before binary operator
W503,
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=pytools,test
known_first_party=
known_third_party=numpy,pandas,joblib,sklearn,matplot
case_sensitive = True
[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