/
tox.ini
112 lines (88 loc) · 2.43 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[pytest]
addopts = --strict -v
markers =
gpu
slow
nll
extra
[tox]
skipsdist = true
envlist = cov-init, py36, py37, cov-report
[testenv]
setenv =
COVERAGE_FILE = .coverage.{envname}
deps =
-e .[coverage]
commands =
pytest --cov=qucumber --no-cov-on-fail {posargs}
[testenv:cov-init]
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage erase
[testenv:cov-report]
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage combine
coverage report
[coverage:run]
branch = True
source = qucumber
[coverage:report]
precision = 2
show_missing = True
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
omit =
qucumber/__version__.py
**/__init__.py
setup.py
tasks.py
tests/*
# we don't use pydocstyle at the moment, but this is a working
# config if we ever decide to start using it
[pydocstyle]
inherit = false
convention = numpy
# ignore tests, docs, build and any folder starting with a .
match-dir = (?!tests)(?!docs)(?!build)[^\.].*
# ignore files starting with test, setup, tasks and ending with .py
match = (?!test)(?!setup)(?!tasks)[^\._].*\.py
[flake8]
application-import-names = qucumber
import-order-style = pep8
max-line-length = 80
select = C,E,F,W,B,B950
# NOTE: if any additions are made here, should also add them to the lint notebooks task in tasks.py
ignore =
E203, # not PEP8 compliant (doesn't like whitespace before ':' which is annoying when slicing)
E501, # B950 takes care of this better (max-line-length)
W503 # not PEP8 compliant (this wants line breaks AFTER binary ops instead of before)
max-complexity = 15
exclude =
.tox,
.git,
__pycache__,
build,
dist
per-file-ignores =
# Ignore "imported but unused" errors for all __init__.py files.
**/__init__.py: F401, F403