[Piuparts-commits] rev 483 - trunk

Holger Levsen holger at alioth.debian.org
Tue Aug 11 09:09:51 UTC 2009


Author: holger
Date: 2009-08-11 09:09:51 +0000 (Tue, 11 Aug 2009)
New Revision: 483

Modified:
   trunk/piuparts-report.py
Log:
draw stats per quarter

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-08-11 09:07:19 UTC (rev 482)
+++ trunk/piuparts-report.py	2009-08-11 09:09:51 UTC (rev 483)
@@ -800,16 +800,17 @@
 
     def make_stats_graph(self):
         countsfile = os.path.join(self._output_directory, "counts.txt")
-        pngfile = os.path.join(self._output_directory, "bimonthly-states.png")
+        pngfile = os.path.join(self._output_directory, "states.png")
         r('t <- (read.table("'+countsfile+'",sep=",",header=1,row.names=1))')
         r('cname <- c("date",rep(colnames(t)))')
-        r('v <- t[(nrow(t)-60):nrow(t),0:12]')
+        # here we define how many days we wants stats for
+        r('v <- t[(nrow(t)-90):nrow(t),0:12]')
         # thanks to http://tango.freedesktop.org/Generic_Icon_Theme_Guidelines for those nice colors
         r('palette(c("#4e9a06", "#ef2929", "#73d216", "#d3d7cf", "#5c3566", "#c4a000", "#fce94f", "#a40000", "#888a85", "#2e3436", "#8ae234",  "#729fcf","#204a87"))')
         r('bitmap(file="'+pngfile+'",type="png16m",width=16,height=9,pointsize=10,res=100)')
-        r('barplot(t(v),col = 1:13, main="Packages per state in '+self._config.section+' (past 2 months)", xlab="", ylab="Number of packages",space=0.1,border=0)')
+        r('barplot(t(v),col = 1:13, main="Packages per state in '+self._config.section+' (past quarter)", xlab="", ylab="Number of packages",space=0.1,border=0)')
         r('legend(x="bottom",legend=colnames(t), ncol=2,fill=1:13,xjust=0.5,yjust=0,bty="n")')
-        return "<tr class=\"normalrow\"> <td class=\"contentcell2\" colspan=\"3\"><a href=\"%s\"><img src=\"/%s/%s\" height=\"450\" width=\"800\" alt=\"Package states in the last 2 months\"></a></td></tr>\n" % ("bimonthly-states.png", self._config.section, "bimonthly-states.png")
+        return "<tr class=\"normalrow\"> <td class=\"contentcell2\" colspan=\"3\"><a href=\"%s\"><img src=\"/%s/%s\" height=\"450\" width=\"800\" alt=\"Package states in the last quarter\"></a></td></tr>\n" % ("states.png", self._config.section, "states.png")
 
     def create_and_link_to_analysises(self,state):
         link="<ul>"




More information about the Piuparts-commits mailing list