[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
Xisco Fauli
anistenis at gmail.com
Sun Dec 11 20:47:15 UTC 2016
esc-reporting/esc-analyze.py | 25 ++++++++++++++++++++++---
esc-reporting/esc-report.py | 34 ++++++++++++++++++++++++----------
2 files changed, 46 insertions(+), 13 deletions(-)
New commits:
commit 017c974d29b87bdfa18f57aab462f51e754f1351
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Dec 11 21:45:33 2016 +0100
Create top 10 bug reporters
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index e5571ca..e2713ff 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -81,7 +81,7 @@ def util_dump_file(fileName, rawList):
def util_build_period_stat(cfg, statList, xDate, email, status, pstatus, base = 'gerrit'):
for i in '1year', '3month', '1month', '1week':
- if xDate > cfg[i + 'Date']:
+ if xDate >= cfg[i + 'Date']:
if email is not None:
statList['people'][email][base][i][pstatus] += 1
statList['people'][email][base][i]['total'] += 1
@@ -192,8 +192,14 @@ def util_create_statList():
def util_check_mail(name, mail, statList, combineMail):
if mail in combineMail:
mail = combineMail[mail]
+
if not mail in statList['people']:
+ if not name:
+ name = '*UNKNOWN*'
statList['people'][mail] = util_create_person_gerrit(name, mail)
+ elif name and name != '*UNKNOWN*':
+ statList['people'][mail]['name'] = name
+
return mail
@@ -384,7 +390,7 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
print("qa: analyze bugzilla", flush=True)
for key, row in bugzillaData['bugs'].items():
- email = util_check_mail('*UNKNOWN*', row['creator'], statList, cfg['contributor']['combine-email'])
+ email = util_check_mail(row['creator_detail']['real_name'], row['creator'], statList, cfg['contributor']['combine-email'])
xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ")
creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ")
if xDate > cfg['cutDate']:
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index 8865f6c..a2c7a7b 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -389,13 +389,15 @@ def report_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
- tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1month']['total']), reverse=True)
+ tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['owner']), reverse=True)
top10list = []
for i in tmpClist:
if i != 'qa-admin at libreoffice.org' and i != 'libreoffice-commits at lists.freedesktop.org':
- x = {'mail': i, 'name': statList['people'][i]['name'],
- 'month' :statList['people'][i]['qa']['1month']['total'],
- 'year':statList['people'][i]['qa']['1year']['total']}
+ x = {'mail': i,
+ 'name': statList['people'][i]['name'],
+ 'week' :statList['people'][i]['qa']['1week']['owner'],
+ 'month' :statList['people'][i]['qa']['1month']['owner'],
+ '3month':statList['people'][i]['qa']['1month']['owner']}
top10list.append(x)
if len(top10list) >= 10:
break
@@ -439,10 +441,11 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
{'db': 'trendQA', 'tag': '100+', 'text': '100+'}]
print(util_build_matrix('distribution', xRow, None, statList), end='', file=fp)
- print("\n + top 10 contributors:", file=fp)
+ print("\n + top 10 bugs reporters:", file=fp)
+ xRow = []
for i in range(0, 10):
- print(' {} made {} changes in 1 month, and {} changes in 1 year'.format(
- top10list[i]['mail'], top10list[i]['month'], top10list[i]['year']), file=fp)
+ print(' {} reported {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format(
+ top10list[i]['name'], top10list[i]['week'], top10list[i]['month'], top10list[i]['3month']), file=fp)
fp.close()
return None
commit 6b94466cb722c21b56c589434ec00a75055a2c33
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Dec 11 20:38:51 2016 +0100
Add unconfirmed bugs to the report
diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 7e68938..e5571ca 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -178,7 +178,9 @@ def util_create_statList():
'1month': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0,
'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0},
'1week': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0,
- 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0}},
+ 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0},
+ 'unconfirmed': {'count': 0, 'enhancement' : 0, 'needsUXEval' : 0,
+ 'haveBacktrace' : 0, 'needsDevAdvice' : 0}},
'easyhacks' : {'needsDevEval': 0, 'needsUXEval': 0, 'cleanup_comments': 0,
'total': 0, 'assigned': 0, 'open': 0}},
'stat': {'openhub_last_analyse': "2001-01-01"},
@@ -388,6 +390,17 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
if xDate > cfg['cutDate']:
continue
+ if row['status'] == 'UNCONFIRMED':
+ statList['data']['qa']['unconfirmed']['count'] += 1
+ if 'needsUXEval' in row['keywords']:
+ statList['data']['qa']['unconfirmed']['needsUXEval'] += 1
+ if 'needsDevAdvice' in row['keywords']:
+ statList['data']['qa']['unconfirmed']['needsDevAdvice'] += 1
+ if 'haveBacktrace' in row['keywords']:
+ statList['data']['qa']['unconfirmed']['haveBacktrace'] += 1
+ if row['severity'] == 'enhancement':
+ statList['data']['qa']['unconfirmed']['enhancement'] += 1
+
util_build_period_stat(cfg, statList, creationDate, email, row['status'], 'owner', base='qa')
for change in row['comments']:
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index 20540ed..8865f6c 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -405,9 +405,20 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg):
datetime.datetime.now().strftime("%Y-%m-%d"), statList['addDate']), file=fp)
print("copy/paste to esc pad:\n"
- "* qa update (xisco)\n"
- " + Bugzilla statistics", file=fp)
-
+ "* qa update (xisco)\n", file=fp)
+
+ print(" + UNCONFIRMED: {} ( )\n"
+ " + enhancements: {} ( )\n"
+ " + needsUXEval: {} ( )\n"
+ " + haveBackTrace: {} ( )\n"
+ " + needsDevAdvice: {} ( )\n".format(
+ statList['data']['qa']['unconfirmed']['count'],
+ statList['data']['qa']['unconfirmed']['enhancement'],
+ statList['data']['qa']['unconfirmed']['needsUXEval'],
+ statList['data']['qa']['unconfirmed']['haveBacktrace'],
+ statList['data']['qa']['unconfirmed']['needsDevAdvice'],), file=fp)
+
+ print("\n + Bugzilla statistics:", file=fp)
xRow = [{'db': 'qa', 'tag': 'ASSIGNED', 'text': 'ASSIGNED'},
{'db': 'qa', 'tag': 'CLOSED', 'text': 'CLOSED'},
{'db': 'qa', 'tag': 'NEEDINFO', 'text': 'NEEDINFO'},
More information about the Libreoffice-commits
mailing list