-
Notifications
You must be signed in to change notification settings - Fork 30
/
tox.ini
119 lines (108 loc) · 3.27 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
[tox]
envlist = coverage-erase, py38, lint, coverage-report, py311
skip_missing_interpreters = false
[testenv:coverage-erase]
skip_install = true
skipsdist = true
deps = coverage
commands = coverage erase --rcfile=.coveragerc.pytest
[testenv]
commands = pytest \
--cov=girder_worker \
--cov-append \
--cov-config=.coveragerc.pytest \
# Surpress printing coverage, defer this to testenv:coverage-report
--cov-report= \
--mock-db \
{posargs}
[testenv:py38]
deps = -rrequirements.txt
[testenv:py311]
deps =
-rrequirements.in
-rrequirements-dev.in
[testenv:requirements]
base_python = 3.8
deps =
pip-tools
allowlist_externals =
rm
commands =
rm -rf requirements.txt
pip-compile -r --output-file=requirements.txt requirements-dev.in requirements.in
[testenv:coverage-report]
skip_install = true
deps = coverage
commands =
- coverage combine
coverage report
[testenv:lint]
skip_install = true
deps =
flake8
flake8-docstrings
flake8-quotes
commands = flake8 {posargs} girder_worker tests
[testenv:release]
skip_install = true
skipsdist = true
passenv =
CIRCLE_BRANCH
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
deps =
setuptools_scm
twine
commands =
python setup.py sdist
twine upload dist/*
[pytest]
testpaths =
tests
addopts =
# Ignore the integration tests directory which has its own method of
# running tests.
--ignore=tests/integration/
--showlocals
markers =
namespace: namespace for plugin entrypoints
[flake8]
exclude =
# Prevent running flake8 against ansible roles downloaded for use
# with integration framework.
tests/integration/scripts/roles/
max-line-length = 100
# Whether to display the pep8 instructions on failure (can be quite verbose)
show-pep8 = False
# Whether to show source code for each failure
show-source = True
# Maximum cyclomatic complexity allowed
max-complexity = 14
format = pylint
inline-quotes = '
# E123 - closing bracket does not match indentation of opening bracket's line
# E226 - missing whitespace around arithmetic operator
# E241 - multiple spaces after ","
# D100 - Public module (100) docstring missing.
# D101 - Public class (101) docstring missing.
# D102 - Public method (102) docstring missing.
# D103 - Public function (103) docstring missing.
# D104 - Missing docstring in public package.
# D105 - Missing docstring in magic method.
# D200 - One-line docstrings should fit on one line with quotes.
# D201 - No blank lines allowed before (201) docstring.
# D202 - No blank lines allowed after (202) docstring.
# D203 - 1 blank required before (203) class docstring.
# D204 - 1 blank required after (204) class docstring.
# D205 - Blank line required between one-line summary and description.
# D400 - First line should end with a period.
# D401 - First line should be in imperative mood.
# D402 - First line should not be the function's "signature".
# D403 - First word of the first line should be properly capitalized
# N802 - Function name should be lowercase.
# N803 - Argument name should be lowercase.
# N806 - Variable in function should be lowercase.
# N812 - Lowercase imported as non lowercase.
# Q003 - Change outer quotes to avoid escaping inner quotes
ignore = D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D203,D204,D205,D400,D401,D402,E123,E226,E241,N802,N803,N806,N812,W503,W504,Q003