forked from fetchai/colearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
84 lines (74 loc) · 2.34 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
; By default, testenvs are configured to:
; - don't skip dist (skipsdist = False)
; - don't skip the package installation (skip_install = False)
; - don't use source installation (usedevelop = False)
; where one of those steps is not necessary for the test,
; we set the associated flag (e.g. for linting we don't need
; the package installation).
[tox]
envlist = flake8, mypy, pylint, pytest, docs, copyright_check
[testenv]
basepython = python3.7
extras = keras,pytorch
whitelist_externals = /bin/sh
[testenv:pytest]
deps =
pytest==5.3.5
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-randomly==3.2.1
pytest-rerunfailures==9.0
commands = pytest -m "not slow" -rfE --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing
[testenv:pytest-slow]
deps =
pytest==5.3.5
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-randomly==3.2.1
pytest-rerunfailures==9.0
passenv =
GITHUB_ACTION
COLEARN_DATA_DIR
TFDS_DATA_DIR
PYTORCH_DATA_DIR
commands = pytest -vv -m slow -rfE --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing
[testenv:flake8]
skipsdist = True
skip_install = True
deps = flake8==3.7.9
flake8-bugbear==20.1.4
#flake8-docstrings==1.5.0
#flake8-import-order==0.18.1
pydocstyle==3.0.0
commands = flake8 --extend-ignore=F821 --exclude="colearn_grpc/proto/generated" colearn examples \
colearn_other colearn_pytorch colearn_keras colearn_grpc grpc_examples docker tests
[testenv:mypy]
skipsdist = True
deps = mypy==0.761
commands = mypy --show-error-codes colearn examples \
colearn_other colearn_pytorch colearn_keras colearn_grpc grpc_examples docker tests
[testenv:pylint]
skipsdist = True
skip_install = True
deps = pylint==2.5.2
commands = sh -c "pylint colearn examples/* \
colearn_other colearn_pytorch colearn_keras colearn_grpc grpc_examples docker tests"
[testenv:docs]
skipsdist = True
skip_install = True
description = Build the documentation.
deps = markdown==3.2.1
mkdocs==1.1
mkdocs-material==6.2.3
mkdocs-macros-plugin==0.5.0
markdown-include==0.6.0
mkdocs-material-extensions==1.0.1
commands = mkdocs build --clean
[testenv:copyright_check]
skipsdist = True
skip_install = True
deps =
commands = {toxinidir}/tests/check_copyright_notice.py
[pytest]
markers =
slow: mark test as slow