community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1709224 - /comdev/reporter.apache.org/trunk/data/pmcdates.py
Date Sat, 17 Oct 2015 23:42:16 GMT
Author: sebb
Date: Sat Oct 17 23:42:16 2015
New Revision: 1709224

URL: http://svn.apache.org/viewvc?rev=1709224&view=rev
Log:
Add the earliest PMC member date if it agrees with the PMC start

Modified:
    comdev/reporter.apache.org/trunk/data/pmcdates.py

Modified: comdev/reporter.apache.org/trunk/data/pmcdates.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/data/pmcdates.py?rev=1709224&r1=1709223&r2=1709224&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/data/pmcdates.py (original)
+++ comdev/reporter.apache.org/trunk/data/pmcdates.py Sat Oct 17 23:42:16 2015
@@ -2,6 +2,7 @@ import sys
 sys.path.append("../../projects.apache.org/scripts") # module committee_info is in p.a.o
 import committee_info
 import json
+import time
 
 """
 
@@ -11,14 +12,43 @@ Reads committee-info.json via committee_
 
 Creates:
 pmcdates.json
+Format:
+{ 
+  "pmc1": {
+     "pmc": [ 'start date (MM/YYYY)', pmc startdate(secs since epoch), earliest committer
startdate(secs since epoch) ]
+     "roster": {
+        "id1": [ "Full name", start date (secs since epoch) ]
+     }
+  },
+}
+
+Note that the earliest startdate is set to 0 if there is no entry with the same month and
year as the text start date.
+Thus if it *is* present, it is almost certainly the actual start date of the PMC.
+If it is not present, either there are no remaining members of the original PMC (spamassassin/maven),
+or the PMC was restarted (apr, xalan)
+(or it's just possible that committee-info may be wrong)
 
 """
 
 pmcdates = committee_info.pmcdates()
 
+for pmc in sorted(pmcdates):
+    roster = pmcdates[pmc]['roster']
+    startdate = pmcdates[pmc]['pmc'][0]
+    earliest = 0 # no date found
+    for id in roster:
+        joindate = roster[id][1]
+        if earliest == 0 or joindate < earliest:
+            earliest = joindate
+    earliestMMYYYY = time.strftime('%m/%Y',time.gmtime(earliest))
+    if earliestMMYYYY == startdate:
+        pmcdates[pmc]['pmc'].insert(2, earliest)
+    else:
+        pmcdates[pmc]['pmc'].insert(2, 0)
+        print(time.strftime('%Y-%m-%d = %m/%Y',time.gmtime(earliest)),startdate, pmc)
+    
 print("Writing pmcdates.json")
 with open("pmcdates.json", "w", encoding='utf-8') as f:
     json.dump(pmcdates, f, sort_keys = True, indent=1, ensure_ascii=False)
-    f.close()
 
 print("All done!")
\ No newline at end of file



Mime
View raw message