incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1349178 - in /incubator/public/trunk: clutch.py content/guides/graduation.xml content/guides/mentor.xml content/guides/ppmc.xml content/guides/retirement.xml
Date Tue, 12 Jun 2012 08:09:22 GMT
Author: sebb
Date: Tue Jun 12 08:09:22 2012
New Revision: 1349178

URL: http://svn.apache.org/viewvc?rev=1349178&view=rev
Log:
Drop ReportingSchedule; derive reporting data from podlings.xml

Modified:
    incubator/public/trunk/clutch.py
    incubator/public/trunk/content/guides/graduation.xml
    incubator/public/trunk/content/guides/mentor.xml
    incubator/public/trunk/content/guides/ppmc.xml
    incubator/public/trunk/content/guides/retirement.xml

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1349178&r1=1349177&r2=1349178&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Tue Jun 12 08:09:22 2012
@@ -18,9 +18,9 @@
 '''
 Purpose: Clutch gathers details about projects currently in incubation.
 
-The core resource is the ReportingSchedule wiki page. As soon as a project is
-accepted into incubation, please add its entry. This script reads that page,
-and the SITE_CONTENT/podlings.xml table, and each podling status page, and
+The core resource is the SITE_CONTENT/podlings.xml file. As soon as a project is
+accepted into incubation, please add its entry. 
+This script reads the SITE_CONTENT/podlings.xml table, and each podling status page, and
 other resources. The assembled metadata is stored in various data files.
 
 See further explanation at http://incubator.apache.org/clutch.html
@@ -36,7 +36,6 @@ External input data files used:
 - SITE_CONTENT/podlings.xml
 
 URLs
-http://wiki.apache.org/incubator/ReportingSchedule?action=raw
 http://people.apache.org/~crossley/incubator-keys.txt
 http://people.apache.org/~crossley/incubator-releases.txt
 http://people.apache.org/~crossley/incubator-releases-bad-filename.txt
@@ -108,7 +107,6 @@ import argparse
 
 # constants for external data ---
 
-REPORTING_SCHEDULE = 'http://wiki.apache.org/incubator/ReportingSchedule?action=raw'
 COMMITTERS_BY_PROJECT = "http://people.apache.org/committers-by-project.html"
 MAIL_LIST_URL = "http://incubator.apache.org/mail/"
 INCUBATOR_KEYS = 'http://people.apache.org/~crossley/incubator-keys.txt'
@@ -171,7 +169,7 @@ def normaliseSVNurl(url):
     return rc
 
 
-projects = {} # internal data, derived from ReportingSchedule
+projects = {} # internal data, derived from podlings.xml
 otherIssues = []
 persist = {} # persistent data to be utilised by other tools
 mentorsProjects = {} # internal data
@@ -201,7 +199,6 @@ releasesRE = re.compile("dist/incubator/
 distMirrorRE = re.compile("cgi/incubator/([-a-z0-9]+)/")
 releasesBadNameRE = re.compile("^([-a-z0-9]+)/")
 
-linkReportingSchedule = '<a href="http://wiki.apache.org/incubator/ReportingSchedule">ReportingSchedule</a>'
 linkIncubationTable = '<a href="projects/">IncubationTable</a>'
 
 # Import the persistent data ---
@@ -210,99 +207,6 @@ inputFile = open('clutch.pkl', 'rb')
 state = pickle.load(inputFile)
 inputFile.close()
 
-# Gather data from the ReportingSchedule ---
-
-print("Gather data from the ReportingSchedule ...") 
-# Parse the wiki ReportingSchedule to gather project details
-text = getUrl(REPORTING_SCHEDULE).read().decode('utf-8')
-tokens = re.findall('\*.+', text)
-for token in tokens:
-  token = token.strip() # strip whitespace
-  token = token.replace('* ', '') # strip bullet symbol
-  token = token.replace('!', '') # strip wiki markup
-  if re.match('Monthly', token):
-    group = 'month'
-    continue
-  if re.match('January, ', token):
-    group = 'group-1'
-    continue
-  if re.match('February, ', token):
-    group = 'group-2'
-    continue
-  if re.match('March, ', token):
-    group = 'group-3'
-    continue
-
-#  print "{0}: {1}".format(group, token)
-
-  match = re.search(commentsRE, token)
-  reportingCommments = ""
-  if match:
-    name = match.group(1).strip()
-    reportingComments = match.group(2).strip()
-  else:
-    name = token
-
-  id = name.lower()
-  id = id.replace(' ', '') # strip spaces from project ID
-
-  if not id in projects:
-    projects[id] = {}
-    projects[id]['name'] = name
-    # Set some defaults
-    projects[id]['reportingMonthly'] = False
-    projects[id]['reportingComments'] = ""
-    projects[id]['hasReportingGroup'] = True
-    projects[id]['hasStatusEntry'] = True
-    projects[id]['statusFileName'] = id
-    projects[id]['statusLastUpdated'] = ""
-    projects[id]['statusAge'] = 0
-    projects[id]['statusUpdateCounts'] = ""
-    projects[id]['urlSvn'] = ""
-    projects[id]['urlTracker'] = ""
-    projects[id]['urlWww'] = ""
-    projects[id]['urlDist'] = ""
-    projects[id]['urlKeys'] = ""
-    projects[id]['hasEntryIssues'] = False
-    projects[id]['description'] = ""
-    projects[id]['sponsor'] = "? not known"
-    projects[id]['mentors'] = []
-    projects[id]['resourceNames'] = [id]
-    projects[id]['startDate'] = ""
-    projects[id]['entryDate'] = None
-    projects[id]['committersSvn'] = None
-    projects[id]['hintMailListDev'] = ""
-    projects[id]['hasMailListDev'] = ""
-    projects[id]['hintMailListCommits'] = ""
-    projects[id]['hasMailListCommits'] = ""
-    projects[id]['numberCommitters'] = 0
-    projects[id]['numberCommittersNew'] = 0
-    # Is it reporting monthly?
-    if (group == 'month'):
-      projects[id]['reportingMonthly'] = True
-      projects[id]['reportingComments'] = reportingComments
-      projects[id]['hasEntryIssues'] = True
-    # See if we can use some persistent data, i.e. not new during this run.
-    projects[id]['hasClutchState'] = id in state
-
-  # Add their group.
-  # If this still equals "month" at end, then there is a schedule error.
-  projects[id]['reportingGroup'] = group
-
-# End of processing the ReportingSchedule wiki page
-
-# Process the reporting schedule data, detect some potential issues.
-projectNames = list(projects.keys())
-for k in sorted(projectNames, key=str.lower):
-  #print("Name: " + k)
-  if projects[k]['reportingGroup'] == 'month':
-    print("ERROR: {0}: missing group".format(k))
-    projects[k]['hasReportingGroup'] = False
-
-# Parse the projects table, ensure each is present, grab more details
-
-projectsTable = {} # internal data from podlings.xml
-
 # Parse the podlings data file ---
 dom = xml.dom.minidom.parse(SITE_CONTENT_DIR + "podlings.xml")
 
@@ -316,41 +220,90 @@ for row in dom.getElementsByTagName("pod
   id = name.lower()
   id = id.replace(' ', '') # strip spaces from project ID
   startDate = row.getAttribute("startdate")
+
   if row.getAttribute("status") == 'graduated':
     resource = row.getAttribute("resource")
     graduatedProjects[resource.lower()] = True
+
   if row.getAttribute("status") == 'current':
     #print("Name: " + name)
-    # Some projects use an alternate short resource name
-    # rather than their project name
-    for alias in row.getAttribute("resourceAliases").split(','):
-      if alias != '':
-        projects[id]['resourceNames'].append(alias)
-    fileBaseName = row.getAttribute("resource")
-    sponsor = row.getAttribute("sponsor")
-    if row.getElementsByTagName("graduating").length > 0:
-      graduates.append(id)
-    description = getText(row.getElementsByTagName("description"))
-    mentors = [mentor.firstChild.data.strip() for mentor in row.getElementsByTagName("mentor")]
 
-    if id in projectsTable:
+    if id in projects:
       print("ERROR: {0}: row exists".format(id))
     else:
-      projectsTable[id] = {}
-      projectsTable[id]['name'] = name
-      projectsTable[id]['description'] = description
-      projectsTable[id]['sponsor'] = sponsor
-      projectsTable[id]['startDate'] = startDate
-      projectsTable[id]['statusFileName'] = fileBaseName
-      projectsTable[id]['mentors'] = mentors
+      projects[id] = {}
+       # strip spaces from project name (as per original ReportingSchedule)
+       # TODO is this still needed? Or should the @name attribute not contain spaces?
+      projects[id]['name'] = name.replace(' ', '')
+      # Set some defaults
+      projects[id]['reportingMonthly'] = False
+      projects[id]['reportingComments'] = ""
+      projects[id]['hasReportingGroup'] = True
+      projects[id]['reportingGroup'] = 'month' # currently needed for reporting phase
+      projects[id]['hasStatusEntry'] = True
+      projects[id]['statusFileName'] = id
+      projects[id]['statusLastUpdated'] = ""
+      projects[id]['statusAge'] = 0
+      projects[id]['statusUpdateCounts'] = ""
+      projects[id]['urlSvn'] = ""
+      projects[id]['urlTracker'] = ""
+      projects[id]['urlWww'] = ""
+      projects[id]['urlDist'] = ""
+      projects[id]['urlKeys'] = ""
+      projects[id]['hasEntryIssues'] = False
+      projects[id]['resourceNames'] = [id]
+      # Some projects use an alternate short resource name
+      # rather than their project name
+      for alias in row.getAttribute("resourceAliases").split(','):
+        if alias != '':
+          projects[id]['resourceNames'].append(alias)
+      projects[id]['entryDate'] = None
+      projects[id]['committersSvn'] = None
+      projects[id]['hintMailListDev'] = ""
+      projects[id]['hasMailListDev'] = ""
+      projects[id]['hintMailListCommits'] = ""
+      projects[id]['hasMailListCommits'] = ""
+      projects[id]['numberCommitters'] = 0
+      projects[id]['numberCommittersNew'] = 0
+
+      projects[id]['hasClutchState'] = id in state
+      projects[id]['description'] = getText(row.getElementsByTagName("description"))
+      projects[id]['sponsor'] = row.getAttribute("sponsor")
+      projects[id]['startDate'] = startDate
+      projects[id]['statusFileName'] = row.getAttribute("resource")
+      mentors = [mentor.firstChild.data.strip() for mentor in row.getElementsByTagName("mentor")]
+      projects[id]['mentors'] = mentors
 
       # determine projects for each mentor
-      for mentor in projectsTable[id]['mentors']:
+      for mentor in mentors:
         try:
           mentorsProjects[mentor]
         except KeyError:
           mentorsProjects[mentor] = []
-        mentorsProjects[mentor].append(projectsTable[id]['name'])
+        mentorsProjects[mentor].append(name)
+
+      isGraduating = row.getElementsByTagName("graduating").length > 0
+      if isGraduating:
+        graduates.append(id)
+  
+      # Is it reporting monthly?
+      reporting = row.getElementsByTagName("reporting")
+      if reporting.length != 1:
+        projects[id]['hasReportingGroup'] = False
+        if not isGraduating:
+          print("ERROR: {0}: expecting a single reportgroup".format(name))
+      else:
+        if reporting[0].getAttribute("monthly") == 'true':
+          projects[id]['reportingMonthly'] = True
+          projects[id]['reportingComments'] = getText(reporting)
+          projects[id]['hasEntryIssues'] = True
+        group = reporting[0].getAttribute("group")
+        if group == None:
+          print("ERROR: {0}: missing group attribute".format(name))
+          projects[id]['hasReportingGroup'] = False
+        else:
+          projects[id]['reportingGroup'] = 'group-'+group
+
   history[id] = {}
   history[id]['name'] = name
   match = re.search(startDateRE, startDate)
@@ -375,28 +328,20 @@ dom.unlink()
 # Process the incubation table data, detect some potential issues. ---
 
 print("Gather details from project status files ...")
-projectNames = list(projectsTable.keys())
+projectNames = list(projects.keys())
 for k in sorted(projectNames, key=str.lower):
-  #print("Name: " + k)
-  if not k in projects:
-    print("ERROR: {0}: Missing from reporting schedule".format(k))
-    errorMsg = "{0}: Not listed in {1}, yet listed in {2}".format(k, linkReportingSchedule,
linkIncubationTable)
-    errorMsg += ". See <a href=\"#h-Graduate\">help</a>."
-    otherIssues.append(errorMsg)
-    continue
-
-  # compare names, ignoring whitespace
-  if ''.join(projects[k]['name'].split()).lower() != ''.join(projectsTable[k]['name'].split()).lower():
-    print("WARN: Name '{0}' differs from reporting schedule name '{1}'".format(projectsTable[k]['name'],
projects[k]['name']))
+  if optionVerbose:
+    print("DEBUG: Processing status file for {0}".format(k));
 
   # Append more potential alternate names for a project
-  if projectsTable[k]['statusFileName'] not in projects[k]['resourceNames']:
-    projects[k]['resourceNames'].append(projectsTable[k]['statusFileName'])
+  # Append more potential alternate names for a project
+  if projects[k]['statusFileName'] not in projects[k]['resourceNames']:
+    projects[k]['resourceNames'].append(projects[k]['statusFileName'])
   if optionVerbose and len(projects[k]['resourceNames']) > 1:
     print("DEBUG: Will try alternate names: {0}".format(projects[k]['resourceNames']))
 
   # parse their project status file to extract specific information
-  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projectsTable[k]['statusFileName'])
+  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projects[k]['statusFileName'])
   if os.path.exists(statusFile):
     dom = xml.dom.minidom.parse(statusFile)
     # get the project info hints
@@ -575,7 +520,7 @@ for listName in mailLists.names:
       projectMailLists[listName]
     except KeyError:
       projectMailLists[listName] = {}
-    projectMailLists[listName]["dev"] = listName
+    projectMailLists[listName]['dev'] = listName
     print("WARN: {0}: unusual mail list name '{1}', assuming it is their dev list".format(listName,
projectMailLists[listName]['dev']))
 if optionVerbose:
   print("DEBUG: projectMailLists")
@@ -644,17 +589,8 @@ print("Processing ...")
 projectNames = list(projects.keys())
 for k in sorted(projectNames, key=str.lower):
   print(k)
-  if not k in projectsTable:
-    print("ERROR: {0}: Missing from incubation table".format(k))
-    projects[k]['hasStatusEntry'] = False
-    continue
 
-  projects[k]['description'] = projectsTable[k]['description']
-  projects[k]['sponsor'] = projectsTable[k]['sponsor']
-  projects[k]['mentors'] = projectsTable[k]['mentors']
-  projects[k]['startDate'] = projectsTable[k]['startDate']
-
-  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projectsTable[k]['statusFileName'])
+  statusFile = SITE_CONTENT_DIR + "projects/{0}.xml".format(projects[k]['statusFileName'])
   if not os.path.exists(statusFile):
     errorMsg = "{0}: Missing status file".format(k)
     print('ERROR:', errorMsg)
@@ -663,8 +599,6 @@ for k in sorted(projectNames, key=str.lo
     projects[k]['hasStatusEntry'] = False
     continue
 
-  projects[k]['statusFileName'] = projectsTable[k]['statusFileName']
-
   startDate = projects[k]['startDate']
   match = re.search(startDateRE, startDate)
   if match:

Modified: incubator/public/trunk/content/guides/graduation.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/content/guides/graduation.xml?rev=1349178&r1=1349177&r2=1349178&view=diff
==============================================================================
--- incubator/public/trunk/content/guides/graduation.xml [utf-8] (original)
+++ incubator/public/trunk/content/guides/graduation.xml [utf-8] Tue Jun 12 08:09:22 2012
@@ -1241,10 +1241,6 @@ Resolution draft:
                 file to show the project's status.
               </li>
               <li>
-                Remove the project from the reporting calendar
-                <a href="http://wiki.apache.org/incubator/ReportingSchedule">w.a.o/incubator/ReportingSchedule</a>
-              </li>
-              <li>
                 Change the podling status to "graduated" in the podling summary file,
                 i.e update the
                 <code>incubator/trunk/content/podlings.xml</code> svn file.

Modified: incubator/public/trunk/content/guides/mentor.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/content/guides/mentor.xml?rev=1349178&r1=1349177&r2=1349178&view=diff
==============================================================================
--- incubator/public/trunk/content/guides/mentor.xml [utf-8] (original)
+++ incubator/public/trunk/content/guides/mentor.xml [utf-8] Tue Jun 12 08:09:22 2012
@@ -52,9 +52,17 @@ It is informational not normative. Polic
         </p>
       </section>
       <section id="Sending+in+an+Incubation+Report">
-        <title>Add to Incubation Reporting Schedule</title>
-        <p>Add the podling to the <a href="http://wiki.apache.org/incubator/ReportingSchedule">Reporting
Schedule</a>
-          in the "Monthly" section. Choose a reporting group.
+        <title>Add to Incubation Summary file</title>
+        <p>
+          Add the podling to the podling summary file in
+          the "incubator" SVN at <code>content/podlings.xml</code>
+          and see <a href="website.html">instructions</a>.
+        </p>
+        <p>
+          Add a 'reporting' tag (after 'description') with the attribute 'monthly="true"'

+          and the appropriate "group" attribute (1, 2 or 3). The text content of the 'reporting'
tag
+          must contain the initial list of reporting months. For example:
+          <code>&lt;reporting group="2" monthly="true"&gt;June, July, August&lt;/reporting&gt;</code>

         </p>
         <p>
           Please do this step ASAP after Acceptance. The first report might be
@@ -66,14 +74,6 @@ It is informational not normative. Polic
         Guide</a>.
         </p>
       </section>
-      <section id="add-incubation">
-        <title>Add to table: Currently in incubation</title>
-        <p>
-          Add the podling to the podling summary file in
-          the "incubator" SVN at <code>content/podlings.xml</code>
-          and see <a href="website.html">instructions</a>.
-        </p>
-      </section>
       <section id="Initialize+Podling+Status+Page">
         <title>Initialize Podling Status Page</title>
       <p>

Modified: incubator/public/trunk/content/guides/ppmc.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/content/guides/ppmc.xml?rev=1349178&r1=1349177&r2=1349178&view=diff
==============================================================================
--- incubator/public/trunk/content/guides/ppmc.xml [utf-8] (original)
+++ incubator/public/trunk/content/guides/ppmc.xml [utf-8] Tue Jun 12 08:09:22 2012
@@ -90,10 +90,8 @@ limitations under the License.
       status for a subset of the incubating projects. Currently new
       Podlings report to the Incubator monthly for the first three
       months, then quarterly thereafter. The <a
-      href="http://wiki.apache.org/incubator/ReportingSchedule">
-      reporting schedule</a> is on the <a
-      href="http://wiki.apache.org/incubator">Incubator Wiki</a>, which
-      is also used for Podlings to provide status.</p>
+      href="http://incubator.apache.org/report-groups.txt">
+      reporting schedule</a> is generated from podlings.xml.</p>
 
       <p>The PPMC does not have to fill out the report itself; the PPMC
       is just responsible for making sure that it gets filled out. In

Modified: incubator/public/trunk/content/guides/retirement.xml
URL: http://svn.apache.org/viewvc/incubator/public/trunk/content/guides/retirement.xml?rev=1349178&r1=1349177&r2=1349178&view=diff
==============================================================================
--- incubator/public/trunk/content/guides/retirement.xml [utf-8] (original)
+++ incubator/public/trunk/content/guides/retirement.xml [utf-8] Tue Jun 12 08:09:22 2012
@@ -68,7 +68,6 @@
 					<li>Make wiki readonly (ASFInfra JIRA)</li>
 					<li>Turn off automatic builds (ASFInfra JIRA)</li>
 					<li>Close the mailinglist (and remove them from the incubator status page)</li>
-					<li>Remove from <a href="http://wiki.apache.org/incubator/ReportingSchedule">reporting
schedule</a></li>
 					<li>Indicate the podling is closed down in the next board report</li>
 					<li>Announce completeness on general@incubator.apache.org</li>
 				</ul>



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


Mime
View raw message