bee_python 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/egg/egg/build.yml +15 -17
- data/egg/egg/pylint.cfg +236 -0
- data/egg/egg/setup.erb +1 -1
- data/egg/egg/test.py +1 -1
- data/egg/egg.yml +3 -2
- data/egg/http/build.erb +0 -33
- data/egg/project/build.erb +0 -37
- data/egg/script/build.erb +2 -23
- data/egg/soap/build.erb +7 -41
- data/egg/soap/pylint.cfg +236 -0
- data/egg/soap.yml +6 -3
- data/egg/xmlrpc/build.erb +6 -41
- data/egg/xmlrpc/pylint.cfg +236 -0
- data/egg/xmlrpc.yml +4 -3
- data/lib/bee_task_python.rb +4 -5
- data/python.yml +18 -17
- metadata +6 -4
- data/egg/egg/suite.py +0 -37
data/README
CHANGED
data/egg/egg/build.yml
CHANGED
@@ -2,31 +2,29 @@
|
|
2
2
|
- build: <%= name %>
|
3
3
|
default: egg
|
4
4
|
description: Build project <%= name.capitalize %>
|
5
|
+
extends: ":python:python.yml"
|
5
6
|
|
6
7
|
# Build properties
|
7
8
|
- properties:
|
8
|
-
name:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
name: "<%= name %>"
|
10
|
+
version: "0.1.0"
|
11
|
+
description: ""
|
12
|
+
author: ""
|
13
|
+
email: ""
|
14
|
+
url: ""
|
15
|
+
pkg: "<%= name.downcase %>"
|
16
|
+
egg_info_dir: "egg.egg-info"
|
17
|
+
py_src_dir: :pkg
|
14
18
|
|
15
19
|
# Build targets
|
16
|
-
- target: test
|
17
|
-
depends: [py_check, py_test]
|
18
|
-
description: Check syntax and run unit tests
|
19
|
-
|
20
|
-
- target: doc
|
21
|
-
depends: [py_doc, py_cover]
|
22
|
-
description: Generate coverage and code documentation
|
23
|
-
|
24
20
|
- target: egg
|
25
|
-
depends: [
|
21
|
+
depends: [py_clean, py_check, py_test]
|
26
22
|
description: Generate distribution archive
|
27
23
|
script:
|
28
24
|
- erb:
|
29
25
|
src: "setup.erb"
|
30
26
|
dest: "setup.py"
|
31
|
-
-
|
32
|
-
|
27
|
+
- mkdir: :py_build_dir
|
28
|
+
- rmdir: :egg_info_dir
|
29
|
+
- "python setup.py sdist -d #{py_build_dir}"
|
30
|
+
- rmdir: :egg_info_dir
|
data/egg/egg/pylint.cfg
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
[MASTER]
|
2
|
+
|
3
|
+
# Specify a configuration file.
|
4
|
+
#rcfile=
|
5
|
+
|
6
|
+
# Python code to execute, usually for sys.path manipulation such as
|
7
|
+
# pygtk.require().
|
8
|
+
#init-hook=
|
9
|
+
|
10
|
+
# Profiled execution.
|
11
|
+
profile=no
|
12
|
+
|
13
|
+
# Add <file or directory> to the black list. It should be a base name, not a
|
14
|
+
# path. You may set this option multiple times.
|
15
|
+
ignore=CVS
|
16
|
+
|
17
|
+
# Pickle collected data for later comparisons.
|
18
|
+
persistent=no
|
19
|
+
|
20
|
+
# List of plugins (as comma separated values of python modules names) to load,
|
21
|
+
# usually to register additional checkers.
|
22
|
+
load-plugins=
|
23
|
+
|
24
|
+
|
25
|
+
[MESSAGES CONTROL]
|
26
|
+
|
27
|
+
# Enable the message, report, category or checker with the given id(s). You can
|
28
|
+
# either give multiple identifier separated by comma (,) or put this option
|
29
|
+
# multiple time.
|
30
|
+
#enable=E0611,E1103,E1124,E1122,E1123,E9906,E9904,E9905,E9902,E9903,E9900,E9901,E0202,E0203,E1001,E0221,E0222,E1101,E1121,E0001,E0710,E0711,E1003,E0103,E1120,E0602,E0701,E0601,E0101,E0100,E0102,E0105,E0104,E0107,E0106,E0503,E0501,E0502,E0211,E0213,E1111,E1002,E0012,E0011,E0702,E1102
|
31
|
+
|
32
|
+
# Disable the message, report, category or checker with the given id(s). You
|
33
|
+
# can either give multiple identifier separated by comma (,) or put this option
|
34
|
+
# multiple time.
|
35
|
+
disable=C0103,C0111,C0112,C0121,C0202,C0203,C0323,C0324,C0301,I0011,R0201,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,W0102,W0142,W0603,W0703,W0201,E1101,W0232
|
36
|
+
|
37
|
+
[REPORTS]
|
38
|
+
|
39
|
+
# Set the output format. Available formats are text, parseable, colorized, msvs
|
40
|
+
# (visual studio) and html
|
41
|
+
output-format=text
|
42
|
+
|
43
|
+
# Include message's id in output
|
44
|
+
include-ids=yes
|
45
|
+
|
46
|
+
# Put messages in a separate file for each module / package specified on the
|
47
|
+
# command line instead of printing them on stdout. Reports (if any) will be
|
48
|
+
# written in a file name "pylint_global.[txt|html]".
|
49
|
+
files-output=no
|
50
|
+
|
51
|
+
# Tells whether to display a full report or only the messages
|
52
|
+
reports=no
|
53
|
+
|
54
|
+
# Python expression which should return a note less than 10 (10 is the highest
|
55
|
+
# note). You have access to the variables errors warning, statement which
|
56
|
+
# respectively contain the number of errors / warnings messages and the total
|
57
|
+
# number of statements analyzed. This is used by the global evaluation report
|
58
|
+
# (R0004).
|
59
|
+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
60
|
+
|
61
|
+
# Add a comment according to your evaluation note. This is used by the global
|
62
|
+
# evaluation report (R0004).
|
63
|
+
comment=no
|
64
|
+
|
65
|
+
|
66
|
+
[BASIC]
|
67
|
+
|
68
|
+
# Required attributes for module, separated by a comma
|
69
|
+
required-attributes=
|
70
|
+
|
71
|
+
# List of builtins function names that should not be used, separated by a comma
|
72
|
+
bad-functions=map,filter,apply,input
|
73
|
+
|
74
|
+
# Regular expression which should only match correct module names
|
75
|
+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
76
|
+
|
77
|
+
# Regular expression which should only match correct module level names
|
78
|
+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
79
|
+
|
80
|
+
# Regular expression which should only match correct class names
|
81
|
+
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
82
|
+
|
83
|
+
# Regular expression which should only match correct function names
|
84
|
+
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
85
|
+
|
86
|
+
# Regular expression which should only match correct method names
|
87
|
+
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
88
|
+
|
89
|
+
# Regular expression which should only match correct instance attribute names
|
90
|
+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
91
|
+
|
92
|
+
# Regular expression which should only match correct argument names
|
93
|
+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
94
|
+
|
95
|
+
# Regular expression which should only match correct variable names
|
96
|
+
variable-rgx=[a-z_][a-z0-9_]{1,30}$
|
97
|
+
|
98
|
+
# Regular expression which should only match correct list comprehension /
|
99
|
+
# generator expression variable names
|
100
|
+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
101
|
+
|
102
|
+
# Good variable names which should always be accepted, separated by a comma
|
103
|
+
good-names=i,j,k,e,ex,Run,_
|
104
|
+
|
105
|
+
# Bad variable names which should always be refused, separated by a comma
|
106
|
+
bad-names=foo,bar,baz,toto,tutu,tata
|
107
|
+
|
108
|
+
# Regular expression which should only match functions or classes name which do
|
109
|
+
# not require a docstring
|
110
|
+
no-docstring-rgx=__.*__
|
111
|
+
|
112
|
+
|
113
|
+
[FORMAT]
|
114
|
+
|
115
|
+
# Maximum number of characters on a single line.
|
116
|
+
max-line-length=78
|
117
|
+
|
118
|
+
# Maximum number of lines in a module
|
119
|
+
max-module-lines=1000
|
120
|
+
|
121
|
+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
122
|
+
# tab).
|
123
|
+
indent-string=' '
|
124
|
+
|
125
|
+
|
126
|
+
[SIMILARITIES]
|
127
|
+
|
128
|
+
# Minimum lines number of a similarity.
|
129
|
+
min-similarity-lines=4
|
130
|
+
|
131
|
+
# Ignore comments when computing similarities.
|
132
|
+
ignore-comments=yes
|
133
|
+
|
134
|
+
# Ignore docstrings when computing similarities.
|
135
|
+
ignore-docstrings=yes
|
136
|
+
|
137
|
+
|
138
|
+
[VARIABLES]
|
139
|
+
|
140
|
+
# Tells whether we should check for unused import in __init__ files.
|
141
|
+
init-import=no
|
142
|
+
|
143
|
+
# A regular expression matching names used for dummy variables (i.e. not used).
|
144
|
+
dummy-variables-rgx=_|dummy
|
145
|
+
|
146
|
+
# List of additional names supposed to be defined in builtins. Remember that
|
147
|
+
# you should avoid to define new builtins when possible.
|
148
|
+
additional-builtins=
|
149
|
+
|
150
|
+
|
151
|
+
[TYPECHECK]
|
152
|
+
|
153
|
+
# Tells whether missing members accessed in mixin class should be ignored. A
|
154
|
+
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
155
|
+
ignore-mixin-members=yes
|
156
|
+
|
157
|
+
# List of classes names for which member attributes should not be checked
|
158
|
+
# (useful for classes with attributes dynamically set).
|
159
|
+
ignored-classes=SQLObject,MySQLdb
|
160
|
+
|
161
|
+
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
162
|
+
# to generated-members.
|
163
|
+
zope=no
|
164
|
+
|
165
|
+
# List of members which are set dynamically and missed by pylint inference
|
166
|
+
# system, and so shouldn't trigger E0201 when accessed.
|
167
|
+
generated-members=REQUEST,acl_users,aq_parent
|
168
|
+
|
169
|
+
|
170
|
+
[MISCELLANEOUS]
|
171
|
+
|
172
|
+
# List of note tags to take in consideration, separated by a comma.
|
173
|
+
notes=FIXME,XXX,TODO
|
174
|
+
|
175
|
+
|
176
|
+
[DESIGN]
|
177
|
+
|
178
|
+
# Maximum number of arguments for function / method
|
179
|
+
max-args=5
|
180
|
+
|
181
|
+
# Argument names that match this expression will be ignored. Default to name
|
182
|
+
# with leading underscore
|
183
|
+
ignored-argument-names=_.*
|
184
|
+
|
185
|
+
# Maximum number of locals for function / method body
|
186
|
+
max-locals=15
|
187
|
+
|
188
|
+
# Maximum number of return / yield for function / method body
|
189
|
+
max-returns=6
|
190
|
+
|
191
|
+
# Maximum number of branch for function / method body
|
192
|
+
max-branchs=12
|
193
|
+
|
194
|
+
# Maximum number of statements in function / method body
|
195
|
+
max-statements=50
|
196
|
+
|
197
|
+
# Maximum number of parents for a class (see R0901).
|
198
|
+
max-parents=7
|
199
|
+
|
200
|
+
# Maximum number of attributes for a class (see R0902).
|
201
|
+
max-attributes=7
|
202
|
+
|
203
|
+
# Minimum number of public methods for a class (see R0903).
|
204
|
+
min-public-methods=2
|
205
|
+
|
206
|
+
# Maximum number of public methods for a class (see R0904).
|
207
|
+
max-public-methods=20
|
208
|
+
|
209
|
+
|
210
|
+
[CLASSES]
|
211
|
+
|
212
|
+
# List of interface methods to ignore, separated by a comma. This is used for
|
213
|
+
# instance to not check methods defines in Zope's Interface base class.
|
214
|
+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
215
|
+
|
216
|
+
# List of method names used to declare (i.e. assign) instance attributes.
|
217
|
+
defining-attr-methods=__init__,__new__,setUp
|
218
|
+
|
219
|
+
|
220
|
+
[IMPORTS]
|
221
|
+
|
222
|
+
# Deprecated modules which should not be used, separated by a comma
|
223
|
+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
|
224
|
+
|
225
|
+
# Create a graph of every (i.e. internal and external) dependencies in the
|
226
|
+
# given file (report RP0402 must not be disabled)
|
227
|
+
import-graph=
|
228
|
+
|
229
|
+
# Create a graph of external dependencies in the given file (report RP0402 must
|
230
|
+
# not be disabled)
|
231
|
+
ext-import-graph=
|
232
|
+
|
233
|
+
# Create a graph of internal dependencies in the given file (report RP0402 must
|
234
|
+
# not be disabled)
|
235
|
+
int-import-graph=
|
236
|
+
|
data/egg/egg/setup.erb
CHANGED
data/egg/egg/test.py
CHANGED
@@ -7,7 +7,7 @@ import os
|
|
7
7
|
import sys
|
8
8
|
import inspect
|
9
9
|
test_dir = os.path.dirname(inspect.currentframe().f_code.co_filename)
|
10
|
-
src_dir = os.path.join(test_dir, '
|
10
|
+
src_dir = os.path.join(test_dir, '..', '<%= pkg %>')
|
11
11
|
sys.path.insert(0, src_dir)
|
12
12
|
import <%= pkg %>
|
13
13
|
import unittest
|
data/egg/egg.yml
CHANGED
@@ -44,8 +44,9 @@
|
|
44
44
|
src: "#{base}/egg/ez_setup.py"
|
45
45
|
dest: "#{here}/#{name}/ez_setup.py"
|
46
46
|
- cp:
|
47
|
-
src: "#{base}/egg/
|
48
|
-
dest: "#{here}/#{name}/
|
47
|
+
src: "#{base}/egg/pylint.cfg"
|
48
|
+
dest: "#{here}/#{name}/pylint.cfg"
|
49
|
+
- touch: "#{here}/#{name}/#{pkg}/__init__.py"
|
49
50
|
|
50
51
|
- target: enjoy
|
51
52
|
depends: generate
|
data/egg/http/build.erb
CHANGED
@@ -1,40 +1,11 @@
|
|
1
1
|
# Build information
|
2
2
|
- build: <%= name %>
|
3
|
-
default: all
|
4
3
|
description: Build project <%= name.capitalize %>
|
5
4
|
extends: ":python:python.yml"
|
6
5
|
|
7
6
|
# Build properties
|
8
7
|
- properties:
|
9
8
|
name: <%= name %>
|
10
|
-
zip: "#{build_dir}/#{name}.zip"
|
11
|
-
|
12
|
-
# Build targets
|
13
|
-
- target: test
|
14
|
-
depends: [py_check, py_test]
|
15
|
-
description: Run syntax check and unit tests
|
16
|
-
|
17
|
-
- target: doc
|
18
|
-
depends: py_doc
|
19
|
-
description: Generate source documentation and coverage report
|
20
|
-
|
21
|
-
- target: zip
|
22
|
-
depends: [test, doc]
|
23
|
-
description: Generate distribution archive
|
24
|
-
script:
|
25
|
-
- zip:
|
26
|
-
includes: "**/*"
|
27
|
-
excludes: ["#{build_dir}/**/*", "**/*.pyc"]
|
28
|
-
dest: :zip
|
29
|
-
- zip:
|
30
|
-
root: :py_doc_dir
|
31
|
-
includes: "**/*"
|
32
|
-
prefix: "doc"
|
33
|
-
dest: :zip
|
34
|
-
|
35
|
-
- target: run
|
36
|
-
depends: py_run
|
37
|
-
description: Run Python script
|
38
9
|
|
39
10
|
- target: client
|
40
11
|
description: Perform a client call
|
@@ -43,7 +14,3 @@
|
|
43
14
|
url: http://localhost:8000
|
44
15
|
prop: body
|
45
16
|
- print: :body
|
46
|
-
|
47
|
-
- target: all
|
48
|
-
depends: [clean, test]
|
49
|
-
|
data/egg/project/build.erb
CHANGED
@@ -1,45 +1,8 @@
|
|
1
1
|
# Build information
|
2
2
|
- build: <%= name %>
|
3
|
-
default: all
|
4
3
|
description: Build project <%= name.capitalize %>
|
5
4
|
extends: ":python:python.yml"
|
6
5
|
|
7
6
|
# Build properties
|
8
7
|
- properties:
|
9
8
|
name: <%= name %>
|
10
|
-
zip: "#{build_dir}/#{name}.zip"
|
11
|
-
|
12
|
-
# Build targets
|
13
|
-
- target: test
|
14
|
-
depends: [py_check, py_test]
|
15
|
-
description: Run syntax check and unit tests
|
16
|
-
|
17
|
-
- target: doc
|
18
|
-
depends: [py_doc, py_cover]
|
19
|
-
description: Generate source documentation and coverage report
|
20
|
-
|
21
|
-
- target: zip
|
22
|
-
depends: [test, doc]
|
23
|
-
description: Generate distribution archive
|
24
|
-
script:
|
25
|
-
- zip:
|
26
|
-
includes: "**/*"
|
27
|
-
excludes: ["#{build_dir}/**/*", "**/*.pyc"]
|
28
|
-
dest: :zip
|
29
|
-
- zip:
|
30
|
-
root: :py_doc_dir
|
31
|
-
includes: "**/*"
|
32
|
-
prefix: "doc"
|
33
|
-
dest: :zip
|
34
|
-
- zip:
|
35
|
-
root: :py_cov_dir
|
36
|
-
includes: "**/*"
|
37
|
-
prefix: "coverage"
|
38
|
-
dest: :zip
|
39
|
-
|
40
|
-
- target: run
|
41
|
-
depends: py_run
|
42
|
-
description: Run Python script
|
43
|
-
|
44
|
-
- target: all
|
45
|
-
depends: [clean, test]
|
data/egg/script/build.erb
CHANGED
@@ -5,26 +5,5 @@
|
|
5
5
|
|
6
6
|
# Build properties
|
7
7
|
- properties:
|
8
|
-
name:
|
9
|
-
|
10
|
-
zip: "#{build_dir}/#{name}.zip"
|
11
|
-
|
12
|
-
# Build targets
|
13
|
-
- target: test
|
14
|
-
description: Check Python script syntax
|
15
|
-
depends: py_check
|
16
|
-
|
17
|
-
- target: run
|
18
|
-
description: Run the script
|
19
|
-
depends: py_run
|
20
|
-
|
21
|
-
- target: zip
|
22
|
-
depends: test
|
23
|
-
description: Generate distribution archive
|
24
|
-
script:
|
25
|
-
- mkdir: :build_dir
|
26
|
-
- rm: :zip
|
27
|
-
- zip:
|
28
|
-
excludes: ["#{build_dir}/**/*", "**/*.pyc"]
|
29
|
-
dest: :zip
|
30
|
-
|
8
|
+
name: <%= name %>
|
9
|
+
py_src_dir: "."
|
data/egg/soap/build.erb
CHANGED
@@ -1,52 +1,18 @@
|
|
1
1
|
# Build information
|
2
|
-
- build:
|
3
|
-
default: all
|
2
|
+
- build: <%= name %>
|
4
3
|
description: Build project <%= name.capitalize %>
|
4
|
+
extends: ":python:python.yml"
|
5
5
|
|
6
6
|
# Build properties
|
7
7
|
- properties:
|
8
|
-
name:
|
9
|
-
version:
|
10
|
-
|
11
|
-
|
12
|
-
client:
|
13
|
-
zip: "#{build}/#{name}-#{version}.zip"
|
14
|
-
clean_dirs: :build
|
15
|
-
clean_files: "**/*.pyc"
|
8
|
+
name: <%= name %>
|
9
|
+
version: "0.0.0"
|
10
|
+
py_src_dir: "."
|
11
|
+
py_main: "server.py"
|
12
|
+
client: "client.py"
|
16
13
|
|
17
14
|
# Build targets
|
18
|
-
- target: check
|
19
|
-
description: Check Python script syntax
|
20
|
-
script:
|
21
|
-
- python.pychecker:
|
22
|
-
src: "."
|
23
|
-
lenient: true
|
24
|
-
|
25
|
-
- target: server
|
26
|
-
description: Run server
|
27
|
-
script:
|
28
|
-
- python.python: :server
|
29
|
-
|
30
15
|
- target: client
|
31
16
|
description: Run client
|
32
17
|
script:
|
33
18
|
- python.python: :client
|
34
|
-
|
35
|
-
- target: zip
|
36
|
-
depends: check
|
37
|
-
description: Generate distribution archive
|
38
|
-
script:
|
39
|
-
- mkdir: :build
|
40
|
-
- zip:
|
41
|
-
includes: "**/*"
|
42
|
-
excludes: ["#{build}/**/*", "**/*.pyc"]
|
43
|
-
dest: :zip
|
44
|
-
|
45
|
-
- target: clean
|
46
|
-
description: Clean generated files
|
47
|
-
script:
|
48
|
-
- rmdir: :clean_dirs
|
49
|
-
- rm: :clean_files
|
50
|
-
|
51
|
-
- target: all
|
52
|
-
depends: [clean, check, zip]
|
data/egg/soap/pylint.cfg
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
[MASTER]
|
2
|
+
|
3
|
+
# Specify a configuration file.
|
4
|
+
#rcfile=
|
5
|
+
|
6
|
+
# Python code to execute, usually for sys.path manipulation such as
|
7
|
+
# pygtk.require().
|
8
|
+
#init-hook=
|
9
|
+
|
10
|
+
# Profiled execution.
|
11
|
+
profile=no
|
12
|
+
|
13
|
+
# Add <file or directory> to the black list. It should be a base name, not a
|
14
|
+
# path. You may set this option multiple times.
|
15
|
+
ignore=CVS
|
16
|
+
|
17
|
+
# Pickle collected data for later comparisons.
|
18
|
+
persistent=no
|
19
|
+
|
20
|
+
# List of plugins (as comma separated values of python modules names) to load,
|
21
|
+
# usually to register additional checkers.
|
22
|
+
load-plugins=
|
23
|
+
|
24
|
+
|
25
|
+
[MESSAGES CONTROL]
|
26
|
+
|
27
|
+
# Enable the message, report, category or checker with the given id(s). You can
|
28
|
+
# either give multiple identifier separated by comma (,) or put this option
|
29
|
+
# multiple time.
|
30
|
+
#enable=E0611,E1103,E1124,E1122,E1123,E9906,E9904,E9905,E9902,E9903,E9900,E9901,E0202,E0203,E1001,E0221,E0222,E1101,E1121,E0001,E0710,E0711,E1003,E0103,E1120,E0602,E0701,E0601,E0101,E0100,E0102,E0105,E0104,E0107,E0106,E0503,E0501,E0502,E0211,E0213,E1111,E1002,E0012,E0011,E0702,E1102
|
31
|
+
|
32
|
+
# Disable the message, report, category or checker with the given id(s). You
|
33
|
+
# can either give multiple identifier separated by comma (,) or put this option
|
34
|
+
# multiple time.
|
35
|
+
disable=C0103,C0111,C0112,C0121,C0202,C0203,C0323,C0324,C0301,I0011,R0201,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,W0102,W0142,W0603,W0703,W0201,E1101,W0232
|
36
|
+
|
37
|
+
[REPORTS]
|
38
|
+
|
39
|
+
# Set the output format. Available formats are text, parseable, colorized, msvs
|
40
|
+
# (visual studio) and html
|
41
|
+
output-format=text
|
42
|
+
|
43
|
+
# Include message's id in output
|
44
|
+
include-ids=yes
|
45
|
+
|
46
|
+
# Put messages in a separate file for each module / package specified on the
|
47
|
+
# command line instead of printing them on stdout. Reports (if any) will be
|
48
|
+
# written in a file name "pylint_global.[txt|html]".
|
49
|
+
files-output=no
|
50
|
+
|
51
|
+
# Tells whether to display a full report or only the messages
|
52
|
+
reports=no
|
53
|
+
|
54
|
+
# Python expression which should return a note less than 10 (10 is the highest
|
55
|
+
# note). You have access to the variables errors warning, statement which
|
56
|
+
# respectively contain the number of errors / warnings messages and the total
|
57
|
+
# number of statements analyzed. This is used by the global evaluation report
|
58
|
+
# (R0004).
|
59
|
+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
60
|
+
|
61
|
+
# Add a comment according to your evaluation note. This is used by the global
|
62
|
+
# evaluation report (R0004).
|
63
|
+
comment=no
|
64
|
+
|
65
|
+
|
66
|
+
[BASIC]
|
67
|
+
|
68
|
+
# Required attributes for module, separated by a comma
|
69
|
+
required-attributes=
|
70
|
+
|
71
|
+
# List of builtins function names that should not be used, separated by a comma
|
72
|
+
bad-functions=map,filter,apply,input
|
73
|
+
|
74
|
+
# Regular expression which should only match correct module names
|
75
|
+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
76
|
+
|
77
|
+
# Regular expression which should only match correct module level names
|
78
|
+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
79
|
+
|
80
|
+
# Regular expression which should only match correct class names
|
81
|
+
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
82
|
+
|
83
|
+
# Regular expression which should only match correct function names
|
84
|
+
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
85
|
+
|
86
|
+
# Regular expression which should only match correct method names
|
87
|
+
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
88
|
+
|
89
|
+
# Regular expression which should only match correct instance attribute names
|
90
|
+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
91
|
+
|
92
|
+
# Regular expression which should only match correct argument names
|
93
|
+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
94
|
+
|
95
|
+
# Regular expression which should only match correct variable names
|
96
|
+
variable-rgx=[a-z_][a-z0-9_]{1,30}$
|
97
|
+
|
98
|
+
# Regular expression which should only match correct list comprehension /
|
99
|
+
# generator expression variable names
|
100
|
+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
101
|
+
|
102
|
+
# Good variable names which should always be accepted, separated by a comma
|
103
|
+
good-names=i,j,k,e,ex,Run,_
|
104
|
+
|
105
|
+
# Bad variable names which should always be refused, separated by a comma
|
106
|
+
bad-names=foo,bar,baz,toto,tutu,tata
|
107
|
+
|
108
|
+
# Regular expression which should only match functions or classes name which do
|
109
|
+
# not require a docstring
|
110
|
+
no-docstring-rgx=__.*__
|
111
|
+
|
112
|
+
|
113
|
+
[FORMAT]
|
114
|
+
|
115
|
+
# Maximum number of characters on a single line.
|
116
|
+
max-line-length=78
|
117
|
+
|
118
|
+
# Maximum number of lines in a module
|
119
|
+
max-module-lines=1000
|
120
|
+
|
121
|
+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
122
|
+
# tab).
|
123
|
+
indent-string=' '
|
124
|
+
|
125
|
+
|
126
|
+
[SIMILARITIES]
|
127
|
+
|
128
|
+
# Minimum lines number of a similarity.
|
129
|
+
min-similarity-lines=4
|
130
|
+
|
131
|
+
# Ignore comments when computing similarities.
|
132
|
+
ignore-comments=yes
|
133
|
+
|
134
|
+
# Ignore docstrings when computing similarities.
|
135
|
+
ignore-docstrings=yes
|
136
|
+
|
137
|
+
|
138
|
+
[VARIABLES]
|
139
|
+
|
140
|
+
# Tells whether we should check for unused import in __init__ files.
|
141
|
+
init-import=no
|
142
|
+
|
143
|
+
# A regular expression matching names used for dummy variables (i.e. not used).
|
144
|
+
dummy-variables-rgx=_|dummy
|
145
|
+
|
146
|
+
# List of additional names supposed to be defined in builtins. Remember that
|
147
|
+
# you should avoid to define new builtins when possible.
|
148
|
+
additional-builtins=
|
149
|
+
|
150
|
+
|
151
|
+
[TYPECHECK]
|
152
|
+
|
153
|
+
# Tells whether missing members accessed in mixin class should be ignored. A
|
154
|
+
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
155
|
+
ignore-mixin-members=yes
|
156
|
+
|
157
|
+
# List of classes names for which member attributes should not be checked
|
158
|
+
# (useful for classes with attributes dynamically set).
|
159
|
+
ignored-classes=SQLObject,MySQLdb
|
160
|
+
|
161
|
+
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
162
|
+
# to generated-members.
|
163
|
+
zope=no
|
164
|
+
|
165
|
+
# List of members which are set dynamically and missed by pylint inference
|
166
|
+
# system, and so shouldn't trigger E0201 when accessed.
|
167
|
+
generated-members=REQUEST,acl_users,aq_parent
|
168
|
+
|
169
|
+
|
170
|
+
[MISCELLANEOUS]
|
171
|
+
|
172
|
+
# List of note tags to take in consideration, separated by a comma.
|
173
|
+
notes=FIXME,XXX,TODO
|
174
|
+
|
175
|
+
|
176
|
+
[DESIGN]
|
177
|
+
|
178
|
+
# Maximum number of arguments for function / method
|
179
|
+
max-args=5
|
180
|
+
|
181
|
+
# Argument names that match this expression will be ignored. Default to name
|
182
|
+
# with leading underscore
|
183
|
+
ignored-argument-names=_.*
|
184
|
+
|
185
|
+
# Maximum number of locals for function / method body
|
186
|
+
max-locals=15
|
187
|
+
|
188
|
+
# Maximum number of return / yield for function / method body
|
189
|
+
max-returns=6
|
190
|
+
|
191
|
+
# Maximum number of branch for function / method body
|
192
|
+
max-branchs=12
|
193
|
+
|
194
|
+
# Maximum number of statements in function / method body
|
195
|
+
max-statements=50
|
196
|
+
|
197
|
+
# Maximum number of parents for a class (see R0901).
|
198
|
+
max-parents=7
|
199
|
+
|
200
|
+
# Maximum number of attributes for a class (see R0902).
|
201
|
+
max-attributes=7
|
202
|
+
|
203
|
+
# Minimum number of public methods for a class (see R0903).
|
204
|
+
min-public-methods=2
|
205
|
+
|
206
|
+
# Maximum number of public methods for a class (see R0904).
|
207
|
+
max-public-methods=20
|
208
|
+
|
209
|
+
|
210
|
+
[CLASSES]
|
211
|
+
|
212
|
+
# List of interface methods to ignore, separated by a comma. This is used for
|
213
|
+
# instance to not check methods defines in Zope's Interface base class.
|
214
|
+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
215
|
+
|
216
|
+
# List of method names used to declare (i.e. assign) instance attributes.
|
217
|
+
defining-attr-methods=__init__,__new__,setUp
|
218
|
+
|
219
|
+
|
220
|
+
[IMPORTS]
|
221
|
+
|
222
|
+
# Deprecated modules which should not be used, separated by a comma
|
223
|
+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
|
224
|
+
|
225
|
+
# Create a graph of every (i.e. internal and external) dependencies in the
|
226
|
+
# given file (report RP0402 must not be disabled)
|
227
|
+
import-graph=
|
228
|
+
|
229
|
+
# Create a graph of external dependencies in the given file (report RP0402 must
|
230
|
+
# not be disabled)
|
231
|
+
ext-import-graph=
|
232
|
+
|
233
|
+
# Create a graph of internal dependencies in the given file (report RP0402 must
|
234
|
+
# not be disabled)
|
235
|
+
int-import-graph=
|
236
|
+
|
data/egg/soap.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
- build:
|
2
|
-
default:
|
1
|
+
- build: soap
|
2
|
+
default: all
|
3
3
|
description: "Generate a Python SOAP server project"
|
4
4
|
|
5
5
|
- properties:
|
6
|
-
name:
|
6
|
+
name: soap
|
7
7
|
description: |
|
8
8
|
This script will create a template project for a Python SOAP server and
|
9
9
|
a sample client. Generated build file provides targets 'check' to check
|
@@ -44,6 +44,9 @@
|
|
44
44
|
- cp:
|
45
45
|
src: "#{base}/soap/client.py"
|
46
46
|
dest: "#{here}/#{name}/client.py"
|
47
|
+
- cp:
|
48
|
+
src: "#{base}/soap/pylint.cfg"
|
49
|
+
dest: "#{here}/#{name}/pylint.cfg"
|
47
50
|
|
48
51
|
- target: customization
|
49
52
|
depends: generate
|
data/egg/xmlrpc/build.erb
CHANGED
@@ -1,52 +1,17 @@
|
|
1
1
|
# Build information
|
2
|
-
- build:
|
3
|
-
default: all
|
2
|
+
- build: <%= name %>
|
4
3
|
description: Build project <%= name.capitalize %>
|
4
|
+
extends: ":python:python.yml"
|
5
5
|
|
6
6
|
# Build properties
|
7
7
|
- properties:
|
8
|
-
name:
|
9
|
-
|
10
|
-
|
11
|
-
client:
|
12
|
-
zip: "#{build}/#{name}.zip"
|
13
|
-
clean_dirs: :build
|
14
|
-
clean_files: "**/*.pyc"
|
8
|
+
name: "<%= name %>"
|
9
|
+
py_src_dir: "."
|
10
|
+
py_main: "server.py"
|
11
|
+
client: "client.py"
|
15
12
|
|
16
13
|
# Build targets
|
17
|
-
- target: check
|
18
|
-
description: Check Python script syntax
|
19
|
-
script:
|
20
|
-
- python.pychecker:
|
21
|
-
src: .
|
22
|
-
lenient: true
|
23
|
-
|
24
|
-
- target: server
|
25
|
-
depends: check
|
26
|
-
description: Run server
|
27
|
-
script:
|
28
|
-
- python.python: :server
|
29
|
-
|
30
14
|
- target: client
|
31
15
|
description: Run test client
|
32
16
|
script:
|
33
17
|
- python.python: :client
|
34
|
-
|
35
|
-
- target: zip
|
36
|
-
depends: check
|
37
|
-
description: Generate distribution archive
|
38
|
-
script:
|
39
|
-
- mkdir: :build
|
40
|
-
- zip:
|
41
|
-
includes: "**/*"
|
42
|
-
excludes: ["#{build}*", "**/*.pyc"]
|
43
|
-
dest: :zip
|
44
|
-
|
45
|
-
- target: clean
|
46
|
-
description: Clean generated files
|
47
|
-
script:
|
48
|
-
- rmdir: :clean_dirs
|
49
|
-
- rm: :clean_files
|
50
|
-
|
51
|
-
- target: all
|
52
|
-
depends: [clean, check, zip]
|
@@ -0,0 +1,236 @@
|
|
1
|
+
[MASTER]
|
2
|
+
|
3
|
+
# Specify a configuration file.
|
4
|
+
#rcfile=
|
5
|
+
|
6
|
+
# Python code to execute, usually for sys.path manipulation such as
|
7
|
+
# pygtk.require().
|
8
|
+
#init-hook=
|
9
|
+
|
10
|
+
# Profiled execution.
|
11
|
+
profile=no
|
12
|
+
|
13
|
+
# Add <file or directory> to the black list. It should be a base name, not a
|
14
|
+
# path. You may set this option multiple times.
|
15
|
+
ignore=CVS
|
16
|
+
|
17
|
+
# Pickle collected data for later comparisons.
|
18
|
+
persistent=no
|
19
|
+
|
20
|
+
# List of plugins (as comma separated values of python modules names) to load,
|
21
|
+
# usually to register additional checkers.
|
22
|
+
load-plugins=
|
23
|
+
|
24
|
+
|
25
|
+
[MESSAGES CONTROL]
|
26
|
+
|
27
|
+
# Enable the message, report, category or checker with the given id(s). You can
|
28
|
+
# either give multiple identifier separated by comma (,) or put this option
|
29
|
+
# multiple time.
|
30
|
+
#enable=E0611,E1103,E1124,E1122,E1123,E9906,E9904,E9905,E9902,E9903,E9900,E9901,E0202,E0203,E1001,E0221,E0222,E1101,E1121,E0001,E0710,E0711,E1003,E0103,E1120,E0602,E0701,E0601,E0101,E0100,E0102,E0105,E0104,E0107,E0106,E0503,E0501,E0502,E0211,E0213,E1111,E1002,E0012,E0011,E0702,E1102
|
31
|
+
|
32
|
+
# Disable the message, report, category or checker with the given id(s). You
|
33
|
+
# can either give multiple identifier separated by comma (,) or put this option
|
34
|
+
# multiple time.
|
35
|
+
disable=C0103,C0111,C0112,C0121,C0202,C0203,C0323,C0324,C0301,I0011,R0201,R0801,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,W0102,W0142,W0603,W0703,W0201,E1101,W0232
|
36
|
+
|
37
|
+
[REPORTS]
|
38
|
+
|
39
|
+
# Set the output format. Available formats are text, parseable, colorized, msvs
|
40
|
+
# (visual studio) and html
|
41
|
+
output-format=text
|
42
|
+
|
43
|
+
# Include message's id in output
|
44
|
+
include-ids=yes
|
45
|
+
|
46
|
+
# Put messages in a separate file for each module / package specified on the
|
47
|
+
# command line instead of printing them on stdout. Reports (if any) will be
|
48
|
+
# written in a file name "pylint_global.[txt|html]".
|
49
|
+
files-output=no
|
50
|
+
|
51
|
+
# Tells whether to display a full report or only the messages
|
52
|
+
reports=no
|
53
|
+
|
54
|
+
# Python expression which should return a note less than 10 (10 is the highest
|
55
|
+
# note). You have access to the variables errors warning, statement which
|
56
|
+
# respectively contain the number of errors / warnings messages and the total
|
57
|
+
# number of statements analyzed. This is used by the global evaluation report
|
58
|
+
# (R0004).
|
59
|
+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
60
|
+
|
61
|
+
# Add a comment according to your evaluation note. This is used by the global
|
62
|
+
# evaluation report (R0004).
|
63
|
+
comment=no
|
64
|
+
|
65
|
+
|
66
|
+
[BASIC]
|
67
|
+
|
68
|
+
# Required attributes for module, separated by a comma
|
69
|
+
required-attributes=
|
70
|
+
|
71
|
+
# List of builtins function names that should not be used, separated by a comma
|
72
|
+
bad-functions=map,filter,apply,input
|
73
|
+
|
74
|
+
# Regular expression which should only match correct module names
|
75
|
+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
76
|
+
|
77
|
+
# Regular expression which should only match correct module level names
|
78
|
+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
79
|
+
|
80
|
+
# Regular expression which should only match correct class names
|
81
|
+
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
82
|
+
|
83
|
+
# Regular expression which should only match correct function names
|
84
|
+
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
85
|
+
|
86
|
+
# Regular expression which should only match correct method names
|
87
|
+
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
88
|
+
|
89
|
+
# Regular expression which should only match correct instance attribute names
|
90
|
+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
91
|
+
|
92
|
+
# Regular expression which should only match correct argument names
|
93
|
+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
94
|
+
|
95
|
+
# Regular expression which should only match correct variable names
|
96
|
+
variable-rgx=[a-z_][a-z0-9_]{1,30}$
|
97
|
+
|
98
|
+
# Regular expression which should only match correct list comprehension /
|
99
|
+
# generator expression variable names
|
100
|
+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
101
|
+
|
102
|
+
# Good variable names which should always be accepted, separated by a comma
|
103
|
+
good-names=i,j,k,e,ex,Run,_
|
104
|
+
|
105
|
+
# Bad variable names which should always be refused, separated by a comma
|
106
|
+
bad-names=foo,bar,baz,toto,tutu,tata
|
107
|
+
|
108
|
+
# Regular expression which should only match functions or classes name which do
|
109
|
+
# not require a docstring
|
110
|
+
no-docstring-rgx=__.*__
|
111
|
+
|
112
|
+
|
113
|
+
[FORMAT]
|
114
|
+
|
115
|
+
# Maximum number of characters on a single line.
|
116
|
+
max-line-length=78
|
117
|
+
|
118
|
+
# Maximum number of lines in a module
|
119
|
+
max-module-lines=1000
|
120
|
+
|
121
|
+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
|
122
|
+
# tab).
|
123
|
+
indent-string=' '
|
124
|
+
|
125
|
+
|
126
|
+
[SIMILARITIES]
|
127
|
+
|
128
|
+
# Minimum lines number of a similarity.
|
129
|
+
min-similarity-lines=4
|
130
|
+
|
131
|
+
# Ignore comments when computing similarities.
|
132
|
+
ignore-comments=yes
|
133
|
+
|
134
|
+
# Ignore docstrings when computing similarities.
|
135
|
+
ignore-docstrings=yes
|
136
|
+
|
137
|
+
|
138
|
+
[VARIABLES]
|
139
|
+
|
140
|
+
# Tells whether we should check for unused import in __init__ files.
|
141
|
+
init-import=no
|
142
|
+
|
143
|
+
# A regular expression matching names used for dummy variables (i.e. not used).
|
144
|
+
dummy-variables-rgx=_|dummy
|
145
|
+
|
146
|
+
# List of additional names supposed to be defined in builtins. Remember that
|
147
|
+
# you should avoid to define new builtins when possible.
|
148
|
+
additional-builtins=
|
149
|
+
|
150
|
+
|
151
|
+
[TYPECHECK]
|
152
|
+
|
153
|
+
# Tells whether missing members accessed in mixin class should be ignored. A
|
154
|
+
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
155
|
+
ignore-mixin-members=yes
|
156
|
+
|
157
|
+
# List of classes names for which member attributes should not be checked
|
158
|
+
# (useful for classes with attributes dynamically set).
|
159
|
+
ignored-classes=SQLObject,MySQLdb
|
160
|
+
|
161
|
+
# When zope mode is activated, add a predefined set of Zope acquired attributes
|
162
|
+
# to generated-members.
|
163
|
+
zope=no
|
164
|
+
|
165
|
+
# List of members which are set dynamically and missed by pylint inference
|
166
|
+
# system, and so shouldn't trigger E0201 when accessed.
|
167
|
+
generated-members=REQUEST,acl_users,aq_parent
|
168
|
+
|
169
|
+
|
170
|
+
[MISCELLANEOUS]
|
171
|
+
|
172
|
+
# List of note tags to take in consideration, separated by a comma.
|
173
|
+
notes=FIXME,XXX,TODO
|
174
|
+
|
175
|
+
|
176
|
+
[DESIGN]
|
177
|
+
|
178
|
+
# Maximum number of arguments for function / method
|
179
|
+
max-args=5
|
180
|
+
|
181
|
+
# Argument names that match this expression will be ignored. Default to name
|
182
|
+
# with leading underscore
|
183
|
+
ignored-argument-names=_.*
|
184
|
+
|
185
|
+
# Maximum number of locals for function / method body
|
186
|
+
max-locals=15
|
187
|
+
|
188
|
+
# Maximum number of return / yield for function / method body
|
189
|
+
max-returns=6
|
190
|
+
|
191
|
+
# Maximum number of branch for function / method body
|
192
|
+
max-branchs=12
|
193
|
+
|
194
|
+
# Maximum number of statements in function / method body
|
195
|
+
max-statements=50
|
196
|
+
|
197
|
+
# Maximum number of parents for a class (see R0901).
|
198
|
+
max-parents=7
|
199
|
+
|
200
|
+
# Maximum number of attributes for a class (see R0902).
|
201
|
+
max-attributes=7
|
202
|
+
|
203
|
+
# Minimum number of public methods for a class (see R0903).
|
204
|
+
min-public-methods=2
|
205
|
+
|
206
|
+
# Maximum number of public methods for a class (see R0904).
|
207
|
+
max-public-methods=20
|
208
|
+
|
209
|
+
|
210
|
+
[CLASSES]
|
211
|
+
|
212
|
+
# List of interface methods to ignore, separated by a comma. This is used for
|
213
|
+
# instance to not check methods defines in Zope's Interface base class.
|
214
|
+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
|
215
|
+
|
216
|
+
# List of method names used to declare (i.e. assign) instance attributes.
|
217
|
+
defining-attr-methods=__init__,__new__,setUp
|
218
|
+
|
219
|
+
|
220
|
+
[IMPORTS]
|
221
|
+
|
222
|
+
# Deprecated modules which should not be used, separated by a comma
|
223
|
+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
|
224
|
+
|
225
|
+
# Create a graph of every (i.e. internal and external) dependencies in the
|
226
|
+
# given file (report RP0402 must not be disabled)
|
227
|
+
import-graph=
|
228
|
+
|
229
|
+
# Create a graph of external dependencies in the given file (report RP0402 must
|
230
|
+
# not be disabled)
|
231
|
+
ext-import-graph=
|
232
|
+
|
233
|
+
# Create a graph of internal dependencies in the given file (report RP0402 must
|
234
|
+
# not be disabled)
|
235
|
+
int-import-graph=
|
236
|
+
|
data/egg/xmlrpc.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
- build:
|
2
|
-
default:
|
1
|
+
- build: xmlrpc
|
2
|
+
default: all
|
3
3
|
description: "Generate a Python XML-RPC server project"
|
4
4
|
|
5
5
|
- properties:
|
6
|
-
name:
|
6
|
+
name: xmlrpc
|
7
7
|
description: |
|
8
8
|
This script will create a template project for a Python XML-RPC server.
|
9
9
|
Generated build file provides targets 'check' to check Python scripts
|
@@ -37,6 +37,7 @@
|
|
37
37
|
- erb: { src: "#{base}/xmlrpc/build.erb", dest: "#{here}/#{name}/build.yml" }
|
38
38
|
- cp: { src: "#{base}/xmlrpc/server.py", dest: "#{here}/#{name}/server.py" }
|
39
39
|
- cp: { src: "#{base}/xmlrpc/client.py", dest: "#{here}/#{name}/client.py" }
|
40
|
+
- cp: { src: "#{base}/xmlrpc/pylint.cfg", dest: "#{here}/#{name}/pylint.cfg" }
|
40
41
|
|
41
42
|
- target: customization
|
42
43
|
depends: generate
|
data/lib/bee_task_python.rb
CHANGED
@@ -329,13 +329,12 @@ module Bee
|
|
329
329
|
add_python_path(path)
|
330
330
|
# run coverage command
|
331
331
|
puts "Generating coverage report for #{test_files.length} test(s)..."
|
332
|
-
coverage = "#{File.dirname(__FILE__)}/../tools/coverage/coverage.py"
|
333
332
|
File.delete(data) if File.exists?(data)
|
334
333
|
prev_dir = Dir.pwd
|
335
334
|
for test_file in test_files
|
336
335
|
begin
|
337
336
|
Dir.chdir(dir)
|
338
|
-
command = "
|
337
|
+
command = "coverage -x -f #{data} #{test_file}"
|
339
338
|
puts "Running command: '#{command}'" if @verbose
|
340
339
|
system(command) || error("Error running coverage report")
|
341
340
|
ensure
|
@@ -343,13 +342,13 @@ module Bee
|
|
343
342
|
end
|
344
343
|
end
|
345
344
|
if dest
|
346
|
-
command = "
|
345
|
+
command = "coverage -r -f #{data} -m #{sources} > #{report}"
|
347
346
|
system(command) || error("Error generating coverage report")
|
348
|
-
command = "
|
347
|
+
command = "coverage -a -f #{data} -d #{dest} #{sources}"
|
349
348
|
puts "Running command: '#{command}'" if @verbose
|
350
349
|
system(command) || error("Error generating coverage report")
|
351
350
|
else
|
352
|
-
command = "
|
351
|
+
command = "coverage -r -f #{data} -m #{sources}"
|
353
352
|
puts "Running command: '#{command}'" if @verbose
|
354
353
|
system(command) || error("Error generating coverage report")
|
355
354
|
end
|
data/python.yml
CHANGED
@@ -14,28 +14,28 @@
|
|
14
14
|
# Directory where live generated files
|
15
15
|
py_build_dir: "build"
|
16
16
|
# Python source directory
|
17
|
-
|
17
|
+
py_src_dir: "src"
|
18
18
|
# Python test directory
|
19
|
-
|
19
|
+
py_test_dir: "test"
|
20
|
+
# Python test source files
|
21
|
+
py_test_files: "test_*.py"
|
20
22
|
# Python version (regular expression, such as "^2\.[67]" to accept Python
|
21
23
|
# 2.6 and 2.7, not checked if property not set)
|
22
24
|
py_version: ~
|
23
25
|
# list of directories with Python source files to check
|
24
|
-
py_chk_src: [:
|
26
|
+
py_chk_src: [:py_src_dir, :py_test_dir]
|
25
27
|
# list of Python files to check
|
26
28
|
py_chk_files: ""
|
27
29
|
# directories to include in Python path while checking
|
28
|
-
py_chk_path: [:
|
30
|
+
py_chk_path: [:py_src_dir, :py_test_dir]
|
29
31
|
# tells if Python source check is lenient
|
30
32
|
py_chk_len: false
|
31
33
|
# Pylint options
|
32
34
|
py_chk_opt: "--generated-members=objects"
|
33
35
|
# Pylint configuration file
|
34
36
|
py_chk_cfg: "pylint.cfg"
|
35
|
-
# Python test source files
|
36
|
-
py_tst_inc: "test_*.py"
|
37
37
|
# list of directories with Python source files to document
|
38
|
-
py_doc_src: [:
|
38
|
+
py_doc_src: [:py_src_dir, :py_test_dir]
|
39
39
|
# directory where to generate source documentation
|
40
40
|
py_doc_dir: "#{py_build_dir}/epydoc"
|
41
41
|
# Python documentation option
|
@@ -45,7 +45,7 @@
|
|
45
45
|
# List of file patterns to include in report
|
46
46
|
py_cov_inc: ["*.py"]
|
47
47
|
# main scrip to run
|
48
|
-
py_main: "#{
|
48
|
+
py_main: "#{py_src_dir}/#{name}.py"
|
49
49
|
# directories to clean
|
50
50
|
py_clean_dirs: [:py_build_dir]
|
51
51
|
# files to clean
|
@@ -73,7 +73,8 @@
|
|
73
73
|
|
74
74
|
- target: py_check
|
75
75
|
depends: py_version
|
76
|
-
description: Check Python
|
76
|
+
description: Check Python source syntax (pylint must have been installed with
|
77
|
+
'pip install pylint')
|
77
78
|
script:
|
78
79
|
- python.pylint:
|
79
80
|
src: :py_chk_src
|
@@ -86,10 +87,11 @@
|
|
86
87
|
- target: py_test
|
87
88
|
description: Run unit tests
|
88
89
|
script:
|
89
|
-
- python.test: "#{
|
90
|
+
- python.test: "#{py_test_dir}/#{py_test_files}"
|
90
91
|
|
91
92
|
- target: py_doc
|
92
|
-
description: Generate
|
93
|
+
description: Generate documentation for Python source code (epydoc must have
|
94
|
+
been installed with 'pip install epydoc')
|
93
95
|
script:
|
94
96
|
- rmrf: :py_doc_dir
|
95
97
|
- mkdir: :py_doc_dir
|
@@ -99,15 +101,15 @@
|
|
99
101
|
options: :py_doc_opt
|
100
102
|
|
101
103
|
- target: py_cover
|
102
|
-
description: Generate coverage report on Python code
|
103
|
-
|
104
|
+
description: Generate coverage report on Python code (coverage must have been
|
105
|
+
installed with 'pip install coverage')
|
104
106
|
script:
|
105
107
|
- rmrf: :py_cov_dir
|
106
108
|
- mkdir: :py_cov_dir
|
107
109
|
- python.coverage:
|
108
|
-
src: :
|
109
|
-
test: "#{
|
110
|
-
dir: :
|
110
|
+
src: :py_src_dir
|
111
|
+
test: "#{py_test_dir}/#{py_test_files}"
|
112
|
+
dir: :py_test_dir
|
111
113
|
data: "#{py_build_dir}/.coverage"
|
112
114
|
|
113
115
|
- target: py_run
|
@@ -120,4 +122,3 @@
|
|
120
122
|
script:
|
121
123
|
- rmdir: :py_clean_dirs
|
122
124
|
- rm: :py_clean_files
|
123
|
-
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bee_python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michel Casabianca
|
@@ -47,9 +47,9 @@ files:
|
|
47
47
|
- lib/bee_task_python.rb
|
48
48
|
- egg/egg/build.yml
|
49
49
|
- egg/egg/ez_setup.py
|
50
|
+
- egg/egg/pylint.cfg
|
50
51
|
- egg/egg/script.py
|
51
52
|
- egg/egg/setup.erb
|
52
|
-
- egg/egg/suite.py
|
53
53
|
- egg/egg/test.py
|
54
54
|
- egg/egg.yml
|
55
55
|
- egg/http/build.erb
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- egg/script.yml
|
72
72
|
- egg/soap/build.erb
|
73
73
|
- egg/soap/client.py
|
74
|
+
- egg/soap/pylint.cfg
|
74
75
|
- egg/soap/server.py
|
75
76
|
- egg/soap.yml
|
76
77
|
- egg/source/source.py
|
@@ -79,6 +80,7 @@ files:
|
|
79
80
|
- egg/test.yml
|
80
81
|
- egg/xmlrpc/build.erb
|
81
82
|
- egg/xmlrpc/client.py
|
83
|
+
- egg/xmlrpc/pylint.cfg
|
82
84
|
- egg/xmlrpc/server.py
|
83
85
|
- egg/xmlrpc.yml
|
84
86
|
- tools/compile/compile.py
|
data/egg/egg/suite.py
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
# coding=UTF-8
|
3
|
-
|
4
|
-
"""Test suite to run all tests in current directory."""
|
5
|
-
|
6
|
-
import os
|
7
|
-
import sys
|
8
|
-
import unittest
|
9
|
-
|
10
|
-
def run():
|
11
|
-
"""Run unit tests."""
|
12
|
-
# list test files in test directory
|
13
|
-
test_dir = os.path.dirname(sys.argv[0])
|
14
|
-
files = os.listdir(test_dir)
|
15
|
-
tests = []
|
16
|
-
for filename in files:
|
17
|
-
if filename.startswith('test') and filename.endswith('.py'):
|
18
|
-
tests.append(filename[:filename.rfind('.')])
|
19
|
-
# add tests in test suite
|
20
|
-
suite = unittest.TestSuite()
|
21
|
-
for test in tests:
|
22
|
-
suite.addTest(unittest.defaultTestLoader.loadTestsFromName(test))
|
23
|
-
# run test suite with verbosity passed on command line
|
24
|
-
verbosity = 2
|
25
|
-
if len(sys.argv)>1:
|
26
|
-
verbosity = int(sys.argv[1])
|
27
|
-
runner = unittest.TextTestRunner(verbosity=verbosity)
|
28
|
-
result = runner.run(suite)
|
29
|
-
if not result.wasSuccessful():
|
30
|
-
sys.exit(-1)
|
31
|
-
else:
|
32
|
-
sys.exit(0)
|
33
|
-
|
34
|
-
# run if started on command line
|
35
|
-
if __name__ == '__main__':
|
36
|
-
run()
|
37
|
-
|