Commit 5790cfca authored by Aaron Wells's avatar Aaron Wells

Customizing the report output to match the format we need

Removing sections no longer germaine to Mahara (like sign-offs)
Changing "employers" to "organisations" because it includes
Catalyst Academy, and potentially others who aren't strictly
"employed" by the folks they're coding for.
parent de5d5505
......@@ -256,7 +256,7 @@ def MapToEmployer (email, unknown = 0):
except KeyError:
pass
if unknown:
return [(nextyear, GetEmployer ('(Unknown)'))]
return [(nextyear, GetEmployer ('Other'))]
return [(nextyear, GetEmployer (email))]
......
......@@ -395,7 +395,8 @@ for e in elist:
nempl += 1
reports.Write ('Processed %d csets from %d developers\n' % (CSCount,
ndev))
reports.Write ('%d employers found\n' % (nempl))
#reports.Write ('%d employers found\n' % (nempl))
reports.Write ('%d organisations found\n' % (nempl))
reports.Write ('A total of %d lines added, %d removed (delta %d)\n' %
(TotalAdded, TotalRemoved, TotalAdded - TotalRemoved))
if TotalChanged == 0:
......
......@@ -134,7 +134,8 @@ def CompareEPCount (e1, e2):
def ReportByPCEmpl (elist, cscount):
elist.sort (CompareEPCount)
count = 0
BeginReport ('Top changeset contributors by employer')
# BeginReport ('Top changeset contributors by employer')
BeginReport ('Top changeset contributors by organisation')
for e in elist:
if e.count != 0:
ReportLine (e.name, e.count, (e.count*100.0)/cscount)
......@@ -150,7 +151,8 @@ def CompareELChanged (e1, e2):
def ReportByELChanged (elist, totalchanged):
elist.sort (CompareELChanged)
count = 0
BeginReport ('Top lines changed by employer')
# BeginReport ('Top lines changed by employer')
BeginReport ('Top lines changed by organisation')
for e in elist:
if e.changed != 0:
ReportLine (e.name, e.changed, (e.changed*100.0)/totalchanged)
......@@ -295,7 +297,8 @@ def ReportByESOBs (elist):
for e in elist:
totalsobs += e.sobs
count = 0
BeginReport ('Employers with the most signoffs (total %d)' % totalsobs)
# BeginReport ('Employers with the most signoffs (total %d)' % totalsobs)
BeginReport ('Organisations with the most signoffs (total %d)' % totalsobs)
for e in elist:
if e.sobs > 0:
ReportLine (e.name, e.sobs, (e.sobs*100.0)/totalsobs)
......@@ -313,7 +316,8 @@ def ReportByEHackers (elist):
for e in elist:
totalhackers += len (e.hackers)
count = 0
BeginReport ('Employers with the most hackers (total %d)' % totalhackers)
# BeginReport ('Employers with the most hackers (total %d)' % totalhackers)
BeginReport ('Organisations with the most contributors (total %d)' % totalhackers)
for e in elist:
nhackers = len (e.hackers)
if nhackers > 0:
......@@ -328,16 +332,16 @@ def DevReports (hlist, totalchanged, cscount, totalremoved):
ReportByPCount (hlist, cscount)
ReportByLChanged (hlist, totalchanged)
ReportByLRemoved (hlist, totalremoved)
ReportBySOBs (hlist)
ReportByRevs (hlist)
ReportByTests (hlist)
ReportByTestCreds (hlist)
ReportByReports (hlist)
ReportByRepCreds (hlist)
# ReportBySOBs (hlist)
# ReportByRevs (hlist)
# ReportByTests (hlist)
# ReportByTestCreds (hlist)
# ReportByReports (hlist)
# ReportByRepCreds (hlist)
def EmplReports (elist, totalchanged, cscount):
ReportByPCEmpl (elist, cscount)
ReportByELChanged (elist, totalchanged)
ReportByESOBs (elist)
# ReportByESOBs (elist)
ReportByEHackers (elist)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment