From commits-return-1452-apmail-community-commits-archive=community.apache.org@community.apache.org Sun May 10 22:49:00 2015 Return-Path: X-Original-To: apmail-community-commits-archive@minotaur.apache.org Delivered-To: apmail-community-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 03116174DB for ; Sun, 10 May 2015 22:49:00 +0000 (UTC) Received: (qmail 30695 invoked by uid 500); 10 May 2015 22:49:00 -0000 Delivered-To: apmail-community-commits-archive@community.apache.org Received: (qmail 30624 invoked by uid 500); 10 May 2015 22:48:59 -0000 Mailing-List: contact commits-help@community.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@community.apache.org Delivered-To: mailing list commits@community.apache.org Received: (qmail 30615 invoked by uid 99); 10 May 2015 22:48:59 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 May 2015 22:48:59 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 51539AC0164 for ; Sun, 10 May 2015 22:48:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1678651 - /comdev/projects.apache.org/scripts/import/parsecommittees.py Date: Sun, 10 May 2015 22:48:59 -0000 To: commits@community.apache.org From: hboutemy@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150510224859.51539AC0164@hades.apache.org> 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)