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

changeset 14
5f206edea27e
child 43
53dbd4f4d6c2
equal deleted inserted replaced
13:22bc345844e7 14:5f206edea27e
1 <!DOCTYPE html>
2 <html><head>
3 <title>Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>Plugin_Metrics_Radon.RadonMetrics.CodeMetricsCalculator</h1>
23 <p>
24 Module implementing the raw code metrics service.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr><td>None</td></tr>
33 </table>
34 <h3>Functions</h3>
35 <table>
36 <tr>
37 <td><a href="#__raw2Dict">__raw2Dict</a></td>
38 <td>Private function to convert an object holding raw analysis results into a dictionary.</td>
39 </tr><tr>
40 <td><a href="#__rawCodeMetrics">__rawCodeMetrics</a></td>
41 <td>Private function to calculate the raw code metrics for one Python file.</td>
42 </tr><tr>
43 <td><a href="#batchRawCodeMetrics">batchRawCodeMetrics</a></td>
44 <td>Module function to calculate the raw code metrics for a batch of files.</td>
45 </tr><tr>
46 <td><a href="#initBatchService">initBatchService</a></td>
47 <td>Initialize the batch service and return the entry point.</td>
48 </tr><tr>
49 <td><a href="#initService">initService</a></td>
50 <td>Initialize the service and return the entry point.</td>
51 </tr><tr>
52 <td><a href="#rawCodeMetrics">rawCodeMetrics</a></td>
53 <td>Private function to calculate the raw code metrics of one file.</td>
54 </tr><tr>
55 <td><a href="#worker">worker</a></td>
56 <td>Module function acting as the parallel worker for the raw code metrics calculation.</td>
57 </tr>
58 </table>
59 <hr /><hr />
60 <a NAME="__raw2Dict" ID="__raw2Dict"></a>
61 <h2>__raw2Dict</h2>
62 <b>__raw2Dict</b>(<i>obj</i>)
63 <p>
64 Private function to convert an object holding raw analysis results into a
65 dictionary.
66 </p><dl>
67 <dt><i>obj</i> (radon.raw.Module)</dt>
68 <dd>
69 object as returned from analyze()
70 </dd>
71 </dl><dl>
72 <dt>Returns:</dt>
73 <dd>
74 conversion result
75 </dd>
76 </dl><dl>
77 <dt>Return Type:</dt>
78 <dd>
79 dict
80 </dd>
81 </dl>
82 <div align="right"><a href="#top">Up</a></div>
83 <hr /><hr />
84 <a NAME="__rawCodeMetrics" ID="__rawCodeMetrics"></a>
85 <h2>__rawCodeMetrics</h2>
86 <b>__rawCodeMetrics</b>(<i>file, text=""</i>)
87 <p>
88 Private function to calculate the raw code metrics for one Python file.
89 </p><dl>
90 <dt><i>file</i> (str)</dt>
91 <dd>
92 source filename
93 </dd><dt><i>text</i> (str)</dt>
94 <dd>
95 source text
96 </dd>
97 </dl><dl>
98 <dt>Returns:</dt>
99 <dd>
100 tuple containing the result dictionary
101 </dd>
102 </dl><dl>
103 <dt>Return Type:</dt>
104 <dd>
105 (tuple of dict)
106 </dd>
107 </dl>
108 <div align="right"><a href="#top">Up</a></div>
109 <hr /><hr />
110 <a NAME="batchRawCodeMetrics" ID="batchRawCodeMetrics"></a>
111 <h2>batchRawCodeMetrics</h2>
112 <b>batchRawCodeMetrics</b>(<i>argumentsList, send, fx, cancelled</i>)
113 <p>
114 Module function to calculate the raw code metrics for a batch of files.
115 </p><dl>
116 <dt><i>argumentsList</i> (list)</dt>
117 <dd>
118 list of arguments tuples as given for rawCodeMetrics
119 </dd><dt><i>send</i> (function)</dt>
120 <dd>
121 reference to send function
122 </dd><dt><i>fx</i> (str)</dt>
123 <dd>
124 registered service name
125 </dd><dt><i>cancelled</i> (function)</dt>
126 <dd>
127 reference to function checking for a cancellation
128 </dd>
129 </dl>
130 <div align="right"><a href="#top">Up</a></div>
131 <hr /><hr />
132 <a NAME="initBatchService" ID="initBatchService"></a>
133 <h2>initBatchService</h2>
134 <b>initBatchService</b>(<i></i>)
135 <p>
136 Initialize the batch service and return the entry point.
137 </p><dl>
138 <dt>Returns:</dt>
139 <dd>
140 the entry point for the background client (function)
141 </dd>
142 </dl>
143 <div align="right"><a href="#top">Up</a></div>
144 <hr /><hr />
145 <a NAME="initService" ID="initService"></a>
146 <h2>initService</h2>
147 <b>initService</b>(<i></i>)
148 <p>
149 Initialize the service and return the entry point.
150 </p><dl>
151 <dt>Returns:</dt>
152 <dd>
153 the entry point for the background client (function)
154 </dd>
155 </dl>
156 <div align="right"><a href="#top">Up</a></div>
157 <hr /><hr />
158 <a NAME="rawCodeMetrics" ID="rawCodeMetrics"></a>
159 <h2>rawCodeMetrics</h2>
160 <b>rawCodeMetrics</b>(<i>file, text=""</i>)
161 <p>
162 Private function to calculate the raw code metrics of one file.
163 </p><dl>
164 <dt><i>file</i> (str)</dt>
165 <dd>
166 source filename
167 </dd><dt><i>text</i> (str)</dt>
168 <dd>
169 source text
170 </dd>
171 </dl><dl>
172 <dt>Returns:</dt>
173 <dd>
174 tuple containing the result dictionary
175 </dd>
176 </dl><dl>
177 <dt>Return Type:</dt>
178 <dd>
179 (tuple of dict)
180 </dd>
181 </dl>
182 <div align="right"><a href="#top">Up</a></div>
183 <hr /><hr />
184 <a NAME="worker" ID="worker"></a>
185 <h2>worker</h2>
186 <b>worker</b>(<i>input, output</i>)
187 <p>
188 Module function acting as the parallel worker for the raw code metrics
189 calculation.
190 </p><dl>
191 <dt><i>input</i> (multiprocessing.Queue)</dt>
192 <dd>
193 input queue
194 </dd><dt><i>output</i> (multiprocessing.Queue)</dt>
195 <dd>
196 output queue
197 </dd>
198 </dl>
199 <div align="right"><a href="#top">Up</a></div>
200 <hr />
201 </body></html>

eric ide

mercurial