-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathtox.ini
178 lines (147 loc) · 4.39 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# 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-markers -v
markers =
gpu
slow
nll
extra
##############################################################################
# --- Tox Settings------------------------------------------------------------
##############################################################################
[tox]
skipsdist = false
skip_missing_interpreters = true
envlist =
cov-init
py{36, 37}-torch{12, 13, 14, 15, 16, 17, 18, 19}
py38-torch{14, 15, 16, 17, 18, 19, 20, nightly}
py39-torch{17, 18, 19, 20, nightly}
py{310, 311}-torch{20, nightly}
cov-report
misc
[travis]
os =
linux: py{36, 37}-torch{12, 13, 14, 15, 16, 17, 18, 19}, py{38, 39}-torch{14, 15, 16, 17, 18, 19, 20, nightly}, py{310,311}-torch{20, nightly}
osx: py{36, 37}-torch{12, 13, 14, 15, 16, 17, 18, 19}, py{38, 39}-torch{14, 15, 16, 17, 18, 19, 20, nightly}, py{310,311}-torch{20, nightly}
[travis:env]
TORCH =
1.2: torch12
1.3: torch13
1.4: torch14
1.5: torch15
1.6: torch16
1.7: torch17
1.8: torch18
1.9: torch19
2.0: torch20
nightly: torchnightly
[testenv]
setenv =
COVERAGE_FILE = .coverage.{envname}
deps =
torch12: torch>=1.2,<1.3
torch13: torch>=1.3,<1.4
torch14: torch>=1.4,<1.5
torch15: torch>=1.5,<1.6
torch16: torch>=1.6,<1.7
torch17: torch>=1.7,<1.8
torch18: torch>=1.8,<1.9
torch19: torch>=1.9,<2.0
torch20: torch>=2.0,<2.1
pytest-xdist
-e .[coverage]
commands =
torchnightly: python -m pip uninstall -y torch
torchnightly: python -m pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu
pytest --cov=qucumber --no-cov-on-fail {posargs}
[testenv:cov-init]
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage erase
[testenv:cov-report]
setenv = {[testenv:cov-init]setenv}
depends =
cov-init
py{36, 37}-torch{12, 13, 14, 15, 16, 17, 18, 19}
py{38, 39}-torch{14, 15, 16, 17, 18, 19, 20, nightly}
py{310, 311}-torch{20, nightly}
deps = {[testenv:cov-init]deps}
commands =
coverage combine
coverage report
[testenv:misc]
setenv =
SPHINXOPTS = -nWT
deps =
-e .[style,docs]
whitelist_externals = make
ignore_errors = true
commands =
inv style
make -C {toxinidir}/docs -e test
make -C {toxinidir}/docs -e spelling
make -C {toxinidir}/docs -e linkcheck
##############################################################################
# --- Coverage Settings-------------------------------------------------------
##############################################################################
[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__
def __str__
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 =
.tox
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,T
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