community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1678651 - /comdev/projects.apache.org/scripts/import/parsecommittees.py
Date Sun, 10 May 2015 22:48:59 GMT
Author: hboutemy
Date: Sun May 10 22:48:58 2015
New Revision: 1678651

URL: http://svn.apache.org/r1678651
Log:
extract chair from committee-info.txt

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=1678651&r1=1678650&r2=1678651&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Sun May 10 22:48:58 2015
@@ -48,10 +48,11 @@ except:
     print("  svn export https://svn.apache.org/repos/private/committers/board/committee-info.txt")
     print("(requires authentication with committer karma)")
     sys.exit(1)
+# extract reporting cycles information
+cycles = { 'Incubator': 0 } # Incubator reports each month
+current = 1
 reports = data[data.index("January, April, July, October"):data.index('Next month')]
 buf = io.StringIO(reports)
-cycles = { 'Incubator': 0 }
-current = 1
 newCycle = True
 for p in buf.readlines():
     if p.startswith('  '):
@@ -61,6 +62,33 @@ for p in buf.readlines():
         if not newCycle:
             newCycle = True
             current += 1
+# extract committees composition
+data = data[data.index('Hint: '):]
+data = data[data.index('* '):]
+buf = io.StringIO(data)
+curCommittee = ''
+committees = {}
+c = {}
+newCommittee = True
+for l in buf.readlines():
+    if l.startswith('* '):
+        curCommittee = l[2:l.index('  (')]
+        newCommittee = True
+        c['members'] = {}
+    elif len(l.strip()) == 0:
+        if newCommittee:
+            committees[curCommittee] = c
+            c = {}
+            newCommittee = False
+    elif not l.startswith('==='):
+        m = re.search(r"(.+?)\s+<([^@]+)@apache.org", l.strip())
+        fullname = m.group(1)
+        uid = m.group(2)
+        isChair = fullname.endswith('(chair)')
+        if isChair:
+            fullname = fullname[0:fullname.index('(')].strip()
+            c['chair'] = uid
+        c['members'][uid] = fullname
 
 tlpCount = 0
 tlps = []
@@ -126,14 +154,15 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             tlp['committers'] = committers
             if len(pmc) == 0:
                 print('WARN: %s (%s established in %s) has no PMC members LDAP group (id=%s)'
% (tlp_id, committee, key, pmcgid))
-            # TODO
-            # tlp['chair'] = uid
+            if project in committees:
+                tlp['chair'] = committees[project]['chair']
             if project in cycles:
                 tlp['reporting'] = cycles[project]
             else:
                 print('WARN: %s not found in reporting cycles' % project)
-            # tlp['charter']
-            # tlp['retired']
+            # TODO
+            # tlp['charter'] source = PMC's DOAP? other?
+            # tlp['retired'] not in committee-info.txt
             tlps.append(tlp)
         else:
             # Special Committee (Officer's, President's or Board)



Mime
View raw message