forked from NervanaSystems/ngraph-onnx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
79 lines (73 loc) · 2.31 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
[tox]
envlist = py3
[testenv]
skipdist=True
skip_install=True
setenv=
MYPYPATH=.tox/mypy-imports
deps =
-Urrequirements.txt
-Urrequirements_test.txt
passenv =
HOME
NGRAPH_CPP_BUILD_PATH
LD_LIBRARY_PATH
DYLD_LIBRARY_PATH
TOX_INSTALL_NGRAPH_FROM
NGRAPH_ONNX_IMPORT_ENABLE
NGRAPH_BACKEND
http_proxy
https_proxy
whitelist_externals =
mkdir
ln
bash
commands=
- pip install {env:TOX_INSTALL_NGRAPH_FROM:ngraph}
{envbindir}/python setup.py develop
bash .ci/copyright_check.sh {toxinidir}
flake8 {posargs:ngraph_onnx/}
flake8 --ignore=D100,D101,D102,D103,D104,D105,D107,W503 tests/ .ci/ # ignore lack of docs
mkdir -p .tox/mypy-imports
ln -sf {envsitepackagesdir}/ngraph .tox/mypy-imports/ngraph
mypy --config-file=tox.ini {posargs:ngraph_onnx/}
pytest {posargs:tests/} --backend={env:NGRAPH_BACKEND:CPU} -v -s -k 'not _cuda' {env:PYTEST_ARGS:}
[pytest]
timeout = 300
markers =
skip_on_cpu: skip test on the CPU backend
skip_on_gpu: skip test on the GPU backend
skip_on_nnp: skip test on the NNP backend
skip_on_interpreter: skip test on the interpreter_skip backend
skip_on_plaidml: skip test on the PlaidML backend
skip_on_intelgpu: skip test on the INTELGPU backend
skip_on_ie: skip test on the IE:CPU backend
onnx_coverage: mark test to be used to calculate ONNX ops coverage
[flake8]
max-line-length=120
max-complexity=7
# ignore:
# C816 - Missing trailing comma in Python 3.6+
# D100 - Missing docstring in public module
# D104 - Missing docstring in public package
# D105 - Missing docstring in magic method
# D107 - Missing docstring in __init__
# F401 - Module imported but unused
# F405 - Using star imports - required by ops bridge versioning
# Q003 - Change outer quotes to avoid escaping inner quotes
# W503 - line break before binary operator (prefer line breaks before op, not after)
ignore=C816,D100,D104,D105,D107,F401,F405,Q003,W503
[mypy]
strict_optional = True
ignore_missing_imports=True
follow_imports=normal
disallow_untyped_defs = True
disallow_untyped_calls = True
check_untyped_defs = True
show_error_context = False
show_column_numbers = True
show_none_errors = True
# put custom per-file options here in sections that map their names into filenames, e.g. gta_workflow/filename.py is
# [mypy-ngraph_onnx/filename]
[mypy-test.*]
disallow_untyped_defs = False