incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1855561 - in /incubator/public/trunk: clutch2.py clutch2status.py
Date Thu, 14 Mar 2019 23:34:36 GMT
Author: wave
Date: Thu Mar 14 23:34:36 2019
New Revision: 1855561

URL: http://svn.apache.org/viewvc?rev=1855561&view=rev
Log:
Nearly complete for much more fullsome checking of the clutch.

Modified:
    incubator/public/trunk/clutch2.py
    incubator/public/trunk/clutch2status.py

Modified: incubator/public/trunk/clutch2.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch2.py?rev=1855561&r1=1855560&r2=1855561&view=diff
==============================================================================
--- incubator/public/trunk/clutch2.py (original)
+++ incubator/public/trunk/clutch2.py Thu Mar 14 23:34:36 2019
@@ -294,6 +294,7 @@ mailListNameRE = re.compile("^([a-z]+)-(
 mailListNameUrlRE = re.compile("/([a-z]+)-([-a-z0-9]+)/$")
 urlHttpRE = re.compile("^http")
 distMirrorRE = re.compile("cgi/incubator/([-a-z0-9]+)/")
+newCommitterRE = re.compile("[nN]ew [cC]omm?itt?ers? ?\(?([0-9]+)?")
 
 # Import the persistent data ---
 # This enables us to skip detection of website etc. if already detected.
@@ -399,6 +400,7 @@ for row in dom.getElementsByTagName("pod
             projects[id]['hasMailListDev'] = ""
             projects[id]['hintMailListCommits'] = ""
             projects[id]['hasMailListCommits'] = ""
+            projects[id]['numberCommittersNew'] = 0
             try:
                 projects[id]['numberCommitters'] = len(projectLDAP[resource]["members"])
                 projects[id]['numberPMCMembers'] = len(projectLDAP[resource]["owners"])
@@ -476,7 +478,7 @@ for row in dom.getElementsByTagName("pod
             if reporting.length != 1:
                 projects[id]['hasReportingGroup'] = False
                 if not isGraduating:
-                    errorMsg = "ERROR: {0}: expecting a singleton report group".format(id)
+                    errorMsg = "SEVERE: {0}: expecting a singleton report group".format(id)
                     print(errorMsg)
                     otherIssues.append(errorMsg)
                     errorMsg = ["05","Reporting group is either missing or a multiple"]
@@ -489,7 +491,7 @@ for row in dom.getElementsByTagName("pod
                 group = reporting[0].getAttribute("group")
                 if group == None:
                     projects[id]['hasReportingGroup'] = False
-                    errorMsg =" ERROR: {0}: missing group attribute".format(id)
+                    errorMsg ="SEVERE: {0}: missing group attribute".format(id)
                     print(errorMsg)
                     otherIssues.append(errorMsg)
                     errorMsg = ["06","Reporting group is missing"]
@@ -590,6 +592,8 @@ for k in sorted(projectNames, key=str.lo
                         print("{0}: urlTracker={1}".format(k,value))
                     continue
                 if cell.getAttribute('id') == "www" and hasUrl:
+                    if len(value) < 10:
+                        value = ""
                     projects[k]['urlWww'] = value
                     if optionVerbose:
                         print("{0}: urlWww={1}".format(k,value))
@@ -611,6 +615,12 @@ for k in sorted(projectNames, key=str.lo
                     ll = line.split('<li>')
                     ll = ll[1].split('</li>')
                     projects[k]['news'].append(ll[0])
+                    matchNewCommitter = re.search(newCommitterRE, line)
+                    if matchNewCommitter:
+                        if matchNewCommitter.group(1):
+                            projects[k]['numberCommittersNew'] += int(matchNewCommitter.group(1))
+                        else:
+                            projects[k]['numberCommittersNew'] += 1
         dom.unlink()
     # end of if status file exists
 
@@ -786,12 +796,12 @@ with osPopen(['svn', 'ls', '-Rv', 'https
                     distribHash[podling].append(path)
 
 for k in releases:
-    # FIXME: need to handle projects[k]['resourceNames']
     if not k in projects:
         if k in graduatedProjects:
             errorMsg = "{0}: Has graduated, but still has remains on Incubator distribution
mirrors".format(
                 k)
             print('ERROR:', errorMsg)
+            errorMsg += ". See <a href=\"#h-Graduate\">help</a>."
             otherIssues.append(errorMsg)
             continue
         if k in retiredProjects:
@@ -803,11 +813,6 @@ for k in releasesBadName:
     print('ERROR:', errorMsg)
     errorMsg += ". See <a href=\"#h-hasRelease\">help</a>."
     otherIssues.append(errorMsg)
-    if k in graduatedProjects:
-        errorMsg = "{0}: Has graduated, but still has remains on Incubator distribution mirrors".format(k)
-        print('ERROR:', errorMsg)
-        errorMsg += ". See <a href=\"#h-Graduate\">help</a>."
-        otherIssues.append(errorMsg)
 
 # Processing the gathered sata ---
 
@@ -1015,7 +1020,12 @@ for k in sorted(projectNames, key=str.lo
         print(errorMsg)
         errorMsg = ["11","Website is missing"]
         projects[k]['fixMeList'].append(errorMsg)
-        
+    elif "apache.org" not in projects[k]['urlWww']:
+        errorMsg = "INFO: {0}: Does not yet have an Apache website. Instead {1}".format(k,projects[k]['urlWww'])
+        print(errorMsg)
+        errorMsg = ["09","Apache website is missing. Instead: {0}".format(projects[k]['urlWww'])]
+        projects[k]['fixMeList'].append(errorMsg)
+
     if projects[k]['urlWww']:
         # if the website exists then look into site scan for possible issues.
         j = projects[k]['resource']
@@ -1083,7 +1093,7 @@ for k in sorted(projectNames, key=str.lo
     else:
         for nameDist in projects[k]['resourceNames']:
             urlDist = "https://www.apache.org/dist/incubator/{0}/".format(nameDist)
-            urlMirror = "https://www.apache.org/dyn/closer.cgi/incubator/{0}/".format(nameDist)
+            urlMirror = "https://www.apache.org/dyn/closer.lua?filename=incubator/{0}/".format(nameDist)
             if nameDist in distareas:
                 projects[k]['urlDist'] = urlMirror
                 break
@@ -1098,7 +1108,7 @@ for k in sorted(projectNames, key=str.lo
 
     # Detect if they have a PGP KEYS file
     if projects[k]['urlDist']:
-        match = re.search("/incubator/([^/]+)/", projects[k]['urlDist'])
+        match = re.search("=incubator/([^/]+)/", projects[k]['urlDist'])
         if match:
             nameDistArea = match.group(1)
             if nameDistArea in keysList:
@@ -1139,7 +1149,7 @@ for k in sorted(projectNames, key=str.lo
                         pprint.pprint(projects[k]['distributions'])
                         pprint.pprint(projects[k]['distribHash'])
                     else:
-                        # create a dictionary of podling releases.
+                        # create a dictionary of the podling releases.
                         url1 = projects[k]['urlKeys']
                         url1 = "/".join(url1.split("/")[:-1])+"/"
                         url2 = projects[k]['urlDist']
@@ -1151,7 +1161,7 @@ for k in sorted(projectNames, key=str.lo
                             rr = "".join(r.split("/")[-1:])
                             rMeta = releasesListing[k+"/"+r]
                             release = {
-                                'download': "{0}{1}".format(url2,r),
+                                'download': "{0}{1}{2}".format(url2,r,"&action=download"),
                                 'signature': "{0}{1}".format(url1,l),
                                 'hash': "{0}{1}".format(url1,kk),
                                 'user': rMeta['user'],
@@ -1170,8 +1180,9 @@ for k in sorted(projectNames, key=str.lo
                 projects[k]['fixMeList'].append(errorMsg)
                 try:
                     if len(distributions[nameDistArea]) > 0 or len(distribHash[nameDistArea])
> 0:
-                        errorMsg = "INFO: {0}: Apache Releases cannot be validated without
a KEYS file. Add required KEYS!".format(k)
-                        print(errorMsg)
+                        errorMsg = "{0}: Apache Releases cannot be validated without a KEYS
file. Add required KEYS!".format(k)
+                        print("SEVERE: ",errorMsg)
+                        otherIssues.append(errorMsg)
                         errorMsg = ["46","Apache Releases cannot be validated without a KEYS
file. Add required KEYS!"]
                         projects[k]['fixMeList'].append(errorMsg)
                 except:
@@ -1299,8 +1310,14 @@ if len(otherIssues):
     otherXml = """<li>other issues <a href="#other">listed</a> below for:
"""
     otherIssuesRE = re.compile("^([^:]+):.*$")
     otherIssues.sort()
+    deduplicateOthers = {}
     for issue in otherIssues:
         matchOtherIssues = re.search(otherIssuesRE, issue)
+        try:
+            if deduplicateOthers[matchOtherIssues.group(1)]:
+                continue
+        except:
+            deduplicateOthers[matchOtherIssues.group(1)] = True
         otherXml += '\n <span class="care">{0}</span> '.format(
             matchOtherIssues.group(1))
     otherXml += "\n</li>\n"
@@ -1431,7 +1448,7 @@ for k in sorted(projectNames, key=str.lo
         '          <td>{0}</td>\n'.format(projects[k]['statusUpdateCounts']))
 
     if projects[k]['numberCommitters'] > 0:
-        if projects[k]['numberCommitters'] > 5:
+        if projects[k]['numberCommitters'] > 2:
             fileXml.write('          <td class="cool1 number"><a href="https://people.apache.org/phonebook.html?podling={0}">{1}</a></td>\n'.format(
                 projects[k]['resource'], projects[k]['numberCommitters']))
         else:
@@ -1441,17 +1458,19 @@ for k in sorted(projectNames, key=str.lo
         fileXml.write('          <td class="care">-</td>\n')
     persist[k]['numberCommitters'] = projects[k]['numberCommitters']
 
-    if projects[k]['numberPMCMembers'] > 0:
-        if projects[k]['numberPMCMembers'] > 5:
-            fileXml.write('          <td class="cool1 number"><a href="https://people.apache.org/phonebook.html?podling={0}">{1}</a></td>\n'.format(
-                projects[k]['resource'], projects[k]['numberPMCMembers']))
+    if projects[k]['numberCommittersNew'] > 0:
+        if projects[k]['numberCommittersNew'] > 1:
+            fileXml.write(
+                '          <td class="cool1 number">{0}</td>\n'.format(projects[k]['numberCommittersNew']))
         else:
-            fileXml.write('          <td class="care number"><a href="https://people.apache.org/phonebook.html?podling={0}">{1}</a></td>\n'.format(
-                projects[k]['resource'], projects[k]['numberPMCMembers']))
+            fileXml.write(
+                '          <td class="cool2 number">{0}</td>\n'.format(projects[k]['numberCommittersNew']))
     else:
-        fileXml.write('          <td class="care">-</td>\n')
-    persist[k]['numberPMCMembers'] = projects[k]['numberPMCMembers']
+        fileXml.write('          <td class="care number">0</td>\n')
+    persist[k]['numberCommittersNew'] = projects[k]['numberCommittersNew']
 
+    # individual podling analysis pages will use these as opposed to old style clutch page
using announced new committers (flawed...)
+    persist[k]['numberPMCMembers'] = projects[k]['numberPMCMembers']
     persist[k]['numberPMCEquals'] = projects[k]['numberPMCEquals']
 
     if projects[k]['urlSvn']:

Modified: incubator/public/trunk/clutch2status.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch2status.py?rev=1855561&r1=1855560&r2=1855561&view=diff
==============================================================================
--- incubator/public/trunk/clutch2status.py (original)
+++ incubator/public/trunk/clutch2status.py Thu Mar 14 23:34:36 2019
@@ -23,6 +23,7 @@ messages = {
     '17':('/helper/resources','coderepository','No source code repository',False),
     '10':('/helper/resources','tracker','Project is missing its link to an Issue Tracker',False),
     '18':('/helper/resources','wiki','Project is missing its link to a Wiki',False),
+    '09':('/helper/resources','website','Apache Website is missing',False),
     '11':('/helper/resources','website','Website is missing',False),
     '12':('/helper/release','dist',	'Release distribution area is not setup',False),
     '13':('/helper/release','keys',	'Release signing PGP KEYS file is missing',False),



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message