You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hb...@apache.org on 2015/05/09 12:05:24 UTC

svn commit: r1678475 - /comdev/projects.apache.org/scripts/import/parsecommittees.py

Author: hboutemy
Date: Sat May  9 10:05:24 2015
New Revision: 1678475

URL: http://svn.apache.org/r1678475
Log:
improved output

Modified:
    comdev/projects.apache.org/scripts/import/parsecommittees.py

Modified: comdev/projects.apache.org/scripts/import/parsecommittees.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parsecommittees.py?rev=1678475&r1=1678474&r2=1678475&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Sat May  9 10:05:24 2015
@@ -1,9 +1,12 @@
-import re, urllib.request
-import csv
+import re
 import json
-import os
+import sys
+
+renames = {
+    'Apache APR': 'Apache Portable Runtime',
+    'Apache Logging': 'Apache Logging Services'
+}
 
-chairs = json.load(open("../../site/json/foundation/chairs.json"))
 data = None
 committees = {}
 psize = {}
@@ -15,7 +18,9 @@ try:
         f.close()
 except:
     print("You will need to download committee-info.txt and place it in this folder first")
-    os.exit(1)
+    print("  svn export https://svn.apache.org/repos/private/committers/board/committee-info.txt")
+    print("(requires authentication with committer karma)")
+    sys.exit(1)
 
 x = 0
 
@@ -32,20 +37,24 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
         month = m.group(2)
         year = m.group(3)
         project = "Apache %s" % project
-        if not re.search(r"[Cc]ommit", pmc, re.IGNORECASE):
+        if project in renames:
+            project = renames[project]
+        if not re.search(r"Committee", pmc):
             #print(project)
             x += 1
             committees["%s-%s" % (year, month)].append(project)
         else:
-            print("%s was found but is not an STLP" % project)
+            print("INFO: %s ignored %s" % (project, pmc[pmc.rfind('('):]))
         c[project] = True
 
 with open("../../site/json/foundation/committees.json", "w") as f:
     f.write(json.dumps(committees, sort_keys=True, indent=0))
     f.close()
 
+# compare with chairs, for consistency checking
+chairs = json.load(open("../../site/json/foundation/chairs.json"))
 for chair in chairs:
     if not chair in c:
-        print("%s is not in committee-info!" % chair)
+        print("WARN: %s is not in committee-info: retired?" % chair)
 
-print(x)
\ No newline at end of file
+print("found %s TLPs in committee_info.txt" % x)
\ No newline at end of file