RadonMetrics/Documentation/source/Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator.html

changeset 69
cdf51e6abaee
parent 49
ab84f5a5edd8
child 78
4ce16e1d29f3
equal deleted inserted replaced
68:69445de59a30 69:cdf51e6abaee
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator</h1> 23 <h1>Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator</h1>
24
23 <p> 25 <p>
24 Module implementing the raw code metrics service. 26 Module implementing the raw code metrics service.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
34
31 <table> 35 <table>
32 <tr><td>None</td></tr> 36 <tr><td>None</td></tr>
33 </table> 37 </table>
34 <h3>Functions</h3> 38 <h3>Functions</h3>
39
35 <table> 40 <table>
41
36 <tr> 42 <tr>
37 <td><a href="#__raw2Dict">__raw2Dict</a></td> 43 <td><a href="#__raw2Dict">__raw2Dict</a></td>
38 <td>Private function to convert an object holding raw analysis results into a dictionary.</td> 44 <td>Private function to convert an object holding raw analysis results into a dictionary.</td>
39 </tr><tr> 45 </tr>
46 <tr>
40 <td><a href="#__rawCodeMetrics">__rawCodeMetrics</a></td> 47 <td><a href="#__rawCodeMetrics">__rawCodeMetrics</a></td>
41 <td>Private function to calculate the raw code metrics for one Python file.</td> 48 <td>Private function to calculate the raw code metrics for one Python file.</td>
42 </tr><tr> 49 </tr>
50 <tr>
43 <td><a href="#batchRawCodeMetrics">batchRawCodeMetrics</a></td> 51 <td><a href="#batchRawCodeMetrics">batchRawCodeMetrics</a></td>
44 <td>Module function to calculate the raw code metrics for a batch of files.</td> 52 <td>Module function to calculate the raw code metrics for a batch of files.</td>
45 </tr><tr> 53 </tr>
54 <tr>
46 <td><a href="#initBatchService">initBatchService</a></td> 55 <td><a href="#initBatchService">initBatchService</a></td>
47 <td>Initialize the batch service and return the entry point.</td> 56 <td>Initialize the batch service and return the entry point.</td>
48 </tr><tr> 57 </tr>
58 <tr>
49 <td><a href="#initService">initService</a></td> 59 <td><a href="#initService">initService</a></td>
50 <td>Initialize the service and return the entry point.</td> 60 <td>Initialize the service and return the entry point.</td>
51 </tr><tr> 61 </tr>
62 <tr>
52 <td><a href="#rawCodeMetrics">rawCodeMetrics</a></td> 63 <td><a href="#rawCodeMetrics">rawCodeMetrics</a></td>
53 <td>Private function to calculate the raw code metrics of one file.</td> 64 <td>Private function to calculate the raw code metrics of one file.</td>
54 </tr><tr> 65 </tr>
66 <tr>
55 <td><a href="#worker">worker</a></td> 67 <td><a href="#worker">worker</a></td>
56 <td>Module function acting as the parallel worker for the raw code metrics calculation.</td> 68 <td>Module function acting as the parallel worker for the raw code metrics calculation.</td>
57 </tr> 69 </tr>
58 </table> 70 </table>
59 <hr /><hr /> 71 <hr />
72 <hr />
60 <a NAME="__raw2Dict" ID="__raw2Dict"></a> 73 <a NAME="__raw2Dict" ID="__raw2Dict"></a>
61 <h2>__raw2Dict</h2> 74 <h2>__raw2Dict</h2>
62 <b>__raw2Dict</b>(<i>obj</i>) 75 <b>__raw2Dict</b>(<i>obj</i>)
76
63 <p> 77 <p>
64 Private function to convert an object holding raw analysis results into a 78 Private function to convert an object holding raw analysis results into a
65 dictionary. 79 dictionary.
66 </p><dl> 80 </p>
81 <dl>
82
67 <dt><i>obj</i> (radon.raw.Module)</dt> 83 <dt><i>obj</i> (radon.raw.Module)</dt>
68 <dd> 84 <dd>
69 object as returned from analyze() 85 object as returned from analyze()
70 </dd> 86 </dd>
71 </dl><dl> 87 </dl>
88 <dl>
72 <dt>Returns:</dt> 89 <dt>Returns:</dt>
73 <dd> 90 <dd>
74 conversion result 91 conversion result
75 </dd> 92 </dd>
76 </dl><dl> 93 </dl>
94 <dl>
77 <dt>Return Type:</dt> 95 <dt>Return Type:</dt>
78 <dd> 96 <dd>
79 dict 97 dict
80 </dd> 98 </dd>
81 </dl> 99 </dl>
82 <div align="right"><a href="#top">Up</a></div> 100 <div align="right"><a href="#top">Up</a></div>
83 <hr /><hr /> 101 <hr />
102 <hr />
84 <a NAME="__rawCodeMetrics" ID="__rawCodeMetrics"></a> 103 <a NAME="__rawCodeMetrics" ID="__rawCodeMetrics"></a>
85 <h2>__rawCodeMetrics</h2> 104 <h2>__rawCodeMetrics</h2>
86 <b>__rawCodeMetrics</b>(<i>file, text=""</i>) 105 <b>__rawCodeMetrics</b>(<i>file, text=""</i>)
106
87 <p> 107 <p>
88 Private function to calculate the raw code metrics for one Python file. 108 Private function to calculate the raw code metrics for one Python file.
89 </p><dl> 109 </p>
110 <dl>
111
90 <dt><i>file</i> (str)</dt> 112 <dt><i>file</i> (str)</dt>
91 <dd> 113 <dd>
92 source filename 114 source filename
93 </dd><dt><i>text</i> (str)</dt> 115 </dd>
116 <dt><i>text</i> (str)</dt>
94 <dd> 117 <dd>
95 source text 118 source text
96 </dd> 119 </dd>
97 </dl><dl> 120 </dl>
121 <dl>
98 <dt>Returns:</dt> 122 <dt>Returns:</dt>
99 <dd> 123 <dd>
100 tuple containing the result dictionary 124 tuple containing the result dictionary
101 </dd> 125 </dd>
102 </dl><dl> 126 </dl>
127 <dl>
103 <dt>Return Type:</dt> 128 <dt>Return Type:</dt>
104 <dd> 129 <dd>
105 (tuple of dict) 130 (tuple of dict)
106 </dd> 131 </dd>
107 </dl> 132 </dl>
108 <div align="right"><a href="#top">Up</a></div> 133 <div align="right"><a href="#top">Up</a></div>
109 <hr /><hr /> 134 <hr />
135 <hr />
110 <a NAME="batchRawCodeMetrics" ID="batchRawCodeMetrics"></a> 136 <a NAME="batchRawCodeMetrics" ID="batchRawCodeMetrics"></a>
111 <h2>batchRawCodeMetrics</h2> 137 <h2>batchRawCodeMetrics</h2>
112 <b>batchRawCodeMetrics</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) 138 <b>batchRawCodeMetrics</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>)
139
113 <p> 140 <p>
114 Module function to calculate the raw code metrics for a batch of files. 141 Module function to calculate the raw code metrics for a batch of files.
115 </p><dl> 142 </p>
143 <dl>
144
116 <dt><i>argumentsList</i> (list)</dt> 145 <dt><i>argumentsList</i> (list)</dt>
117 <dd> 146 <dd>
118 list of arguments tuples as given for rawCodeMetrics 147 list of arguments tuples as given for rawCodeMetrics
119 </dd><dt><i>send</i> (function)</dt> 148 </dd>
149 <dt><i>send</i> (function)</dt>
120 <dd> 150 <dd>
121 reference to send function 151 reference to send function
122 </dd><dt><i>fx</i> (str)</dt> 152 </dd>
153 <dt><i>fx</i> (str)</dt>
123 <dd> 154 <dd>
124 registered service name 155 registered service name
125 </dd><dt><i>cancelled</i> (function)</dt> 156 </dd>
157 <dt><i>cancelled</i> (function)</dt>
126 <dd> 158 <dd>
127 reference to function checking for a cancellation 159 reference to function checking for a cancellation
128 </dd><dt><i>maxProcesses</i> (int)</dt> 160 </dd>
161 <dt><i>maxProcesses</i> (int)</dt>
129 <dd> 162 <dd>
130 number of processes to be used 163 number of processes to be used
131 </dd> 164 </dd>
132 </dl> 165 </dl>
133 <div align="right"><a href="#top">Up</a></div> 166 <div align="right"><a href="#top">Up</a></div>
134 <hr /><hr /> 167 <hr />
168 <hr />
135 <a NAME="initBatchService" ID="initBatchService"></a> 169 <a NAME="initBatchService" ID="initBatchService"></a>
136 <h2>initBatchService</h2> 170 <h2>initBatchService</h2>
137 <b>initBatchService</b>(<i></i>) 171 <b>initBatchService</b>(<i></i>)
172
138 <p> 173 <p>
139 Initialize the batch service and return the entry point. 174 Initialize the batch service and return the entry point.
140 </p><dl> 175 </p>
176 <dl>
141 <dt>Returns:</dt> 177 <dt>Returns:</dt>
142 <dd> 178 <dd>
143 the entry point for the background client (function) 179 the entry point for the background client (function)
144 </dd> 180 </dd>
145 </dl> 181 </dl>
146 <div align="right"><a href="#top">Up</a></div> 182 <div align="right"><a href="#top">Up</a></div>
147 <hr /><hr /> 183 <hr />
184 <hr />
148 <a NAME="initService" ID="initService"></a> 185 <a NAME="initService" ID="initService"></a>
149 <h2>initService</h2> 186 <h2>initService</h2>
150 <b>initService</b>(<i></i>) 187 <b>initService</b>(<i></i>)
188
151 <p> 189 <p>
152 Initialize the service and return the entry point. 190 Initialize the service and return the entry point.
153 </p><dl> 191 </p>
192 <dl>
154 <dt>Returns:</dt> 193 <dt>Returns:</dt>
155 <dd> 194 <dd>
156 the entry point for the background client (function) 195 the entry point for the background client (function)
157 </dd> 196 </dd>
158 </dl> 197 </dl>
159 <div align="right"><a href="#top">Up</a></div> 198 <div align="right"><a href="#top">Up</a></div>
160 <hr /><hr /> 199 <hr />
200 <hr />
161 <a NAME="rawCodeMetrics" ID="rawCodeMetrics"></a> 201 <a NAME="rawCodeMetrics" ID="rawCodeMetrics"></a>
162 <h2>rawCodeMetrics</h2> 202 <h2>rawCodeMetrics</h2>
163 <b>rawCodeMetrics</b>(<i>file, text=""</i>) 203 <b>rawCodeMetrics</b>(<i>file, text=""</i>)
204
164 <p> 205 <p>
165 Private function to calculate the raw code metrics of one file. 206 Private function to calculate the raw code metrics of one file.
166 </p><dl> 207 </p>
208 <dl>
209
167 <dt><i>file</i> (str)</dt> 210 <dt><i>file</i> (str)</dt>
168 <dd> 211 <dd>
169 source filename 212 source filename
170 </dd><dt><i>text</i> (str)</dt> 213 </dd>
214 <dt><i>text</i> (str)</dt>
171 <dd> 215 <dd>
172 source text 216 source text
173 </dd> 217 </dd>
174 </dl><dl> 218 </dl>
219 <dl>
175 <dt>Returns:</dt> 220 <dt>Returns:</dt>
176 <dd> 221 <dd>
177 tuple containing the result dictionary 222 tuple containing the result dictionary
178 </dd> 223 </dd>
179 </dl><dl> 224 </dl>
225 <dl>
180 <dt>Return Type:</dt> 226 <dt>Return Type:</dt>
181 <dd> 227 <dd>
182 (tuple of dict) 228 (tuple of dict)
183 </dd> 229 </dd>
184 </dl> 230 </dl>
185 <div align="right"><a href="#top">Up</a></div> 231 <div align="right"><a href="#top">Up</a></div>
186 <hr /><hr /> 232 <hr />
233 <hr />
187 <a NAME="worker" ID="worker"></a> 234 <a NAME="worker" ID="worker"></a>
188 <h2>worker</h2> 235 <h2>worker</h2>
189 <b>worker</b>(<i>inputQueue, outputQueue</i>) 236 <b>worker</b>(<i>inputQueue, outputQueue</i>)
237
190 <p> 238 <p>
191 Module function acting as the parallel worker for the raw code metrics 239 Module function acting as the parallel worker for the raw code metrics
192 calculation. 240 calculation.
193 </p><dl> 241 </p>
242 <dl>
243
194 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> 244 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt>
195 <dd> 245 <dd>
196 input queue 246 input queue
197 </dd><dt><i>outputQueue</i> (multiprocessing.Queue)</dt> 247 </dd>
248 <dt><i>outputQueue</i> (multiprocessing.Queue)</dt>
198 <dd> 249 <dd>
199 output queue 250 output queue
200 </dd> 251 </dd>
201 </dl> 252 </dl>
202 <div align="right"><a href="#top">Up</a></div> 253 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial