-
Notifications
You must be signed in to change notification settings - Fork 13
/
tox.ini
100 lines (88 loc) · 2.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
97
98
99
100
; 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, pytest3.7, pytest3.8, docs, copyright_check
[testenv]
basepython = python3.7
extras = all
allowlist_externals = *
[testenv:pytest3.7]
deps =
pytest==7.2.1
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-randomly==3.12.0
pytest-rerunfailures==11.0
commands = pytest -m "not slow" -rfE --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing
[testenv:pytest3.8]
basepython = python3.8
deps =
pytest==7.2.1
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-randomly==3.12.0
pytest-rerunfailures==11.0
commands = pytest -m "not slow" -rfE --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing
[testenv:pytest-slow3.7]
deps =
pytest==7.2.1
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-rerunfailures==11.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:pytest-slow3.8]
basepython = python3.8
deps =
pytest==7.2.1
pytest-cov==2.8.1
pytest-asyncio==0.10.0
pytest-rerunfailures==11.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
pydocstyle==3.0.0
commands = flake8 --extend-ignore=F821 --exclude="colearn_grpc/proto/generated" colearn 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 colearn_examples/ml_interface colearn_examples/grpc \
colearn_other colearn_pytorch colearn_keras colearn_grpc docker tests
[testenv:pylint]
skipsdist = True
skip_install = True
deps = pylint==2.5.2
commands = sh -c "pylint colearn colearn_examples/ml_interface/* colearn_examples/grpc/* \
colearn_other colearn_pytorch colearn_keras colearn_grpc docker tests"
[testenv:docs]
skipsdist = True
skip_install = False
description = Build the documentation.
extras = docs
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