forked from girder/girder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
161 lines (150 loc) · 3.62 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[tox]
envlist = lint,pytest
[testenv:pytest]
deps =
-rrequirements-dev.txt
commands =
pytest {posargs}
[testenv:lint]
skip_install = true
skipsdist = true
deps =
flake8
flake8-bugbear
flake8-docstrings
flake8-quotes
pep8-naming
commands =
flake8 {posargs}
[testenv:docs]
# readthedocs.org runs "python setup.py install" (which installs no dependencies). With the
# limitations of Tox (not being able to use a different install_command for deps installation and
# package installation) and the desire to install cleanly via pip (instead of directly with
# setuptools), skip_install and an explicit "pip install" run command seems to be the best
# configuration possible.
skip_install = true
skipsdist = true
# Building docs has a direct dependency on Sphinx. Documentation dependencies are listed in a
# separate file to allow readthedocs.org to read and install them.
deps =
-rdocs/requirements-docs.txt
commands =
pip install --no-deps --editable . --editable clients/python
sphinx-build \
-W \
-b html \
-d {envtmpdir}/doctrees \
docs \
build/docs/python
[testenv:ansible]
skip_install = true
skipsdist = true
changedir = devops/ansible-role-girder
passenv =
DOCKER_*
deps =
ansible-lint<5
bcrypt
rich<11
flake8
molecule[ansible,docker]
pytest
pytest-testinfra
yamllint
commands =
molecule {posargs: test --all}
[testenv:coverage]
skip_install = true
skipsdist = true
deps =
coverage
commands =
coverage combine
coverage report
coverage html
coverage xml
[testenv:publish]
skip_install = true
skipsdist = true
passenv =
CIRCLE_BRANCH
TWINE_USERNAME
TWINE_PASSWORD
deps =
setuptools-git
setuptools-scm
twine
commands =
{toxinidir}/.circleci/publish_pypi.sh
[testenv:release_ansible]
skip_install = true
skipsdist = true
passenv =
ANSIBLE_GALAXY_API_KEY
deps =
ansible
commands =
{toxinidir}/.circleci/create_ansible_subtree.sh
ansible-galaxy import --api-key {env:ANSIBLE_GALAXY_API_KEY} girder ansible-role-girder
[testenv:public_names]
commands =
{toxinidir}/scripts/test_names.sh
[testenv:pytest_circleci]
deps =
{[testenv:pytest]deps}
commands =
coverage erase
pytest \
--tb=long \
--junit-xml="build/test/results/pytest.xml" \
--cov \
--cov-append \
--cov-report="" \
--keep-db \
{posargs}
[flake8]
max-line-length = 100
show-source = True
max-complexity = 14
format = pylint
exclude =
devops/vagrant/roles,
node_modules,
.eggs,
.git,
__pycache__,
.tox
ignore =
# D10 - Missing docstring (errors D100 - D107)
D10,
# D200 - One-line docstrings should fit on one line with quotes.
D200,
# D205 - Blank line required between one-line summary and description.
D205,
# D400 - First line should end with a period.
D400,
# D401 - First line should be in imperative mood.
D401,
# E123 - Closing bracket does not match indentation of opening bracket's line
E123,
# N802 - Function name should be lowercase.
N802,
# N803 - Argument name should be lowercase.
N803,
# N806 - Variable in function should be lowercase.
N806,
# N812 - Lowercase imported as non lowercase.
N812,
# N815 - mixedCase variable in class scope
N815,
# N816 - mixedCase variable in global scope
N816,
# N818 - error suffix in exception name
N818,
# W503 - Line break occurred before a binary operator
W503,
[pytest]
addopts = --verbose --strict --showlocals
cache_dir = build/test/pytest_cache
junit_family = xunit2
testpaths = test