[Libreoffice-commits] dev-tools.git: 3 commits - qa/bugzillaChecker.py qa/createBlogReport.py
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 7 11:11:40 UTC 2019
qa/bugzillaChecker.py | 77 +++++++++++++++++++++----------------------------
qa/createBlogReport.py | 8 +++--
2 files changed, 39 insertions(+), 46 deletions(-)
New commits:
commit 14d40ce5cc6cff6579d3ffe3c595e3503a2d27c6
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Aug 7 12:42:48 2019 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 7 13:04:20 2019 +0200
QA: Print results to file
diff --git a/qa/bugzillaChecker.py b/qa/bugzillaChecker.py
index b96837c..df9e5a0 100755
--- a/qa/bugzillaChecker.py
+++ b/qa/bugzillaChecker.py
@@ -13,6 +13,8 @@ import datetime
import re
import ast
+bugzillaReportPath = '/tmp/bugzilla_report.txt'
+bugzillaUserReportPath = '/tmp/bugzilla_users_report.txt'
if datetime.date.today().weekday() == 0:
# Weekends
reportPeriodDays = 3
@@ -384,9 +386,12 @@ def analyze_bugzilla_checkers(statList, bugzillaData, cfg):
value = [rowId, '', '']
util_add_to_result(lResults, 'empty_alias', value)
+ fp = open(bugzillaReportPath, 'w', encoding='utf-8')
+ print("Creating file " + bugzillaReportPath)
+
for dKey, dValue in sorted(lResults.items()):
if dValue:
- print('\n=== ' + dKey.replace('_', ' ').upper() + ' ===')
+ print('\n=== ' + dKey.replace('_', ' ').upper() + ' ===', file=fp)
dValue = sorted(dValue, key=lambda x: x[1])
for idx in range(len(dValue)):
@@ -396,43 +401,51 @@ def analyze_bugzilla_checkers(statList, bugzillaData, cfg):
count = idx + 1
print("{:<3} | {:<58} | {} | {}".format(
- str(count), common.urlShowBug + str(dValue[idx][0]), str(dValue[idx][1] ), str(dValue[idx][2])))
+ str(count), common.urlShowBug + str(dValue[idx][0]),
+ str(dValue[idx][1].strftime("%Y-%m-%d")),
+ str(dValue[idx][2])),
+ file=fp)
if count != len(dValue) and count % 10 == 0:
- print('=' * 100)
+ print('=' * 100, file=fp)
+ fp.close()
+ fp = open(bugzillaUserReportPath, 'w', encoding='utf-8')
+ print("Creating file " + bugzillaUserReportPath)
for k, v in statList['people'].items():
if not statList['people'][k]['name']:
statList['people'][k]['name'] = statList['people'][k]['email'].split('@')[0]
if statList['people'][k]['oldest'] >= cfg['newUserPeriod'] and len(statList['people'][k]['bugs']) >= newUserBugs and \
statList['people'][k]['email'] not in cfg['configQA']['ignore']['newContributors']:
- print('\n=== New contributor: '+ statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ")")
+ print('\n=== New contributor: '+ statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ") ===", file=fp)
lBugs = list(statList['people'][k]['bugs'])
for idx in range(len(lBugs)):
isEasyHack = False
if 'easyHack' in bugzillaData['bugs'][str(lBugs[idx])]['keywords']:
isEasyHack = True
print("{:<3} | {:<58} | {}".format(
- str(idx + 1), common.urlShowBug + str(lBugs[idx]), 'easyHack: ' + str(isEasyHack)))
+ str(idx + 1), common.urlShowBug + str(lBugs[idx]), 'easyHack: ' + str(isEasyHack)), file=fp)
if statList['people'][k]['oldest'] >= cfg['memberPeriod'] and statList['people'][k]['newest'] >= cfg['reportPeriod'] and \
len(statList['people'][k]['bugs']) >= memberBugs and statList['people'][k]['email'] not in cfg['configQA']['ignore']['members']:
- print('\n=== New MEMBER: ' + statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ")")
- print('\tOldest: ' + statList['people'][k]['oldest'].strftime("%Y-%m-%d"))
- print('\tNewest: ' + statList['people'][k]['newest'].strftime("%Y-%m-%d"))
- print('\tTotal: ' + str(len(statList['people'][k]['bugs'])))
+ print('\n=== New MEMBER: ' + statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ") ===", file=fp)
+ print('\tOldest: ' + statList['people'][k]['oldest'].strftime("%Y-%m-%d"), file=fp)
+ print('\tNewest: ' + statList['people'][k]['newest'].strftime("%Y-%m-%d"), file=fp)
+ print('\tTotal: ' + str(len(statList['people'][k]['bugs'])), file=fp)
if statList['people'][k]['newest'] < cfg['oldUserPeriod'] and statList['people'][k]['newest'] >= cfg['oldUserPeriod2'] and \
len(statList['people'][k]['bugs']) >= oldUserBugs and statList['people'][k]['email'] not in cfg['configQA']['ignore']['oldContributors']:
- print('\n=== Old Contributor: ' + statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ")")
- print('\tOldest: ' + statList['people'][k]['oldest'].strftime("%Y-%m-%d"))
- print('\tNewest: ' + statList['people'][k]['newest'].strftime("%Y-%m-%d"))
- print('\tTotal: ' + str(len(statList['people'][k]['bugs'])))
+ print('\n=== Old Contributor: ' + statList['people'][k]['name'] + " (" + statList['people'][k]['email'] + ") ===", file=fp)
+ print('\tOldest: ' + statList['people'][k]['oldest'].strftime("%Y-%m-%d"), file=fp)
+ print('\tNewest: ' + statList['people'][k]['newest'].strftime("%Y-%m-%d"), file=fp)
+ print('\tTotal: ' + str(len(statList['people'][k]['bugs'])), file=fp)
statList['people'][k]['oldest'] = statList['people'][k]['oldest'].strftime("%Y-%m-%d")
statList['people'][k]['newest'] = statList['people'][k]['newest'].strftime("%Y-%m-%d")
+ fp.close()
+
def runCfg():
cfg = common.get_config()
cfg['reportPeriod'] = common.util_convert_days_to_datetime(reportPeriodDays)
commit a1d1131a0156b0983df02aecc1ee121dac788819
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Aug 7 11:41:54 2019 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 7 13:04:20 2019 +0200
QA: Remove highlighting. No longer needed for emails
diff --git a/qa/bugzillaChecker.py b/qa/bugzillaChecker.py
index 5eb7f66..b96837c 100755
--- a/qa/bugzillaChecker.py
+++ b/qa/bugzillaChecker.py
@@ -11,14 +11,13 @@ import common
import sys
import datetime
import re
-import colorama
-from colorama import Back
import ast
-#Use this variable to hightlight the most recent bugs
-coloredPeriodDays = 1
-
-reportPeriodDays = 7
+if datetime.date.today().weekday() == 0:
+ # Weekends
+ reportPeriodDays = 3
+else:
+ reportPeriodDays = 1
newUserPeriodDays = 30
newUserBugs = 3
@@ -385,36 +384,18 @@ def analyze_bugzilla_checkers(statList, bugzillaData, cfg):
value = [rowId, '', '']
util_add_to_result(lResults, 'empty_alias', value)
- colorama.init(autoreset=True)
for dKey, dValue in sorted(lResults.items()):
if dValue:
print('\n=== ' + dKey.replace('_', ' ').upper() + ' ===')
dValue = sorted(dValue, key=lambda x: x[1])
for idx in range(len(dValue)):
- background = Back.RESET
if dValue[idx][1]:
if isinstance(dValue[idx][1], str):
dValue[idx][1] = datetime.datetime.strptime(dValue[idx][1], "%Y-%m-%dT%H:%M:%SZ")
- if dKey == 'inactive_assignee':
- if dValue[idx][1] >= cfg['coloredInactiveAssignedPeriod']:
- background = Back.GREEN
- elif dKey == 'unconfirmed_last_comment_not_from_reporter':
- if dValue[idx][1] >= cfg['coloredRetestUnconfirmedPeriod']:
- background = Back.GREEN
- elif dKey == 'unconfirmed_last_comment_from_reporter':
- if dValue[idx][1] >= cfg['coloredInactiveUnconfirmedPeriod']:
- background = Back.GREEN
- elif dKey == 'ping_bug_fixed':
- if dValue[idx][1] >= cfg['coloredFixBugPingPeriod']:
- background = Back.GREEN
- else:
- if dValue[idx][1] >= cfg['coloredReportPeriod']:
- background = Back.GREEN
-
count = idx + 1
- print(background + "{:<3} | {:<58} | {} | {}".format(
+ print("{:<3} | {:<58} | {} | {}".format(
str(count), common.urlShowBug + str(dValue[idx][0]), str(dValue[idx][1] ), str(dValue[idx][2])))
if count != len(dValue) and count % 10 == 0:
@@ -455,20 +436,15 @@ def analyze_bugzilla_checkers(statList, bugzillaData, cfg):
def runCfg():
cfg = common.get_config()
cfg['reportPeriod'] = common.util_convert_days_to_datetime(reportPeriodDays)
- cfg['coloredReportPeriod'] = common.util_convert_days_to_datetime(coloredPeriodDays)
cfg['newUserPeriod'] = common.util_convert_days_to_datetime(newUserPeriodDays)
cfg['oldUserPeriod'] = common.util_convert_days_to_datetime(oldUserPeriodDays)
cfg['oldUserPeriod2'] = common.util_convert_days_to_datetime(oldUserPeriodDays + reportPeriodDays)
cfg['memberPeriod'] = common.util_convert_days_to_datetime(memberPeriodDays)
cfg['PingFixedBugPeriod'] = common.util_convert_days_to_datetime(pingFixedBugPeriodDays)
cfg['pingFixedBugDiff'] = common.util_convert_days_to_datetime(pingFixedBugPeriodDays + reportPeriodDays)
- cfg['coloredFixBugPingPeriod'] = common.util_convert_days_to_datetime(coloredPeriodDays + pingFixedBugPeriodDays)
cfg['retestUnconfirmedPeriod'] = common.util_convert_days_to_datetime(retestUnconfirmedPeriodDays)
- cfg['coloredInactiveUnconfirmedPeriod'] = common.util_convert_days_to_datetime(coloredPeriodDays + inactiveUnconfirmedPeriodDays)
cfg['inactiveUnconfirmedPeriod'] = common.util_convert_days_to_datetime(inactiveUnconfirmedPeriodDays)
- cfg['coloredRetestUnconfirmedPeriod'] = common.util_convert_days_to_datetime(coloredPeriodDays + retestUnconfirmedPeriodDays)
cfg['inactiveAssignedPeriod'] = common.util_convert_days_to_datetime(inactiveAssignedPeriodDays)
- cfg['coloredInactiveAssignedPeriod'] = common.util_convert_days_to_datetime(coloredPeriodDays + inactiveAssignedPeriodDays)
return cfg
if __name__ == '__main__':
@@ -476,7 +452,7 @@ if __name__ == '__main__':
if len(sys.argv) > 1:
try:
- coloredPeriodDays = int(sys.argv[1])
+ reportPeriodDays = int(sys.argv[1])
except ValueError:
print("The argument is not an int. Ignoring it...")
commit 618c4e7220e3528378960ec760365b2fca92f334
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed Jul 3 16:53:25 2019 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 7 13:04:20 2019 +0200
QA: Add list of resolved perf issues
diff --git a/qa/createBlogReport.py b/qa/createBlogReport.py
index 9d0478d..689b846 100755
--- a/qa/createBlogReport.py
+++ b/qa/createBlogReport.py
@@ -37,6 +37,7 @@ def util_create_statList():
'resolvedStatuses' : {},
'criticalFixed': {},
'crashFixed': {},
+ 'perfFixed': {},
'oldBugsFixed': {},
'metabug': util_create_basic_schema(),
'keywords': { k : util_create_basic_schema() for k in lKeywords},
@@ -401,9 +402,11 @@ def analyze_bugzilla_data(statList, bugzillaData, cfg):
if row['priority'] == "highest":
statList['criticalFixed'][rowId]= {'summary': row['summary'], 'author': author}
- elif 'crash' in row['summary'].lower():
+ if 'crash' in row['summary'].lower():
statList['crashFixed'][rowId]= {'summary': row['summary'], 'author': author}
- elif creationDate < common.util_convert_days_to_datetime(oldBugsYears * 365):
+ if 'perf' in row['keywords']:
+ statList['perfFixed'][rowId]= {'summary': row['summary'], 'author': author}
+ if creationDate < common.util_convert_days_to_datetime(oldBugsYears * 365):
statList['oldBugsFixed'][rowId]= {'summary': row['summary'], 'author': author}
if rowId in fixedBugs and not commitNoticiation:
@@ -622,6 +625,7 @@ def createReport(statList):
createSection(fp, statList['fixed'], "Fixed Bugs", "fixed", "Fixers", "darksalmon")
createList(fp, statList['criticalFixed'], "List of critical bugs fixed")
createList(fp, statList['crashFixed'], "List of crashes fixed")
+ createList(fp, statList['perfFixed'], "List of performance issues fixed")
createList(fp, statList['oldBugsFixed'], "List of old bugs ( more than {} years old ) fixed".format(oldBugsYears))
createSection(fp, statList['wfm'], "WORKSFORME bugs", "retested", "testers", "m")
createSection(fp, statList['duplicate'], "DUPLICATED bugs", "duplicated", "testers", "c")
More information about the Libreoffice-commits
mailing list