-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
90 lines (76 loc) · 1.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
[base]
name = inference_tools
test_deps =
pytest
[tox]
envlist =
lint
type
unit_test
integration_test
py{38,39}
requires =
nexusforge@git+https://github.com/BlueBrain/nexus-forge
indexserver =
default = https://bbpteam.epfl.ch/repository/devpi/simple
[testenv:unit_test]
description = run unit tests
deps =
pytest-cov
commands =
pytest -v --cov={[base]name} --cov-report term tests/unit
[testenv:lint]
description = run linters
deps =
pycodestyle
pylint
commands =
pycodestyle {[base]name}
pylint -j2 {[base]name} --rcfile=tox.ini
[testenv:integration_test]
description = run integration tests
deps =
pytest-cov
pass_env =
SERVICE_ACCOUNT_USERNAME
SERVICE_ACCOUNT_PASSWORD
SERVICE_ACCOUNT_USERNAME_AWS
SERVICE_ACCOUNT_PASSWORD_AWS
TOKEN
TOKEN_AWS
commands =
pytest -v --cov={[base]name} --cov-report term \
--username={env:SERVICE_ACCOUNT_USERNAME} \
--password={env:SERVICE_ACCOUNT_PASSWORD} \
--token={env:TOKEN} \
tests/integration
pytest -v --cov={[base]name} --cov-report term \
--username_aws={env:SERVICE_ACCOUNT_USERNAME_AWS} \
--password_aws={env:SERVICE_ACCOUNT_PASSWORD_AWS} \
--token_aws={env:TOKEN_AWS} \
tests/integration_aws
[testenv:type]
description = run type checks
deps =
mypy
commands =
mypy {[base]name} --config-file tox.ini --install-types
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[pycodestyle]
max-line-length = 180
[pylint]
max-line-length = 180
disable=C0115, C0114, R0903, R0913, R0912, R0914, W0212, W0511, R0902
[mypy]
[mypy-kgforge.*]
ignore_missing_imports = True
[mypy-requests.*]
ignore_missing_imports = True
[testenv:docs]
changedir = docs
extras = docs
commands = make html SPHINXOPTS=-W
whitelist_externals = make