forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
148 lines (133 loc) · 5.22 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
[tox]
minversion = 1.6
skipsdist = True
envlist = flake8,flake8-py3,doctest-{py27,py34},py26,py27,py34
[tox:jenkins]
# Override default for WM Jenkins
# Others are run in their own individual jobs on WM Jenkins
envlist = flake8,flake8-py3
[params]
doctest_skip = --ignore-files=(gui\.py|botirc\.py|rcstream\.py)
[testenv]
setenv =
VIRTUAL_ENV={envdir}
PYWIKIBOT2_NO_USER_CONFIG=2
usedevelop = True
commands = python setup.py test
install_command = pip install --process-dependency-links --pre {opts} {packages}
[testenv:py26]
deps = unittest2
[testenv:flake8]
commands =
flake8 --version
flake8 --doctests {posargs}
basepython = python2.7
deps = flake8
git+https://github.com/pyflakes/pyflakes.git
hacking
flake8-docstrings<0.2.2
flake8-putty>=0.2.0
flake8-coding
flake8-future-import
flake8-string-format
flake8-import-order
flake8-print>=2.0.1
[testenv:flake8-py3]
commands =
flake8 --version
flake8 --doctests {posargs}
basepython = python3
deps = flake8
git+https://github.com/pyflakes/pyflakes.git
flake8-docstrings<0.2.2
flake8-putty>=0.2.0
[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
[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 =
nose
nose-detecthttp>=0.1.3 # Python 3 support added
six
[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]
changedir = docs
commands = make html
basepython = python3.4
deps =
-rrequests-requirements.txt
-rdocs/requirements-py3.txt
[flake8]
# The following are intentionally ignored, possibly pending consensus
# D105: Missing docstring in magic method
# D211: No blank lines allowed before class docstring
# FI10,FI12,FI13,FI15: __future__ import "division", "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,I100,I101: import order rules; Pywikibot uses rules H306 and I201
# The following are to be fixed
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# E402: module level import not at top of file; see T87409
# H201: Except: format
# P102,P103: string does contain unindexed parameters; see I36355923
ignore = E402,D105,D211,FI10,FI12,FI13,FI15,FI5,H101,H201,H236,H301,H404,H405,I100,I101
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*
max_line_length = 130
accept-encodings = utf-8
require-code = true
putty-ignore =
pwb.py,scripts/interwiki.py,scripts/flickrripper.py,pywikibot/site.py, /# noqa: E731/ : +E731
generate_family_file.py : +D102,T001
pwb.py : +T001
pywikibot/cosmetic_changes.py : +D102, D103
pywikibot/date.py,pywikibot/family.py,pywikibot/fixes.py,pywikibot/textlib.py,pywikibot/userinterfaces/terminal_interface_unix.py,pywikibot/userinterfaces/terminal_interface_win32.py,pywikibot/families/wikipedia_family.py : +E241
tests/page_tests.py : +E241
scripts/,/pagegenerators.parameterHelp/ : +E241
scripts/blockreview.py,scripts/imagetransfer.py,scripts/interwiki.py,scripts/maintenance/wikimedia_sites.py : +E241
tests/deprecation_tests.py,tests/pagegenerators_tests.py,tests/site_tests.py,tests/textlib_tests.py,tests/wikibase_tests.py : +D102
tests/ui_tests.py : +D102, D103
tests/__init__.py,tests/aspects.py,tests/script_tests.py,tests/site_detect_tests.py : +T001
tests/pwb/ : +T001
scripts/casechecker.py,scripts/imagetransfer.py : +T001
scripts/maintenance/make_i18n_dict.py : +T001
scripts/archivebot.py,scripts/casechecker.py,scripts/commons_link.py,scripts/cfd.py,scripts/imagecopy.py,scripts/imagecopy_self.py,scripts/interwiki.py,scripts/replicate_wiki.py,scripts/solve_disambiguation.py,scripts/maintenance/compat2core.py,scripts/archive/ : +D102, D103
scripts/checkimages.py,scripts/freebasemappingupload.py,scripts/imagetransfer.py,scripts/lonelypages.py,scripts/movepages.py,scripts/nowcommons.py,scripts/redirect.py,scripts/isbn.py,scripts/reflinks.py,scripts/script_wui.py,scripts/revertbot.py,scripts/weblinkchecker.py,scripts/welcome.py : +D102
scripts/catall.py,scripts/imageharvest.py,scripts/makecat.py,scripts/maintenance/cache.py,scripts/maintenance/wikimedia_sites.py : +D103
scripts/interwiki.py,/""/ : +P102
pywikibot/__init__.py,/link_regex/ : +P103
tests/textlib_tests.py,/self.assert.*{{/ : +P103
[pep8]
# see explanations above
ignore = E402
exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*
max_line_length = 130
[pep257]
# see explanations above
ignore = D105,D211