16 |
|
def makeSummary(self): |
17 |
|
contents=self.contents |
18 |
|
writeflag = False |
19 |
+ |
cycleflag = False |
20 |
+ |
typeCycle = re.compile('^(Cycle \w*)') |
21 |
|
for line in contents : |
22 |
< |
print line |
21 |
< |
print |
22 |
> |
matchCycle = typeCycle.search(line) |
23 |
|
if line=='# Summary\n' : |
24 |
|
writeflag = True |
25 |
< |
continue |
25 |
< |
if line=='# Levels\n' : |
25 |
> |
elif line=='# Levels\n' : |
26 |
|
writeflag = False |
27 |
< |
return |
28 |
< |
if line=='\n' : |
27 |
> |
cycleflag = False |
28 |
> |
self.page.write('</div>\n') |
29 |
> |
break |
30 |
> |
elif line=='\n' : |
31 |
|
continue |
32 |
< |
if writeflag : |
32 |
> |
elif line[0:5] =='* CCD' : |
33 |
> |
writeflag = False |
34 |
> |
self.page.write('''<pre> |
35 |
> |
* CCD: Cumulative Component Dependency measures the cumulative testing cost |
36 |
> |
across the system. |
37 |
> |
* ACD: Average Component Dependency indicates the number of other packages |
38 |
> |
an average package depends on. |
39 |
> |
* NCCD: Normalised Cumulative Component Dependency measures how the structure |
40 |
> |
differs from a balanced binary tree of comparable size. If NCCD is one, |
41 |
> |
the structure resembles a binary tree; if much less than one, the |
42 |
> |
packages are mostly independent; if much greater than one, the system |
43 |
> |
is fairly strongly coupled. The only universal NCCD target is to |
44 |
> |
minimise for any given software system--a high value indicates a |
45 |
> |
strongly coupled system and less coupling is better. |
46 |
> |
</pre> |
47 |
> |
''' |
48 |
> |
elif line=='# Cycles\n' : |
49 |
> |
self.page.write(' * Cycles\n\n') |
50 |
> |
self.page.write('<div id="test">\n') |
51 |
> |
cycleflag=True |
52 |
> |
elif matchCycle and cycleflag : |
53 |
> |
self.page.write(' * '+matchCycle.group(1)) |
54 |
> |
elif cycleflag : |
55 |
> |
self.page.write(' * '+line.strip()) |
56 |
> |
elif writeflag : |
57 |
|
self.page.write(' * '+line) |
58 |
+ |
else : |
59 |
+ |
print line |
60 |
+ |
continue |
61 |
|
|
62 |
|
|
63 |
|
def packlist(self): |