--- UserCode/TWikiIB/makeDepMetrics.py 2009/09/07 22:58:39 1.3 +++ UserCode/TWikiIB/makeDepMetrics.py 2009/09/07 23:38:00 1.5 @@ -16,19 +16,48 @@ class mkDepMetrics(object) : def makeSummary(self): contents=self.contents writeflag = False + cycleflag = False + typeCycle = re.compile('^(Cycle \w*)') for line in contents : - print line - print + matchCycle = typeCycle.search(line) if line=='# Summary\n' : writeflag = True - continue - if line=='# Levels\n' : + elif line=='# Levels\n' : writeflag = False - return - if line=='\n' : + cycleflag = False + self.page.write('\n') + break + elif line=='\n' : continue - if writeflag : + elif line[0:5] =='* CCD' : + writeflag = False + self.page.write('''
+* CCD:  Cumulative Component Dependency measures the cumulative testing cost
+        across the system.
+* ACD:  Average Component Dependency indicates the number of other packages
+        an average package depends on.
+* NCCD: Normalised Cumulative Component Dependency measures how the structure
+        differs from a balanced binary tree of comparable size. If NCCD is one,
+        the structure resembles a binary tree; if much less than one, the
+        packages are mostly independent; if much greater than one, the system
+        is fairly strongly coupled. The only universal NCCD target is to
+        minimise for any given software system--a high value indicates a
+        strongly coupled system and less coupling is better.
+
+''' + elif line=='# Cycles\n' : + self.page.write(' * Cycles\n\n') + self.page.write('
\n') + cycleflag=True + elif matchCycle and cycleflag : + self.page.write(' * '+matchCycle.group(1)) + elif cycleflag : + self.page.write(' * '+line.strip()) + elif writeflag : self.page.write(' * '+line) + else : + print line + continue def packlist(self):