community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1681595 - in /comdev/projects.apache.org: scripts/README.txt scripts/import/parsecommittees.py site/json/foundation/HEADER.html site/json/foundation/committees-evolution.json site/json/foundation/committees-retired.json
Date Mon, 25 May 2015 15:35:28 GMT
Author: hboutemy
Date: Mon May 25 15:35:28 2015
New Revision: 1681595

URL: http://svn.apache.org/r1681595
Log:
replaced committees-evolution.json with committees-retired.json

Removed:
    comdev/projects.apache.org/site/json/foundation/committees-evolution.json
Modified:
    comdev/projects.apache.org/scripts/README.txt
    comdev/projects.apache.org/scripts/import/parsecommittees.py
    comdev/projects.apache.org/site/json/foundation/HEADER.html
    comdev/projects.apache.org/site/json/foundation/committees-retired.json

Modified: comdev/projects.apache.org/scripts/README.txt
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/README.txt?rev=1681595&r1=1681594&r2=1681595&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/README.txt (original)
+++ comdev/projects.apache.org/scripts/README.txt Mon May 25 15:35:28 2015
@@ -30,13 +30,13 @@ various sources:
 
 2. importing data (import)
 
-- parsecommittees.py: Parses committee-info.txt to detect new committees and add them to
committees-evolution.json
-  in: foundation/committees-evolution.json + committee-info.txt (https://svn.apache.org/repos/private/committers/board/committee-info.txt)
-  out: foundation/committees.json + foundation/committees-evolution.json
+- parsecommittees.py: Parses committee-info.txt to detect new and retired committees
+  in: foundation/committees.json + foundation/committees-retired.json + committee-info.txt
(https://svn.apache.org/repos/private/committers/board/committee-info.txt)
+  out: foundation/committees.json + foundation/committees-retired.json
 
-- parsepmcs.py: imports PMC data from the old project.apache.org site. No need
+- parsepmcs.py: imports PMC data (RDF) from the old project.apache.org site. No need
   to run that more than once?
-  in: https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/data_files/*.rdf
+  in: https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/pmc_list.xml
+ PMC data .rdf files
   out: foundation/pmcs.json
 
 - rdfparse.py: Parses existing RDF(DOAP) files from the old projects.a.o and

Modified: comdev/projects.apache.org/scripts/import/parsecommittees.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parsecommittees.py?rev=1681595&r1=1681594&r2=1681595&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parsecommittees.py (original)
+++ comdev/projects.apache.org/scripts/import/parsecommittees.py Mon May 25 15:35:28 2015
@@ -6,6 +6,7 @@ import os
 import urllib.request
 import xml.etree.ElementTree as ET
 import xml.dom.minidom as minidom
+import datetime
 
 # Committee names from committees-info.txt that do not match committees-evolution.json
 renamesCommittee2Json = {
@@ -41,8 +42,13 @@ shortdescs = {
     'labs': 'A place for innovation where committers of the foundation can experiment with
new ideas'
 }
 
-with open("../../site/json/foundation/committees-evolution.json", "r") as f:
-    committeesEvolution = json.loads(f.read())
+with open("../../site/json/foundation/committees-retired.json", "r") as f:
+    committeesRetired = json.loads(f.read())
+    f.close()
+
+# to detect retired committees to add to committees-retired.json
+with open("../../site/json/foundation/committees.json", "r") as f:
+    committeesPrevious = json.loads(f.read())
     f.close()
 
 with open("../../site/json/foundation/people.json", "r") as f:
@@ -129,6 +135,7 @@ www = urllib.request.urlopen("http://www
 
 committeeCount = 0
 committeesList = []
+committeesMap = {}
 addedCommittees = []
 c = {}
 
@@ -152,16 +159,6 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             #print(committeeShortName)
             committeeCount += 1
 
-            # add committee to committeesEvolution if necessary
-            key = "%s-%s" % (year, month)
-            if not key in committeesEvolution:
-                committeesEvolution[key] = [] # add new year-month
-            if not committeeName in committeesEvolution[key]:
-                # add committee to committeesEvolution
-                committeesEvolution[key].append(committeeName)
-                committeesEvolution[key].sort()
-                addedCommittees.append("%s: %s" % (key, committeeName))
-
             # add committee to committees
             committee = {}
             committee['id'] = committeeId
@@ -171,7 +168,7 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
                 group = committeeId
             committee['group'] = group
             committee['name'] = committeeName
-            committee['established'] = key
+            committee['established'] = "%s-%s" % (year, month)
             if group in homepages:
                 homepage = homepages[group]
             else:
@@ -196,7 +193,7 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             #committee['pmcs'] = pmc
             #committee['committers'] = committers
             if len(pmc) == 0:
-                print('WARN: %s (%s established in %s) has no PMC members LDAP group (id=%s)'
% (committeeId, committee, key, pmcgroup))
+                print('WARN: %s (%s established in %s) has no PMC members LDAP group (id=%s)'
% (committeeId, committeeName, committee['established'], pmcgroup))
             if committeeShortName in committees:
                 committee['chair'] = committees[committeeShortName]['chair']
             if committeeShortName in cycles:
@@ -220,6 +217,7 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             else:
                 print("WARN: %s (%s) missing from pmc_list.xml" % (committeeShortName, committeeId))
             committeesList.append(committee)
+            committeesMap[committeeId] = committee;
 
             # generate TLP PMC DOAP file at http://projects-new.apache.org/doap/{committeeId}/pmc.rdf
             doap = ET.Element('rdf:RDF', attrib= { 'xml:lang': 'en',
@@ -247,10 +245,6 @@ for pmc in re.findall(r"\* .+?\s+\(est\.
             print("INFO: %s ignored %s" % (committeeShortName, pmc[pmc.rfind('('):]))
         c[committeeName] = True
 
-with open("../../site/json/foundation/committees-evolution.json", "w") as f:
-    f.write(json.dumps(committeesEvolution, sort_keys=True, indent=0))
-    f.close()
-
 print("found %s new committees from %s committees in committee_info.txt" % (len(addedCommittees),
committeeCount))
 addedCommittees.sort()
 for added in addedCommittees:
@@ -260,6 +254,21 @@ with open("../../site/json/foundation/co
     f.write(json.dumps(committeesList, sort_keys=True, indent=0))
     f.close()
 
+# detect retired committees to add to committees-retired.json
+for previous in committeesPrevious:
+    if not previous['id'] in committeesMap:
+        print("found retired committee: %s" % previous.name)
+        previous['retired'] = datetime.date.today().strftime('%Y-%m')
+        # remove data that is not useful in a retired committee
+        previous.pop('chair', None)
+        previous.pop('group', None)
+        previous.pop('rdf', None)
+        previous.pop('reporting', None)
+        committeesRetired.push(previous)
+with open("../../site/json/foundation/committees-retired.json", "w") as f:
+    f.write(json.dumps(committeesRetired, 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:

Modified: comdev/projects.apache.org/site/json/foundation/HEADER.html
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/json/foundation/HEADER.html?rev=1681595&r1=1681594&r2=1681595&view=diff
==============================================================================
--- comdev/projects.apache.org/site/json/foundation/HEADER.html (original)
+++ comdev/projects.apache.org/site/json/foundation/HEADER.html Mon May 25 15:35:28 2015
@@ -10,6 +10,5 @@ for more information.
 <li><a href="podlings.json"><code>podlings.json</code></a>
and <a href="podlings-evolution.json"><code>podlings-evolution.json</code></a>
generated by <code>cronjobs/podlings.py</code> from <a href="http://incubator.apache.org/podlings.xml">http://incubator.apache.org/podlings.xml</a></li>
 <li><a href="projects.json"><code>projects.json</code></a>
imported with <code>import/rdfparse.py</code> from <a href='https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/files.xml'>projects'
DOAP files</a></li>
 <li><a href="releases.json"><code>releases.json</code></a>
generated by <code>cronjobs/parsereleases.py</code> from <a href="http://www.apache.org/dist/">http://www.apache.org/dist/</a></li>
-<li><a href="committees.json"><code>committees.json</code></a>
and <a href="committees-evolution.json"><code>committees-evolution.json</code></a>
imported with <code>import/parsecommittees.py</code> from <code>https://svn.apache.org/repos/private/committers/board/committee-info.txt</code></li>
-<li><a href="committees-retired.json"><code>committees-retired.json</code></a>,
which should replace <code>committees-evolution.json</code> when integrated</li>
+<li><a href="committees.json"><code>committees.json</code></a>
and <a href="committees-retired.json"><code>committees-retired.json</code></a>
imported with <code>import/parsecommittees.py</code> from <code>https://svn.apache.org/repos/private/committers/board/committee-info.txt</code></li>
 </ul>
\ No newline at end of file

Modified: comdev/projects.apache.org/site/json/foundation/committees-retired.json
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/json/foundation/committees-retired.json?rev=1681595&r1=1681594&r2=1681595&view=diff
==============================================================================
--- comdev/projects.apache.org/site/json/foundation/committees-retired.json (original)
+++ comdev/projects.apache.org/site/json/foundation/committees-retired.json Mon May 25 15:35:28
2015
@@ -1,93 +1,93 @@
 [
-  {
-    "id": "hivemind",
-    "homepage": "http://hivemind.apache.org/",
-    "name": "Apache HiveMind",
-    "established": "2006-04",
-    "retired": "2009-04"
-  },
-  {
-    "id": "shale",
-    "homepage": "http://shale.apache.org/",
-    "name": "Apache Shale",
-    "established": "2006-06",
-    "retired": "2009-05"
-  },
-  {
-    "id": "beehive",
-    "homepage": "http://beehive.apache.org/",
-    "name": "Apache Beehive",
-    "established": "2005-07",
-    "retired": "2010-01"
-  },
-  {
-    "id": "ibatis",
-    "homepage": "http://ibatis.apache.org/",
-    "name": "Apache iBatis",
-    "established": "2005-05",
-    "retired": "2010-06"
-  },
-  {
-    "id": "excalibur",
-    "homepage": "http://excalibur.apache.org/",
-    "name": "Apache Excalibur",
-    "established": "2004-05",
-    "retired": "2010-12"
-  },
-  {
-    "id": "harmony",
-    "homepage": "http://harmony.apache.org/",
-    "name": "Apache Harmony",
-    "established": "2006-10",
-    "retired": "2011-11"
-  },
-  {
-    "id": "jakarta",
-    "homepage": "http://jakarta.apache.org/",
-    "name": "Apache Jakarta",
-    "established": "1999-09",
-    "retired": "2011-12"
-  },
-  {
-    "id": "stdcxx",
-    "homepage": "http://stdcxx.apache.org/",
-    "name": "Apache C++ Standard Library",
-    "established": "2007-11",
-    "retired": "2013-07"
-  },
-  {
-    "id": "esme",
-    "homepage": "http://esme.apache.org/",
-    "name": "Apache ESME",
-    "established": "2010-12",
-    "retired": "2013-07"
-  },
-  {
-    "id": "xmlbeans",
-    "homepage": "http://xmlbeans.apache.org/",
-    "name": "Apache XML Beans",
-    "established": "2004-06",
-    "retired": "2013-07"
-  },
-  {
-    "id": "whirr",
-    "homepage": "http://whirr.apache.org/",
-    "name": "Apache Whirr",
-    "established": "2011-08",
-    "retired": "2015-03"
-  },
-  {
-    "id": "click",
-    "homepage": "http://click.apache.org/",
-    "name": "Apache Click",
-    "established": "2009-11",
-    "retired": "2015-04"
-  },
-  {
-    "id": "lenya",
-    "homepage": "http://lenya.apache.org/",
-    "name": "Apache Lenya",
-    "established": "2004-09",
-    "retired": "2015-04"
-  }
+{
+"established": "2006-04",
+"homepage": "http://hivemind.apache.org/",
+"id": "hivemind",
+"name": "Apache HiveMind",
+"retired": "2009-04"
+},
+{
+"established": "2006-06",
+"homepage": "http://shale.apache.org/",
+"id": "shale",
+"name": "Apache Shale",
+"retired": "2009-05"
+},
+{
+"established": "2005-07",
+"homepage": "http://beehive.apache.org/",
+"id": "beehive",
+"name": "Apache Beehive",
+"retired": "2010-01"
+},
+{
+"established": "2005-05",
+"homepage": "http://ibatis.apache.org/",
+"id": "ibatis",
+"name": "Apache iBatis",
+"retired": "2010-06"
+},
+{
+"established": "2004-05",
+"homepage": "http://excalibur.apache.org/",
+"id": "excalibur",
+"name": "Apache Excalibur",
+"retired": "2010-12"
+},
+{
+"established": "2006-10",
+"homepage": "http://harmony.apache.org/",
+"id": "harmony",
+"name": "Apache Harmony",
+"retired": "2011-11"
+},
+{
+"established": "1999-09",
+"homepage": "http://jakarta.apache.org/",
+"id": "jakarta",
+"name": "Apache Jakarta",
+"retired": "2011-12"
+},
+{
+"established": "2007-11",
+"homepage": "http://stdcxx.apache.org/",
+"id": "stdcxx",
+"name": "Apache C++ Standard Library",
+"retired": "2013-07"
+},
+{
+"established": "2010-12",
+"homepage": "http://esme.apache.org/",
+"id": "esme",
+"name": "Apache ESME",
+"retired": "2013-07"
+},
+{
+"established": "2004-06",
+"homepage": "http://xmlbeans.apache.org/",
+"id": "xmlbeans",
+"name": "Apache XML Beans",
+"retired": "2013-07"
+},
+{
+"established": "2011-08",
+"homepage": "http://whirr.apache.org/",
+"id": "whirr",
+"name": "Apache Whirr",
+"retired": "2015-03"
+},
+{
+"established": "2009-11",
+"homepage": "http://click.apache.org/",
+"id": "click",
+"name": "Apache Click",
+"retired": "2015-04"
+},
+{
+"established": "2004-09",
+"homepage": "http://lenya.apache.org/",
+"id": "lenya",
+"name": "Apache Lenya",
+"retired": "2015-04"
+}
 ]
\ No newline at end of file



Mime
View raw message