esc-reporting/esc-analyze.py | 41 ++++++++++++++++++++++++----------------- esc-reporting/esc-automate.py | 2 +- esc-reporting/esc-report.py | 14 +++++--------- 3 files changed, 30 insertions(+), 27 deletions(-)
New commits: commit 6083a996bba50e7fe19d3c5baf5e9022ce6b2b46 Author: jan Iversen <j...@libreoffice.org> Date: Sun May 7 16:56:05 2017 +0200 esc-report, cleanup diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index f749739..3f6bfd9 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -222,7 +222,7 @@ def util_create_statList(): 'people': {}, 'escList': {}, 'reportList': {}, - 'automateList': {}} + 'automateList': {'bugzilla': {}, 'gerrit': {}, 'pdf': {}}} @@ -582,13 +582,13 @@ def analyze_reports(): 'too_many_comments': [], 'top10commit': [], 'top10review': []} - statList['automateList'] = {'to_abandon': [], - 'to_review': [], - 'missing_ui_cc': [], - 'to_unassign': [], - 'missing_cc': [], - 'assign_problem': [], - 'remove_cc': []} + automateList = {'to_abandon': [], + 'to_review': [], + 'missing_ui_cc': [], + 'to_unassign': [], + 'missing_cc': [], + 'assign_problem': [], + 'remove_cc': []} for id, row in statList['people'].items(): entry = {'name': row['name'], 'email': id, 'license': row['licenseText']} @@ -626,9 +626,9 @@ def analyze_reports(): if x['email'] != ownerEmail and x['email'] != 'c...@libreoffice.org': cntReview += 1 if xDate < cfg['1monthDate'] and not doBlock: - statList['automateList']['to_abandon'].append(entry) + automateList['to_abandon'].append(entry) if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: - statList['automateList']['to_review'].append(entry) + automateList['to_review'].append(entry) for key, row in bugzillaData['bugs'].items(): if not 'cc' in row: @@ -641,7 +641,7 @@ def analyze_reports(): if not 'easyHack' in row['keywords']: if 'mentoring' in row['cc']: - statList['automateList']['remove_cc'].append(key) + automateList['remove_cc'].append(key) continue if 'needsDevEval' in row['keywords']: @@ -649,20 +649,20 @@ def analyze_reports(): if 'needsUXEval' in row['keywords']: statList['reportList']['needsUXEval'].append(key) if 'topicUI' in row['keywords'] and 'libreoffice-ux-adv...@lists.freedesktop.org' not in row['cc']: - statList['automateList']['missing_ui_cc'].append(key) + automateList['missing_ui_cc'].append(key) if row['status'] == 'NEEDINFO': statList['reportList']['needinfo'].append(key) elif row['status'] == 'ASSIGNED': xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") if xDate < cfg['1monthDate']: - statList['automateList']['to_unassign'].append(key) + automateList['to_unassign'].append(key) if (row['status'] == 'ASSIGNED' and (row['assigned_to'] == '' or row['assigned_to'] == 'libreoffice-b...@lists.freedesktop.org')) or \ (row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-b...@lists.freedesktop.org') : - statList['automateList']['assign_problem'].append(key) + automateList['assign_problem'].append(key) if len(row['comments']) >= 5: statList['reportList']['too_many_comments'].append(key) if not 'mentor...@documentfoundation.org' in row['cc']: - statList['automateList']['missing_cc'].append(key) + automateList['missing_cc'].append(key) if row['comments'][-1]['creator'] == 'libreoffice-comm...@lists.freedesktop.org' and not key in cfg['bugzilla']['close_except']: statList['reportList']['to_be_closed'].append(key) cDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") @@ -688,8 +688,15 @@ def analyze_reports(): if len(statList['reportList']['top10review']) >= 10: break - statList['automateList']['award_1st_email'] = statList['reportList']['award_1st_email'] - + statList['automateList']['bugzilla'] = {'missing_ui_cc': automateList['missing_ui_cc'], + 'to_unassign': automateList['to_unassign'], + 'missing_cc': automateList['missing_cc'], + 'assign_problem': automateList['assign_problem'], + 'remove_cc': automateList['remove_cc']} + statList['automateList']['bugzilla'] = {'to_review': automateList['to_review'], + 'to_abandon': automateList['to_abandon']} + statList['automateList']['pdf'] = {'award_1st_email': statList['reportList']['award_1st_email']} + statList['automateList'] = automateList def analyze_myfunc(): diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py index 23906c9..7074a72 100755 --- a/esc-reporting/esc-automate.py +++ b/esc-reporting/esc-automate.py @@ -79,7 +79,7 @@ def runCfg(platform): def runAutomate(): global cfg, autoList - autoList = util_load_data_file(cfg['homedir'] + 'automate.json') + autoList = util_load_data_file(cfg['homedir'] + 'stats.json')['automateList'] xMail = [] try: diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index a6620e9..cd51e72 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -141,7 +141,7 @@ def util_build_matrix(title, lineDesc, index): def report_day_mentoring(): - global statList, openhubData, gerritData, gitData, bugzillaData, cfg + global statList, cfg fp = open('/tmp/esc_day_mentoring_report.txt', 'w', encoding='utf-8') print('Day mentoring report, generated {} based on stats.json from {}'.format( @@ -469,7 +469,7 @@ def report_bug_metrics(): def report_ui(): - global statList, openhubData, gerritData, gitData, bugzillaData, cfg + global statList, cfg tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['ui']['1month']['history']+statList['people'][k]['ui']['1month']['commented']), reverse=True) top10list = [] for i in tmpClist: @@ -505,7 +505,7 @@ def report_ui(): def report_qa(): - global statList, openhubData, gerritData, gitData, bugzillaData, cfg + global statList, cfg global text_bisected, text_bibisected, text_regression @@ -670,7 +670,7 @@ def report_qa(): def report_myfunc(): - global statList, openhubData, gerritData, gitData, bugzillaData, cfg + global statList, cfg # {'title': 'mail from me', 'addr': 'm...@own.home', 'file': '/tmp/myfile.txt'} return None @@ -735,13 +735,9 @@ def runCfg(platform): def runReport(): - global cfg, statList, openhubData, bugzillaData, gerritData, gitData + global cfg, statList statList = util_load_data_file(cfg['homedir'] + 'stats.json') - openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') - bugzillaData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_dump.json') - gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') - gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') xMail = [] try: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits