community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1791039 - /comdev/reporter.apache.org/trunk/scripts/parsepmcs.py
Date Tue, 11 Apr 2017 21:44:35 GMT
Author: sebb
Date: Tue Apr 11 21:44:35 2017
New Revision: 1791039

URL: http://svn.apache.org/viewvc?rev=1791039&view=rev
Log:
Drop empty projects and PMCs

Modified:
    comdev/reporter.apache.org/trunk/scripts/parsepmcs.py

Modified: comdev/reporter.apache.org/trunk/scripts/parsepmcs.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/parsepmcs.py?rev=1791039&r1=1791038&r2=1791039&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/parsepmcs.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/parsepmcs.py Tue Apr 11 21:44:35 2017
@@ -159,6 +159,15 @@ for project in projects:
             ret += 1
     projects[project] =  {i:projects[project][i] for i in projects[project] if projects[project][i]!="!"}
 
+# drop empty projects
+projects = {
+    p : projects[p]
+    for p in projects 
+        if len(projects[p]) > 0 # only keep ones with entries 
+        or # else print a message; this leaves the condition as false 
+        print("Dropping empty project: %s" % p) # print returns None == false
+}
+
 for project in pmcs:
     for cid in pmcs[project]:
         if len(pmcs[project][cid]) < 3 or pmcs[project][cid][2] < (time.time() - (86400*3)):
@@ -167,6 +176,15 @@ for project in pmcs:
             ret += 1
     pmcs[project] =  {i:pmcs[project][i] for i in pmcs[project] if pmcs[project][i]!="!"}
 
+# drop empty PMCs
+pmcs = {
+    p : pmcs[p]
+    for p in pmcs 
+        if len(pmcs[p]) > 0 # only keep ones with entries 
+        or # else print a message; this leaves the condition as false 
+        print("Dropping empty PMC: %s" % p) # print returns None == false
+}
+
 
 print("Writing pmcs.json")
 with open(__HOME + "pmcs.json", "w", encoding='utf-8') as f:



Mime
View raw message