forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
287 lines (266 loc) · 9.58 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
[tox]
# minversion = 1.7.2 needed for skip_missing_interpreters
minversion = 1.7.2
skipsdist = True
skip_missing_interpreters = True
envlist = diff-checker,commit-message,flake8,pyflakes-{py27,py3,pypy},doctest-{py27,py34},py27,py34
[tox:jenkins]
# Override default for WM Jenkins
# Others are run in their own individual jobs on WM Jenkins
envlist = diff-checker,commit-message,flake8,pyflakes-{py3,pypy}
[params]
doctest_skip = --ignore-files=(gui\.py|botirc\.py|eventstreams\.py)
[testenv]
setenv =
VIRTUAL_ENV={envdir}
PYWIKIBOT_NO_USER_CONFIG=2
usedevelop = True
commands = python setup.py test
[testenv:diff-checker]
deps = unidiff
commands = python pwb.py diff_checker
[testenv:commit-message]
deps = commit-message-validator
commands = commit-message-validator
[testenv:pyflakes-py27]
commands = findx . -name '*.py' -a '!' -path '*/.*' -a '!' -name 'user-config.py' : pyflakes
basepython = python2.7
deps =
pyflakes
findx >= 0.9.9
[testenv:pyflakes-py3]
commands = findx . -name '*.py' -a '!' -path '*/.*' -a '!' -name 'user-config.py' : pyflakes
basepython = python3
deps =
findx >= 0.9.9
pyflakes
[testenv:pyflakes-pypy]
commands = findx . -name '*.py' -a '!' -path '*/.*' -a '!' -name 'user-config.py' : pyflakes
basepython = pypy
deps =
findx >= 0.9.9
pyflakes
[testenv:flake8]
commands =
pip install -e .[flake8]
flake8 --version
flake8 --doctests {posargs}
basepython = python2.7
[testenv:nose]
commands =
python -W error::UserWarning -m generate_user_files -family:test -lang:test -v
nosetests --version
nosetests --with-detecthttp -v -a '!net' tests
deps =
nose
nose-detecthttp
unicodecsv
mock
[testenv:nose34]
basepython = python3
commands =
python -W error::UserWarning -m generate_user_files -family:test -lang:test -v
nosetests --version
nosetests --with-detecthttp -v -a '!net' tests
deps =
mwparserfromhell
beautifulsoup4
nose
nose-detecthttp>=0.1.3
six
mock
[testenv:doctest]
commands =
python -W error::UserWarning -m generate_user_files -family:test -lang:test -v
nosetests --version
nosetests --with-doctest pywikibot {[params]doctest_skip}
basepython =
py27: python2.7
py34: python3.4
deps =
nose
six
[testenv:venv]
commands = {posargs}
[testenv:doc]
commands =
pip install -e .[security]
make html -C ./docs
rstcheck --recursive --report warning --ignore-directives automodule,autoclass,autofunction .
basepython = python3.4
deps =
-rrequirements.txt
-rdocs/requirements-py3.txt
rstcheck >= 3.3.1
[flake8]
# The following are intentionally ignored, possibly pending consensus
# D105: Missing docstring in magic method
# D211: No blank lines allowed before class docstring
# FI12,FI13,FI15: __future__ import "with_statement", "print_function" and "generator_stop" missing
# FI5: __future__ import "x" present
# H101: TODO format
# H236: Mandatory use of six for Python 2 & 3 metaclass support
# H404: docstring multiline start
# H405: docstring summary line
# H301: Do not import more than one module per line; Pywikibot uses H306 (Alphabetically order your imports by the full module path)
# W503: line break before binary operator; against current PEP 8 recommendation
# W504 line break after binary operator
# P101: format string does contain unindexed parameters
# P102: docstring does contain unindexed parameters
# P103: other string does contain unindexed parameters
# The following are to be fixed
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# N802: function name should be lowercase
# N803: argument name should be lowercase
# N806: variable in function should be lowercase
# Errors occured after upgrade to pydocstyle 2.0.0 (T164142)
# D401: First line should be in imperative mood; try rephrasing
# D413: Missing blank line after last section
# D412: No blank lines allowed between a section header and its content
ignore = D105,D211,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,D401,D413,D412,P101,P102,P103,W503,W504
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/*
min-version = 2.7
accept-encodings = utf-8
require-code = true
classmethod-decorators = classmethod,classproperty
per-file-ignores =
generate_family_file.py : T001
pwb.py : T001
# pydocstyle cannot handle multiple __all__ variables
pywikibot/__init__.py : N806, N802
pywikibot/_wbtypes.py: N802
pywikibot/backports.py: N802
pywikibot/bot.py: N802
pywikibot/compat/catlib.py : N803
pywikibot/compat/query.py: N802
pywikibot/cosmetic_changes.py : N803, N806, N802
pywikibot/data/api.py : N806, N802
pywikibot/data/sparql.py: N802
pywikibot/date.py : N803, N806, N802
pywikibot/echo.py: N802
pywikibot/editor.py : N803, N806
# __dict__ used in a discouraged manner
# regex matches the first physical line of logical line of the error
pywikibot/exceptions.py : H501, N802
# classproperties; most docs should go to family.py
pywikibot/families/* : D102
pywikibot/families/strategy_family.py: N802
pywikibot/families/wowwiki_family.py: N802
pywikibot/family.py : E241, N803, N806, N802
pywikibot/fixes.py : E241
pywikibot/flow.py: N802
pywikibot/interwiki_graph.py : N803, N806, N802
pywikibot/logentries.py: N802
pywikibot/logging.py : N803
pywikibot/login.py: N802
pywikibot/page.py: N802
pywikibot/pagegenerators.py : N803, N806, N802
pywikibot/site.py: N802
pywikibot/specialbots.py : N803, N806, N802
pywikibot/textlib.py : N801, N803, N806, N802
pywikibot/throttle.py: N802
pywikibot/tools/_logging.py: N802
pywikibot/tools/ip.py : N803, N802
pywikibot/userinterfaces/cgi_interface.py : N803
pywikibot/userinterfaces/gui.py : N812, N803, N806, N802
pywikibot/userinterfaces/terminal_interface.py : N814
pywikibot/userinterfaces/terminal_interface_base.py : N803, N806, N802
pywikibot/userinterfaces/terminal_interface_unix.py : E241, N806
pywikibot/userinterfaces/terminal_interface_win32.py : E241
pywikibot/userinterfaces/transliteration.py : N801
pywikibot/userinterfaces/win32_unicode.py : N801, N812, T001, N803, N806
pywikibot/weblib.py: N802
pywikibot/xmlreader.py : N803, N806, N802
scripts/add_text.py : N803, N806
scripts/archive/featured.py : D102, D103, N802
scripts/blockpageschecker.py : N803, N806, N802
scripts/casechecker.py : N803, N806, N802
scripts/category.py : N803, N806, N802
scripts/category_redirect.py : N803, N806, N802
scripts/cfd.py : N803, N806, N802
scripts/checkimages.py : N801, N803, N806, N802
scripts/commonscat.py : N803, N806, N802
scripts/data_ingestion.py : N803, N806, N802
scripts/fixing_redirects.py : N803, N806
scripts/flickrripper.py : N803, N806, N802
scripts/freebasemappingupload.py: N802
scripts/harvest_template.py : N802
scripts/imagecopy.py : N801, N803, N806, N802
scripts/imagecopy_self.py : N801, N803, N806, N802
scripts/imagerecat.py : N803, N806, N802
scripts/imagetransfer.py : N803, N806, N802
scripts/imageuncat.py: N802
scripts/interwiki.py : N803, N806, N802
scripts/isbn.py : N803, N806, N802
scripts/maintenance/* : T001
scripts/match_images.py : N803, N806
scripts/misspelling.py : N803, N806, N802
scripts/movepages.py : N803, N806, N802
scripts/noreferences.py : N803, N806, N802
scripts/nowcommons.py : N803, N806, N802
scripts/redirect.py : N803, N806
scripts/reflinks.py: N802
scripts/replace.py : N803, N806, N802
scripts/script_wui.py : D102, N806, N802
scripts/solve_disambiguation.py : N803, N806, N802
scripts/table2wiki.py: N802
scripts/templatecount.py: N802
scripts/unlink.py : N803
scripts/watchlist.py : N803, N802
scripts/weblinkchecker.py : N803, N806, N802
scripts/welcome.py: N802
setup.py : T001
tests/* : N813
tests/api_tests.py: N802
tests/archivebot_tests.py: N802
tests/aspects.py: N802
tests/bot_tests.py: N802
tests/cosmetic_changes_tests.py: N802
tests/data_ingestion_tests.py: N802
tests/date_tests.py: N802
tests/dry_site_tests.py: N802
tests/edit_failure_tests.py: N802
tests/exceptions_tests.py: N802
tests/family_tests.py: N802
tests/file_tests.py: N802
tests/i18n_tests.py: N802
tests/imagecopy_tests.py: N802
tests/interwiki_link_tests.py: N802
tests/isbn_tests.py: N802
tests/link_tests.py: N802
tests/logentry_tests.py: N802
tests/login_tests.py: N802
tests/namespace_tests.py: N802
tests/page_tests.py : E241, N802
tests/pagegenerators_tests.py: N802
tests/pwb/* : T001
tests/reflinks_tests.py: N802
tests/script_tests.py: N802
tests/site_detect_tests.py: N802
tests/site_tests.py: N802
tests/sparql_tests.py: N802
tests/tests_tests.py: N802
tests/textlib_tests.py: N802
tests/thread_tests.py: N802
tests/tk_tests.py: N802
tests/tools_formatter_tests.py: N802
tests/tools_ip_tests.py: N802
tests/tools_tests.py: N802
tests/ui_options_tests.py: N802
tests/ui_tests.py : D102, D103, N801, N802
tests/utils.py: N802
tests/weblib_tests.py: N802
tests/wikibase_edit_tests.py: N802
tests/wikibase_tests.py: N802
tests/xmlreader_tests.py: N802
[pep8]
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/*
[pep257]
# see explanations above
ignore = D105,D211
[pytest]
python_files=tests/*.py
# disable recursing into tests/pwb, as that prints the environment,
# exposing any secure variables in Travis.
norecursedirs=.git .svn .tox pwb