-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
109 lines (101 loc) · 2.64 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
101
102
103
104
105
106
107
108
109
[tox]
envlist = lint, type, py36
[testenv]
# TODO: Figure out why per-process tests are necessary in user_test
# numpy is a setup_requires for pylibtiff, this can be removed when pylibtiff generates releases as wheels, see
# https://github.com/pearu/pylibtiff/issues/81
deps =
numpy
pytest
pytest-girder
pytest-forked
setenv =
ISIC_API_URL = http://localhost:8080/api/v1
ISIC_GIRDER_SITE_URL = http://localhost:8080/girder
ISIC_ASSETSTORE_PATH = {envtmpdir}/assetstores/default
ISIC_UPLOAD_S3_URL = http://localhost:9000
ISIC_UPLOAD_ACCESS_KEY = minioAdminAccessKey
ISIC_UPLOAD_SECRET_KEY = minioAdminSecretKey
ISIC_UPLOAD_BUCKET_NAME = test-upload-bucket
ISIC_UPLOAD_ROLE_ARN = fake-arn
CELERY_BROKER_URL = memory:///
CELERY_RESULT_BACKEND = file://{envtmpdir}/celery/results
commands =
pytest --forked --junitxml={envlogdir}/junit.xml --ignore test/e2e {posargs} test
[testenv:lint]
skipsdist = true
skip_install = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-import-order
flake8-quotes
pep8-naming
yamllint
commands =
flake8 .
yamllint --config-file ansible/.yamllint .
[testenv:type]
skipsdist = true
skip_install = true
deps =
mypy
commands =
mypy {posargs:.}
[testenv:e2e]
deps =
numpy
pytest
pytest-girder
pytest-forked
commands =
pytest --forked --junitxml={envlogdir}/junit.xml {posargs} test/e2e
setenv =
GIRDER_MONGO_URI = mongodb://mongo:27017/girder
[flake8]
max-line-length = 100
show-source = True
# https://github.com/PyCQA/flake8-import-order
import-order-style = appnexus
application-import-names = isic_archive
application-package-names =
girder,
girder_large_image,
large_image
exclude =
ansible/roles/girder.girder,
ansible/roles/girder.mongodb,
ansible/roles/large_image,
node_modules,
.eggs,
.git,
.mypy_cache,
__pycache__,
.tox
ignore =
# https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
# closing bracket does not match indentation of opening bracket’s line
E123
# line break before binary operator
W503,
# https://github.com/PyCQA/pep8-naming
# function name should be lowercase
N802,
# argument name should be lowercase
N803,
# variable in function should be lowercase
N806,
# lowercase imported as non lowercase
N812,
# mixedCase variable in class scope
N815,
# mixedCase variable in global scope
N816,
# http://www.pydocstyle.org/en/latest/error_codes.html
# Missing docstring in *
D10,
[pytest]
addopts = --verbose --strict --showlocals
junit_family = xunit2
testpaths = test