[Libreoffice-commits] dev-tools.git: 3 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py qa/createBlogReport.py
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Sep 19 15:43:37 UTC 2018
esc-reporting/esc-analyze.py | 25 ++++++++++++++++++-------
esc-reporting/esc-report.py | 24 ++++++++++--------------
qa/createBlogReport.py | 2 +-
3 files changed, 29 insertions(+), 22 deletions(-)
New commits:
commit 7e7532f2058b980d012b7034f20905c4a393bca6
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Sep 19 17:42:45 2018 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Sep 19 17:42:45 2018 +0200
QA: improve help description
diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index 085048b..aaf74d6 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -334,7 +334,7 @@ def mkdate(datestr):
if __name__ == '__main__':
parser=argparse.ArgumentParser()
parser.add_argument('Date',type=mkdate, nargs=2, help="Introduce the starting date as first" + \
- " argument and the ending date as second argument")
+ " argument and the ending date as second argument. FORMAT: YYYY-MM-DD")
args=parser.parse_args()
if args.Date[0] >= args.Date[1]:
commit 1060701dae6cfee99d4409cc100dbea619ce76b9
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Sep 19 17:37:29 2018 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Sep 19 17:37:29 2018 +0200
ESC: try harder to match committer's name if email changes
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index a39ada6..ecfca0f 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -205,7 +205,8 @@ def util_create_statList():
'3month': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0},
'1month': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0},
'1week': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0},
- 'total': 0}},
+ 'total': 0},
+ 'committersNames': []},
'trend' : {'committer': {'owner': {'1year': {}, '3month': {}, '1month': {}, '1week': {}},
'reviewMerged': {'1year': {}, '3month': {}, '1month': {}, '1week': {}}},
'contributor': {'owner': {'1year': {}, '3month': {}, '1month': {}, '1week': {}},
@@ -303,6 +304,9 @@ def analyze_mentoring():
statList['people'][mail]['gerrit']['reviewName'] = '{} <{}>'.format(row['name'],row['email'])
statList['people'][mail]['isCommitter'] = True
statList['people'][mail]['isContributor'] = True
+ # Sometimes, committers change their email
+ # Add the committers names to a list to compare later
+ statList['data']['gerrit']['committersNames'].append(row['name'].lower())
statNewDate = cfg['1yearDate']
statOldDate = cfg['nowDate']
for key, row in gerritData['patch'].items():
@@ -778,12 +782,19 @@ def analyze_reports():
tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['commits']['1month']['owner']),reverse=True)
for i in tmpClist:
if not statList['people'][i]['isCommitter']:
- x = {'mail': i, 'name': statList['people'][i]['name'],
- 'month': statList['people'][i]['commits']['1month']['owner'],
- 'year': statList['people'][i]['commits']['1year']['owner']}
- statList['reportList']['top10commit'].append(x)
- if len(statList['reportList']['top10commit']) >= 10:
- break
+ #Sometimes name has the format: <surname, name>
+ auxName = statList['people'][i]['name'].lower()
+ if ',' in auxName:
+ splitName = auxName.split(',')
+ auxName = splitName[1].strip() + ' ' + splitName[0].strip()
+
+ if auxName not in statList['data']['gerrit']['committersNames']:
+ x = {'mail': i, 'name': statList['people'][i]['name'],
+ 'month': statList['people'][i]['commits']['1month']['owner'],
+ 'year': statList['people'][i]['commits']['1year']['owner']}
+ statList['reportList']['top10commit'].append(x)
+ if len(statList['reportList']['top10commit']) >= 10:
+ break
tmpRlist = sorted(statList['people'], key=lambda k: (statList['people'][k]['gerrit']['1month']['reviewer']),reverse=True)
for i in tmpRlist:
if i != 'ci at libreoffice.org' and i != 'fake-email at fake-email-script-esc.com' and i != '*dummy*':
commit 3cb4b5d7ae588509fb8bbba366bf437b5fb19650
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Sep 19 13:56:51 2018 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Sep 19 13:56:51 2018 +0200
ESC: Show top 10 reviewers and contributors
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index 33f548a..3805566 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -186,23 +186,19 @@ def report_mentoring():
print(i1 + ' ' + util_build_escNumber('easyhacks', i1) + ' ', end="", file=fp)
if i1 == 'cleanup_comments':
print('\n ', end='', file=fp)
- print("\n + top 5 contributors:", file=fp)
+ print("\n + top 10 contributors:", file=fp)
print(statList['reportList']['top10commit'])
- for i in range(0, len(statList['reportList']['top10commit'])):
- if i == 5:
- break
+ for contributor in statList['reportList']['top10commit']:
print(' {} made {} patches in 1 month, and {} patches in 1 year'.format(
- statList['reportList']['top10commit'][i]['name'],
- statList['reportList']['top10commit'][i]['month'],
- statList['reportList']['top10commit'][i]['year']), file=fp)
- print(" + top 5 reviewers:", file=fp)
- for i in range(0, len(statList['reportList']['top10review'])):
- if i == 5:
- break
+ contributor['name'],
+ contributor['month'],
+ contributor['year']), file=fp)
+ print(" + top 10 reviewers:", file=fp)
+ for reviewer in statList['reportList']['top10review']:
print(' {} made {} review comments in 1 month, and {} in 1 year'.format(
- statList['reportList']['top10review'][i]['name'],
- statList['reportList']['top10review'][i]['month'],
- statList['reportList']['top10review'][i]['year']), file=fp)
+ reviewer['name'],
+ reviewer['month'],
+ reviewer['year']), file=fp)
print(" + big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp)
for row in statList['reportList']['award_1st_email']:
More information about the Libreoffice-commits
mailing list