incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r706038 - in /incubator/public/trunk: clutch.py site-author/clutch.xml site-publish/clutch.html
Date Sun, 19 Oct 2008 16:03:12 GMT
Author: crossley
Date: Sun Oct 19 09:03:11 2008
New Revision: 706038

URL: http://svn.apache.org/viewvc?rev=706038&view=rev
Log:
Do not show statusUpdateCounts for periods prior to their entry date.

Modified:
    incubator/public/trunk/clutch.py
    incubator/public/trunk/site-author/clutch.xml
    incubator/public/trunk/site-publish/clutch.html

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=706038&r1=706037&r2=706038&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Sun Oct 19 09:03:11 2008
@@ -54,6 +54,12 @@
 projects = {}
 gatherDate = datetime.datetime.utcnow()
 gatherDateString = datetime.datetime.utcnow().ctime()
+delta = datetime.timedelta(days=61)
+statusTallyDate1 = gatherDate - delta
+delta = datetime.timedelta(days=122)
+statusTallyDate2 = gatherDate - delta
+delta = datetime.timedelta(days=273)
+statusTallyDate3 = gatherDate - delta
 
 commentsRE = re.compile("(.*) *\(([^)]+)\)")
 startDateRE = re.compile("([0-9]+)-0?([0-9]+)-?0?([0-9]+)?")
@@ -114,6 +120,7 @@
     projects[id]['mentors'] = ""
     projects[id]['startDate'] = ""
     projects[id]['elapsedDays'] = 0
+    projects[id]['entryDate'] = None
     # Is it reporting monthly?
     if group.find('month') >= 0:
       projects[id]['reportingMonthly'] = True
@@ -222,6 +229,7 @@
     try:
       entryDate = datetime.datetime(int(match.group(1)), int(match.group(2)), entryDateDay)
       projects[k]['elapsedDays'] = (gatherDate-entryDate).days
+      projects[k]['entryDate'] = entryDate
     except ValueError:
       print 'ERROR: %s: ValueError with date' % k
 
@@ -251,12 +259,6 @@
   # On this older Mac still python-2.3.5, so no. See notes at top.
   command = "svn log --xml site-author/projects/%s.xml" % projects[k]['statusFileName']
   dom = xml.dom.minidom.parseString(commands.getoutput(command))
-  delta = datetime.timedelta(days=61)
-  recordDate1 = gatherDate - delta
-  delta = datetime.timedelta(days=122)
-  recordDate2 = gatherDate - delta
-  delta = datetime.timedelta(days=273)
-  recordDate3 = gatherDate - delta
   rowCounter = 0
   count1 = 0
   count2 = 0
@@ -273,14 +275,17 @@
       if projects[k]['statusAge'] == 0:
         # FIXME: Could be improved
         projects[k]['statusAge'] += 1 # edited today
-    if thisDate > recordDate1:
+    if thisDate >= statusTallyDate1:
       count1 += 1
-    if thisDate > recordDate2:
+    if thisDate >= statusTallyDate2:
       count2 += 1
-    if thisDate > recordDate3:
-      # FIXME: Need to detect if this is before their entry and not show total
+    if thisDate >= statusTallyDate3:
       count3 += 1
-  projects[k]['statusUpdateCounts'] = "%(a)d,%(b)d,%(c)d" % {'a': count1, 'b': count2, 'c':
count3}
+  if projects[k]['entryDate'] >= statusTallyDate1:
+    count2 = "-"
+  if projects[k]['entryDate'] >= statusTallyDate2:
+    count3 = "-"
+  projects[k]['statusUpdateCounts'] = "%(a)s,%(b)s,%(c)s" % {'a': count1, 'b': count2, 'c':
count3}
 
   dom.unlink()
 

Modified: incubator/public/trunk/site-author/clutch.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/site-author/clutch.xml?rev=706038&r1=706037&r2=706038&view=diff
==============================================================================
--- incubator/public/trunk/site-author/clutch.xml (original)
+++ incubator/public/trunk/site-author/clutch.xml Sun Oct 19 09:03:11 2008
@@ -81,7 +81,7 @@
         </li>
       </ul>
       <p>
-        Clutch last gathered: Sun Oct 19 14:32:51 2008 UTC.<br />
+        Clutch last gathered: Sun Oct 19 15:58:06 2008 UTC.<br />
         Number of podlings in incubation: 36
       </p>
       <table id="clutch">
@@ -156,7 +156,7 @@
           <td><a href="/projects/click.html">True</a></td>
           <td>2008-08-16</td>
           <td class="cool2">64</td>
-          <td>0,1,1</td>
+          <td>0,1,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/click/">True</a></td>
           <td>False</td>
         </tr>
@@ -216,7 +216,7 @@
           <td><a href="/projects/empire-db.html">True</a></td>
           <td>2008-08-06</td>
           <td class="cool2">74</td>
-          <td>0,3,3</td>
+          <td>0,3,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/empire-db/">True</a></td>
           <td>False</td>
         </tr>
@@ -231,7 +231,7 @@
           <td><a href="/projects/etch.html">True</a></td>
           <td>2008-09-24</td>
           <td class="cool1">25</td>
-          <td>1,1,1</td>
+          <td>1,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>
@@ -366,7 +366,7 @@
           <td><a href="/projects/olio.html">True</a></td>
           <td>2008-09-29</td>
           <td class="cool1">20</td>
-          <td>2,2,2</td>
+          <td>2,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>
@@ -396,7 +396,7 @@
           <td><a href="/projects/photark.html">True</a></td>
           <td>2008-09-07</td>
           <td class="cool1">42</td>
-          <td>3,3,3</td>
+          <td>3,3,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/photark/">True</a></td>
           <td>False</td>
         </tr>
@@ -606,7 +606,7 @@
           <td><a href="/projects/vcl.html">True</a></td>
           <td>2008-10-01</td>
           <td class="cool1">18</td>
-          <td>1,1,1</td>
+          <td>1,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>

Modified: incubator/public/trunk/site-publish/clutch.html
URL: http://svn.apache.org/viewvc/incubator/public/trunk/site-publish/clutch.html?rev=706038&r1=706037&r2=706038&view=diff
==============================================================================
--- incubator/public/trunk/site-publish/clutch.html (original)
+++ incubator/public/trunk/site-publish/clutch.html Sun Oct 19 09:03:11 2008
@@ -166,7 +166,7 @@
         </li>
       </ul>
 <p>
-        Clutch last gathered: Sun Oct 19 14:32:51 2008 UTC.<br />
+        Clutch last gathered: Sun Oct 19 15:58:06 2008 UTC.<br />
         Number of podlings in incubation: 36
       </p>
 <table id="clutch" class="colortable" width="100%">
@@ -241,7 +241,7 @@
           <td><a href="/projects/click.html">True</a></td>
           <td>2008-08-16</td>
           <td class="cool2">64</td>
-          <td>0,1,1</td>
+          <td>0,1,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/click/">True</a></td>
           <td>False</td>
         </tr>
@@ -301,7 +301,7 @@
           <td><a href="/projects/empire-db.html">True</a></td>
           <td>2008-08-06</td>
           <td class="cool2">74</td>
-          <td>0,3,3</td>
+          <td>0,3,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/empire-db/">True</a></td>
           <td>False</td>
         </tr>
@@ -316,7 +316,7 @@
           <td><a href="/projects/etch.html">True</a></td>
           <td>2008-09-24</td>
           <td class="cool1">25</td>
-          <td>1,1,1</td>
+          <td>1,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>
@@ -451,7 +451,7 @@
           <td><a href="/projects/olio.html">True</a></td>
           <td>2008-09-29</td>
           <td class="cool1">20</td>
-          <td>2,2,2</td>
+          <td>2,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>
@@ -481,7 +481,7 @@
           <td><a href="/projects/photark.html">True</a></td>
           <td>2008-09-07</td>
           <td class="cool1">42</td>
-          <td>3,3,3</td>
+          <td>3,3,-</td>
           <td class="cool1"><a href="http://incubator.apache.org/photark/">True</a></td>
           <td>False</td>
         </tr>
@@ -691,7 +691,7 @@
           <td><a href="/projects/vcl.html">True</a></td>
           <td>2008-10-01</td>
           <td class="cool1">18</td>
-          <td>1,1,1</td>
+          <td>1,-,-</td>
           <td>False</td>
           <td>False</td>
         </tr>



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message