[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ad9fdcbf7ae7f9f6fca0bbafe6f8c53eafe2b17c Author: Xisco Fauli AuthorDate: Wed Oct 18 13:41:41 2023 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 18 13:41:41 2023 +0200 esc-reporting: only abandon patches in core project. For other project the script fails because it doesn't have permission Change-Id: I5dcf9e59461f873480f21bd23f6a7266fbc0b7a5 diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 2dd329da..8289fceb 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -787,7 +787,7 @@ def analyze_reports(): if xDate < cfg['1monthDate']: # gerrit cli sucks and doesn't accept changeset,patchrev but only uses numericID - if 'A polite ping' in txt: + if 'A polite ping' in txt and row['project'] == "core": automateList['gerrit']['to_abandon_abandon'][entry['id']] = patchset else: automateList['gerrit']['to_abandon_comment'][entry['id']] = patchset
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 69764ef41ddc342c2c74cdc4432f6d0f615ddecd Author: Xisco Fauli AuthorDate: Thu Oct 5 14:21:08 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Oct 5 14:21:08 2023 +0200 esc-analyze: Add reviewers only in master patches Change-Id: Id2162becadbe627baa59d19fe8d29e8b1fb03e70 diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 30b3283b..2dd329da 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -791,7 +791,7 @@ def analyze_reports(): automateList['gerrit']['to_abandon_abandon'][entry['id']] = patchset else: automateList['gerrit']['to_abandon_comment'][entry['id']] = patchset -if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: +if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter'] and row['branch'] == 'master': tmpListToReview.append({'id': entry['id'], 'patchset': patchset}) for rowTmp in tmpListToReview:
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |5 --- esc-reporting/esc-collect.py | 44 -- esc-reporting/esc-report.py | 55 --- 3 files changed, 104 deletions(-) New commits: commit 0a2da8bb7e9b6dadd4acf66ca8fdb2c5181d0d6b Author: Xisco Fauli AuthorDate: Wed Mar 8 14:12:00 2023 +0100 Commit: Xisco Fauli CommitDate: Wed Mar 8 14:12:00 2023 +0100 esc: Remove MAB section Change-Id: I84962b0eaedbe710eb73e2c461a7e8c87383f3e7 diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 4b08459d..30b3283b 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -553,7 +553,6 @@ def analyze_esc(): statList['data']['esc']['QAstat'] = {'opened': bugzillaESCData['ESC_QA_STATS_UPDATE']['opened'], 'closed': bugzillaESCData['ESC_QA_STATS_UPDATE']['closed']} -statList['data']['esc']['MAB'] = {} statList['escList']['QAstat'] = {'top15_squashers' : {}, 'top15_reporters' : {}, 'top15_fixers' : [], @@ -611,10 +610,6 @@ def analyze_esc(): statList['escList']['QAstat']['top15_fixers'] = bug_fixers statList['escList']['QAstat']['top15_confirmers'] = bug_confirmers -for id, row in bugzillaESCData['ESC_MAB_UPDATE'].items(): - statList['data']['esc']['MAB'][id] = row - statList['data']['esc']['MAB'][id]['%'] = int((row['open'] / row['total'])*100) - statList['escList']['bisect'] = weekList['escList']['bisect'] statList['escList']['bisect'].insert(0, [bugzillaESCData['ESC_BISECTED_UPDATE']['open'], bugzillaESCData['ESC_BISECTED_UPDATE']['total']]) diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index 5af452c0..95c9ecc4 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -265,48 +265,6 @@ def do_ESC_QA_STATS_UPDATE(): rawList[topNames[curTopIndex]].append(x) return rawList - - -def do_ESC_MAB_UPDATE(bz): -# load report from Bugzilla -url = bz + '=version=regexp=highest=^' -rawList = {} - -series = {'6.0' : '6.0', - '5.4' : '5.4', - '5.3' : '5.3', - '5.2' : '5.2', - '5.1' : '5.1', - '5.0' : '5.0', - '4.5' : '5.0', # urgh - '4.4' : '4.4', - '4.3' : '4.3', - '4.2' : '4.2', - '4.1' : '4.1', - '4.0' : '4.0', - '3.6' : 'old', - '3.5' : 'old', - '3.4' : 'old', - '3.3' : 'old', - 'Inherited from OOo' : 'old', - 'PreBibisect' : 'old', - 'unspecified' : 'old' - } - -for key, id in series.items(): - if id not in rawList: -rawList[id] = {'open': 0, 'total': 0} - - urlCall = url + key + '.*' - tmpTotal = util_load_url(urlCall, useRaw=True) - rawList[id]['total'] += len(tmpTotal.split('\n')) -1 - tmpOpen = util_load_url(urlCall + "=---", useRaw=True) - rawList[id]['open'] += len(tmpOpen.split('\n')) - 1 - -return rawList - - - def do_ESC_counting(bz, urlAdd): rawList = [] tmp = util_load_url(bz + urlAdd, useRaw=True).split('\n')[1:] @@ -323,7 +281,6 @@ def get_esc_bugzilla(cfg): print("Updating ESC bugzilla dump") rawList = {'ESC_QA_STATS_UPDATE': {}, - 'ESC_MAB_UPDATE': {}, 'ESC_BISECTED_UPDATE': {}, 'ESC_BIBISECTED_UPDATE': {}, 'ESC_COMPONENT_UPDATE': {'all': {}, 'high': {}, 'os': {}}, @@ -338,7 +295,6 @@ def get_esc_bugzilla(cfg): '=1' rawList['ESC_QA_STATS_UPDATE'] = do_ESC_QA_STATS_UPDATE() -rawList['ESC_MAB_UPDATE'] = do_ESC_MAB_UPDATE(bz) urlBi = '=bisected%2C' url = '=tag DESC%2Cchangeddate DESC%2Cversion DESC%2Cpriority%2Cbug_severity' diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index df9b80a7..4eac0169 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -269,19 +269,6 @@ def report_esc_prototype(): txt += ' {:<23} {}\n'.format(name, count) escPrototype = escPrototype.replace('$', txt) -txt = '' -oldRow = statList['data']['esc']['MAB']['old'] -del statList['data']['esc']['MAB']['old'] -keyList = sorted(statList['data']['esc']['MAB'], reverse=True) -keyList.append('old') -statList['data']['esc']['MAB']['old'] = oldRow -for id in keyList: - row = statList['data']['esc']['MAB'][id] - diff = statList['diff']['esc']['MAB'][id] - mab = '{} : {}/{} -'.format(id, row['open'], row['total']) - txt += ' {:<16} {} % ({:+d})\n'.format(mab, row['%'], diff['%']) -escPrototype = escPrototype.replace('$', txt) - txt = ' + ' for row in statList['escList']['bisect']: txt
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8c12b9258b87049a24c2decc3e384554014f190c Author: Xisco Fauli AuthorDate: Thu Oct 21 10:15:48 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Oct 21 10:15:48 2021 +0200 esc-analyze: fix analyze_documentation failed with 'committer' Change-Id: I50bd242ddc8f029dd9a4738ee7b371c4fa59e6bb diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 074e2d5..4b08459 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -122,7 +122,7 @@ def util_build_period_stat(xDate, email, base, peopleTarget=None, dataTarget=Non xType = 'contributor' if email: statList['people'][email][base]['total'] += 1 - if statList['people'][email]['isCommitter'] and base != 'ui': + if statList['people'][email]['isCommitter'] and base != 'ui' and base != 'documentation': xType = 'committer' if dataTarget: statList['data'][base][xType]['total'] += 1
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) New commits: commit 95b388430de6f8d75c5572ca5c2fb31015c6588e Author: Xisco Fauli AuthorDate: Thu Jul 15 12:55:37 2021 +0200 Commit: Xisco Fauli CommitDate: Thu Jul 15 13:16:04 2021 +0200 esc-analyze: Exclude feature and distro branches in reviewers Change-Id: Idaa3bad9d0396f2fea1de17da7849d48df30652f diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index a306323..78b43a7 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -326,11 +326,13 @@ def analyze_mentoring(): statList['people'][ownerEmail]['isContributor'] = True util_build_period_stat(xDate, ownerEmail, 'gerrit', dataTarget=row['status'], peopleTarget='owner') - for i in 'Verified', 'Code-Review': -for x in row['labels'][i]['all']: - xEmail = util_check_mail(x['name'], x['email']) - if xEmail != ownerEmail: -util_build_period_stat(xDate, xEmail, 'gerrit', dataTarget='reviewed', peopleTarget='reviewer') + # Exclude feature and distro branches + if row['branch'] == 'master' or row['branch'].startswith('libreoffice-'): + for i in 'Verified', 'Code-Review': +for x in row['labels'][i]['all']: + xEmail = util_check_mail(x['name'], x['email']) + if xEmail != ownerEmail: +util_build_period_stat(xDate, xEmail, 'gerrit', dataTarget='reviewed', peopleTarget='reviewer') print(" from " + statOldDate.strftime('%Y-%m-%d') + " to " + statNewDate.strftime('%Y-%m-%d')) print("mentoring: analyze git", end="", flush=True) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit 8804bcdcbb6715ed00cdea8b36faaca579f883af Author: Guilhem Moulin AuthorDate: Thu Jul 23 19:11:25 2020 +0200 Commit: Guilhem Moulin CommitDate: Wed Sep 2 01:04:34 2020 +0200 esc-analyze: remove 'fullid' field and use number change IDs instead. fullid needs to uniquely identify a changeset, which the Change-ID does not. (Cherry-picks preserve Change-IDs, which might cause `gerrit set-reviewers $CHANGE_ID` to fail when the Change-ID matches several changes.) We used to specify changes by Change-ID and not by change number due to potential conflicts between change numbers and abbreviated commit IDs, but the ambiguity is fixed since gerrit 1.14.5.1, see https://bugs.chromium.org/p/gerrit/issues/detail?id=1707 https://gerrit-review.googlesource.com/c/gerrit/+/71936 https://gerrit.libreoffice.org/Documentation/cmd-set-reviewers.html I guess it'll be more robust to replace the old-style change numeric IDs with full IDs $PROJECT~$BRANCH~$CHANGE_ID, but that's a more intrusive change. Change-Id: Ibf5bb02ed1ab5479a0994dc3fbf1763c288edc23 Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/99333 Reviewed-by: Xisco Fauli Reviewed-by: Guilhem Moulin Tested-by: Guilhem Moulin diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index dabca7c..1176c32 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -687,10 +687,7 @@ def analyze_reports(): row['status'] = 'NEW' xDate = datetime.datetime.strptime(row['updated'], '%Y-%m-%d %H:%M:%S.%f000') ownerEmail = util_check_mail(row['owner']['name'], row['owner']['email']) - # while web is happy with the unique project~branch~changeID label, commandline interface - # only accepts ambiguous changeID, doesn't help, so fullid is not really fullid, but at least - # less prone to conflicts than just changeset-number that also can easily prefix-match commit-hashes - entry = {'id': key, 'fullid': row['change_id'], 'name': row['owner']['name'], 'email': ownerEmail, 'title': row['subject']} + entry = {'id': key, 'name': row['owner']['name'], 'email': ownerEmail, 'title': row['subject']} if row['status'] != 'ABANDONED': if ownerEmail is None: @@ -738,7 +735,7 @@ def analyze_reports(): else: automateList['gerrit']['to_abandon_comment'][entry['id']] = patchset if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: -tmpListToReview.append({'id': entry['id'], 'fullid': entry['fullid'], 'patchset': patchset}) +tmpListToReview.append({'id': entry['id'], 'patchset': patchset}) for rowTmp in tmpListToReview: if gerritData['patch'][rowTmp['id']]['project'] == 'online': @@ -763,8 +760,8 @@ def analyze_reports(): except Exception as e: pass x = statList['people'][reviewEmail] - automateList['gerrit']['to_review'][rowTmp['fullid']] = {'name': statList['people'][reviewEmail]['gerrit']['reviewName'], - 'patchset': rowTmp['patchset'], 'id': rowTmp['id']} + automateList['gerrit']['to_review'][rowTmp['id']] = {'name': statList['people'][reviewEmail]['gerrit']['reviewName'], + 'patchset': rowTmp['patchset'], 'id': rowTmp['id']} for key, row in bugzillaData['bugs'].items(): if not 'cc' in row: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) New commits: commit ebcf0a907b22ffcb26be6a6756e7882e63293cdb Author: Xisco Fauli AuthorDate: Fri Oct 11 14:42:24 2019 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 11 14:42:24 2019 +0200 ESC: read gzip files correctly diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index bdfcf74..5bf0848 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -959,13 +959,17 @@ def runAnalyze(): global cfg, statList global openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList, automateData, committersNames +weekList = None x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') -jsonFileName = 'stats_' + x + '.json' -gzFilePath = cfg['homedir'] + 'archive/' + jsonFileName + '.gz' +gzFilePath = cfg['homedir'] + 'archive/stats_' + x + '.json.gz' if os.path.isfile(gzFilePath): - with gzip.open(gzFilePath , 'rb'): -weekList = util_load_file(jsonFileName) -else: + fp = gzip.open(gzFilePath) + content = fp.read() + fp.close() + if content: +weekList = json.loads(content.decode('utf-8')) + +if not weekList: weekList = util_create_statList() openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) New commits: commit 9f60bf87a757e6a50aa92f21e3ea3a8f05c9592c Author: Xisco Fauli AuthorDate: Thu Oct 10 12:11:08 2019 +0200 Commit: Xisco Fauli CommitDate: Thu Oct 10 13:01:43 2019 +0200 ESC: Check if .gz file exists otherwise, use an empty statList diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 0ec0b39..bdfcf74 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -224,15 +224,17 @@ def util_create_statList(): 'haveBacktrace': 0, 'needsDevAdvice': 0, 'android': 0, 'ios': 0, 'online': 0}}, 'easyhacks' : {'needsDevEval': 0, 'needsUXEval': 0, 'cleanup_comments': 0, 'total': 0, 'assigned': 0, 'open': 0}, - 'esc': {}}, + 'esc': { + 'regression': {'open': 0, 'total': 0} + }}, 'stat': {'openhub_last_analyse': "2001-01-01"}, 'people': {}, - 'escList': {}, + 'escList': { + 'bisect': [], + 'bibisect': [] + }, 'reportList': {}} - - - def util_check_mail(name, xmail): global statList @@ -958,8 +960,13 @@ def runAnalyze(): global openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList, automateData, committersNames x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') -with gzip.open(cfg['homedir'] + 'archive/stats_' + x + '.json.gz', 'rb'): - weekList = util_load_file('stats_' + x + '.json') +jsonFileName = 'stats_' + x + '.json' +gzFilePath = cfg['homedir'] + 'archive/' + jsonFileName + '.gz' +if os.path.isfile(gzFilePath): + with gzip.open(gzFilePath , 'rb'): +weekList = util_load_file(jsonFileName) +else: + weekList = util_create_statList() openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') bugzillaData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_dump.json') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4bd5b83410a6ab82f7010f8a9680a0ccf18bc7f8 Author: Xisco Fauli AuthorDate: Wed Oct 9 21:44:21 2019 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 9 21:44:21 2019 +0200 ESC: Use correct json filename diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 8085393..0ec0b39 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -959,7 +959,7 @@ def runAnalyze(): x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') with gzip.open(cfg['homedir'] + 'archive/stats_' + x + '.json.gz', 'rb'): - weekList = util_load_file(x + '.json') + weekList = util_load_file('stats_' + x + '.json') openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') bugzillaData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_dump.json') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) New commits: commit 20612c555d2f96a3616d27fade27d2acbc14a020 Author: Xisco Fauli AuthorDate: Tue Oct 8 10:47:20 2019 +0200 Commit: Xisco Fauli CommitDate: Tue Oct 8 10:47:20 2019 +0200 ESC: Compress archive files diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 3326360..8085393 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -54,7 +54,8 @@ import datetime import json import xmltodict import re - +import gzip +from shutil import copyfile def util_load_file(fileName, isJson=True): @@ -876,7 +877,14 @@ def analyze_final(): sFile = cfg['homedir'] + 'stats.json' util_dump_file(sFile, statList) x = myDay.strftime('%Y-%m-%d') -os.system('cp '+ sFile + ' ' + cfg['homedir'] + 'archive/stats_' + x + '.json') + +sArchiveFile = cfg['homedir'] + 'archive/stats_' + x + '.json' +copyfile(sFile, sArchiveFile) +with open(sArchiveFile, 'rb') as f_in: + with gzip.open(sArchiveFile + '.gz', 'wb') as f_out: +f_out.writelines(f_in) +os.remove(sArchiveFile) + if myDay.strftime('%w') == '4': if 'people' in statList: del statList['people'] @@ -950,7 +958,8 @@ def runAnalyze(): global openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList, automateData, committersNames x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') -weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') +with gzip.open(cfg['homedir'] + 'archive/stats_' + x + '.json.gz', 'rb'): + weekList = util_load_file(x + '.json') openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') bugzillaData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_dump.json') ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |4 esc-reporting/esc-collect.py | 13 + esc-reporting/esc-report.py | 11 +-- 3 files changed, 26 insertions(+), 2 deletions(-) New commits: commit bfbdf1078021b2b6b30fb9fe289cc605f9694b03 Author: Xisco Fauli AuthorDate: Fri May 3 16:27:24 2019 +0200 Commit: Xisco Fauli CommitDate: Fri May 3 16:27:24 2019 +0200 ESC: Add high priority bugs diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 48533b8..dc9c1c0 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -521,6 +521,10 @@ def analyze_esc(): for id in bugzillaESCData['MostPressingBugs'][type]['list']: statList['escList']['MostPressingBugs'][type]['list'][id] = bugzillaData['bugs'][id]['summary'] +statList['escList']['HighSeverityBugs'] = {} +for id in bugzillaESCData['HighSeverityBugs']['list']: + statList['escList']['HighSeverityBugs'][id] = bugzillaData['bugs'][id]['summary'] + bug_fixers = {} bug_confirmers = {} for id, bug in bugzillaData['bugs'].items(): diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index aba5a58..64584f9 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -548,6 +548,19 @@ def get_esc_bugzilla(cfg): '=priority' \ '=-8d' \ '=Now' \ + '=high' \ + '=high' \ + '=---' +rawList['HighSeverityBugs'] = {} +rawList['HighSeverityBugs']['count'], \ +rawList['HighSeverityBugs']['list'] = do_ESC_counting(bz, url) +url = '_status=UNCONFIRMED' \ + '_status=NEW' \ + '_status=ASSIGNED' \ + '_status=REOPENED' \ + '=priority' \ + '=-8d' \ + '=Now' \ '=highest' \ '=highest' \ '=---' diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index d613fe5..49a0e91 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -310,16 +310,23 @@ def report_esc_prototype(): txt += ' {:<24} - {}({:+d})\n'.format(id, row, xDiff) escPrototype = escPrototype.replace('$', txt) -txt = ' open:\n' +txt = ' New:\n' for id, title in statList['escList']['MostPressingBugs']['open']['list'].items(): txt += '+ {}\n'.format(title) txt += '+ https://bugs.documentfoundation.org/show_bug.cgi?id={}\n'.format(id) -txt += ' closed:\n' +txt += ' Old:\n' +txt += ' Fixed:\n' for id, title in statList['escList']['MostPressingBugs']['closed']['list'].items(): txt += '+ {}\n'.format(title) txt += '+ https://bugs.documentfoundation.org/show_bug.cgi?id={}\n'.format(id) escPrototype = escPrototype.replace('$', txt) +txt = '' +for id, title in statList['escList']['HighSeverityBugs'].items(): +txt += '+ {}\n'.format(title) +txt += '+ https://bugs.documentfoundation.org/show_bug.cgi?id={}\n'.format(id) +escPrototype = escPrototype.replace('$', txt) + txt = '+ {}({:+d}) import failure, {}({:+d}) export failures'.format( statList['data']['esc']['crashtest']['import'], statList['diff']['esc']['crashtest']['import'], statList['data']['esc']['crashtest']['export'], statList['diff']['esc']['crashtest']['export']) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 5a6566e50f9c0aa143a88c0d593a47ab767d0849 Author: Xisco Fauli AuthorDate: Thu May 2 10:14:35 2019 +0200 Commit: Xisco Fauli CommitDate: Thu May 2 10:14:35 2019 +0200 ESC: fix 'rowTmp' referenced before assignment diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 927f513..48533b8 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -720,12 +720,12 @@ def analyze_reports(): if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: tmpListToReview.append({'id': entry['id'], 'fullid': entry['fullid'], 'patchset': patchset}) -if gerritData['patch'][rowTmp['id']]['project'] == 'online': +for rowTmp in tmpListToReview: + if gerritData['patch'][rowTmp['id']]['project'] == 'online': defaultEmail = util_check_mail('', cfg['automate']['gerritReviewOnlineUserEmail']) -else: + else: defaultEmail = util_check_mail('', cfg['automate']['gerritReviewUserEmail']) -for rowTmp in tmpListToReview: reviewEmail = defaultEmail txt = gerritData['patch'][rowTmp['id']]['subject'] if txt.startswith('tdf#'): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit d0bb7798e7865411682fcda4ce63a3092dfff62b Author: Xisco Fauli AuthorDate: Tue Apr 30 09:33:50 2019 +0200 Commit: Xisco Fauli CommitDate: Tue Apr 30 09:33:50 2019 +0200 ESC: Add a different reviewer for online diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index b59352b..927f513 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -720,7 +720,11 @@ def analyze_reports(): if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: tmpListToReview.append({'id': entry['id'], 'fullid': entry['fullid'], 'patchset': patchset}) -defaultEmail = util_check_mail('', cfg['automate']['gerritReviewUserEmail']) +if gerritData['patch'][rowTmp['id']]['project'] == 'online': +defaultEmail = util_check_mail('', cfg['automate']['gerritReviewOnlineUserEmail']) +else: +defaultEmail = util_check_mail('', cfg['automate']['gerritReviewUserEmail']) + for rowTmp in tmpListToReview: reviewEmail = defaultEmail txt = gerritData['patch'][rowTmp['id']]['subject'] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f5ac6921163cd2b0919433274f3039b7dc90480f Author: Xisco Fauli AuthorDate: Fri Oct 26 01:13:40 2018 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 26 01:15:54 2018 +0200 ESC: prevent list index out of range diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index bd1a609..8c69675 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -775,7 +775,7 @@ def analyze_reports(): 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") - if cDate >= cfg['1weekDate'] or 'easyhack' in row['history'][-1]['changes'][0]['added']: + if cDate >= cfg['1weekDate'] or (len(row['history']) > 0 and 'easyhack' in row['history'][-1]['changes'][0]['added']): statList['reportList']['easyhacks_new'].append(key) tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['commits']['1month']['owner']),reverse=True) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 1098ae6e806caf9260305ed4b6c1aca314eda117 Author: Xisco Fauli AuthorDate: Thu Sep 20 10:33:10 2018 +0200 Commit: Xisco Fauli CommitDate: Thu Sep 20 10:33:10 2018 +0200 ESC: statList needs to remain unchangeable diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index ecfca0f..bd1a609 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -205,8 +205,7 @@ 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}, -'committersNames': []}, + 'total': 0}}, 'trend' : {'committer': {'owner':{'1year': {}, '3month': {}, '1month': {}, '1week': {}}, 'reviewMerged': {'1year': {}, '3month': {}, '1month': {}, '1week': {}}}, 'contributor': {'owner':{'1year': {}, '3month': {}, '1month': {}, '1week': {}}, @@ -276,7 +275,7 @@ def util_build_diff(newList, oldList): def analyze_mentoring(): -global cfg, statList, openhubData, bugzillaData, gerritData, gitData +global cfg, statList, openhubData, bugzillaData, gerritData, gitData, committersNames print("mentoring: analyze openhub", end="", flush=True) if 'analysis' in openhubData['project']: @@ -306,7 +305,7 @@ def analyze_mentoring(): 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()) + committersNames.append(row['name'].lower()) statNewDate = cfg['1yearDate'] statOldDate = cfg['nowDate'] for key, row in gerritData['patch'].items(): @@ -612,7 +611,7 @@ def is_domain_mapped(email): return False def analyze_reports(): -global cfg, statList, openhubData, bugzillaData, gerritData, gitData, automateData +global cfg, statList, openhubData, bugzillaData, gerritData, gitData, automateData, committersNames print("reports: analyze", flush=True) mailedDate = cfg['3monthDate'] - datetime.timedelta(days=90) @@ -788,7 +787,7 @@ def analyze_reports(): splitName = auxName.split(',') auxName = splitName[1].strip() + ' ' + splitName[0].strip() -if auxName not in statList['data']['gerrit']['committersNames']: +if auxName not in committersNames: x = {'mail': i, 'name': statList['people'][i]['name'], 'month': statList['people'][i]['commits']['1month']['owner'], 'year': statList['people'][i]['commits']['1year']['owner']} @@ -932,7 +931,7 @@ def loadCfg(platform): def runAnalyze(): global cfg, statList -global openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList, automateData +global openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList, automateData, committersNames x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') @@ -945,6 +944,7 @@ def runAnalyze(): crashData = util_load_data_file(cfg['homedir'] + 'dump/crash_dump.json') automateData = util_load_data_file(cfg['homedir'] + 'dump/automate.json') statList = util_create_statList() +committersNames = [] try: runLoadCSV() except Exception as e: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 668d50e4fc33b218bfb6cdfdf24f9bd605317c85 Author: Xisco Fauli AuthorDate: Tue Sep 11 17:59:58 2018 +0200 Commit: Xisco Fauli CommitDate: Tue Sep 11 18:01:24 2018 +0200 ESC: filter out Pootle bot and DUMMY diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 0128152..a39ada6 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -786,7 +786,7 @@ def analyze_reports(): break tmpRlist = sorted(statList['people'], key=lambda k: (statList['people'][k]['gerrit']['1month']['reviewer']),reverse=True) for i in tmpRlist: -if i != 'c...@libreoffice.org': +if i != 'c...@libreoffice.org' and i != 'fake-em...@fake-email-script-esc.com' and i != '*dummy*': x = {'mail': i, 'name': statList['people'][i]['name'], 'month': statList['people'][i]['gerrit']['1month']['reviewer'], 'year': statList['people'][i]['gerrit']['1year']['reviewer']} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |1 - 1 file changed, 1 deletion(-) New commits: commit ce22e897f087288dba9aba1c5c83bfb97ffde83e Author: Xisco FauliDate: Tue Apr 10 17:54:46 2018 +0200 ESC: Sending this email is not necessary diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index c57e832..0128152 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -244,7 +244,6 @@ def util_check_mail(name, xmail): else: # Return a fake email in order to not break the script mail = 'fake-em...@fake-email-script-esc.com' - common.sendMail(cfg, 'xiscofa...@libreoffice.org', 'Error parsing email', 'ERROR parsing' + str(xmail)) if mail in statList['aliases']: mail = statList['aliases'][mail] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c8d1ecee912a57644f6742bfb9168639e4e1080b Author: ShinnokDate: Tue Jan 2 13:25:51 2018 +0100 Fix mentoring address misspelling. Change-Id: I99d50778650e3fdb53e0704ed3979ddd5f3e9479 Reviewed-on: https://gerrit.libreoffice.org/47255 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 2297d64..9fe2a84 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -733,7 +733,7 @@ def analyze_reports(): else: for comment in row['comments']: email = util_check_mail('', comment['creator']) - if not email == 'aniste...@gmail.com' and not email == 'mentor...@docmentfoundation.org' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: + if not email == 'aniste...@gmail.com' and not email == 'mentor...@documentfoundation.org' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: reviewEmail = email break except Exception as e: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |1 - 1 file changed, 1 deletion(-) New commits: commit e6b97ad437d03d489a9969a6d1a8fb31ef82a263 Author: ShinnokDate: Tue Jan 2 13:19:26 2018 +0100 Remove obsolete debug print. Change-Id: Ic819efe11cb9b38130ba4c91db6497f9f76dc2d5 Reviewed-on: https://gerrit.libreoffice.org/47254 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 734de84..2297d64 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -691,7 +691,6 @@ def analyze_reports(): statList['reportList']['missing_license'].append(entry) elif not statList['people'][ownerEmail]['licenseOK']\ and not is_domain_mapped(ownerEmail): - print(ownerEmail) entry['license'] = 'GERRIT: ' + statList['people'][ownerEmail]['licenseText'] statList['reportList']['missing_license'].append(entry) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit a2c387c559a25f8ecd8095da35d904acff7da5e9 Author: ShinnokDate: Sat Dec 30 13:42:10 2017 +0100 Rename function for clarity. Change-Id: I8aca21d7300c1f7c339b09b577d823dda0b71715 Reviewed-on: https://gerrit.libreoffice.org/47192 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 578e625..4925961 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -595,7 +595,7 @@ def analyze_esc(): statList['data']['esc']['crashreport'] = crashData['crashreport']['versions'] -def util_is_company_license(email): +def is_domain_mapped(email): domainMap = util_load_file(cfg['homedir'] + 'gitdm-config/domain-map', False) for line in domainMap: line = line[:-1] @@ -647,7 +647,7 @@ def analyze_reports(): if row['newestCommit'] > mailedDate\ and row['newestCommit'] < cfg['3monthDate']\ and id not in automateData['reminder']\ - and not util_is_company_license(entry['email']): + and not is_domain_mapped(entry['email']): automateList['mail']['we_miss_you_email'][entry['email']] = entry['name'] automateData['reminder'][id] = automateNow x = row['commits']['1month']['owner'] @@ -691,7 +691,7 @@ def analyze_reports(): entry['license'] = 'GERRIT NO LICENSE' statList['reportList']['missing_license'].append(entry) elif not statList['people'][ownerEmail]['licenseOK']\ - and not util_is_company_license(ownerEmail): + and not is_domain_mapped(ownerEmail): print(ownerEmail) entry['license'] = 'GERRIT: ' + statList['people'][ownerEmail]['licenseText'] statList['reportList']['missing_license'].append(entry) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit c596332399de89fd561d39837b4fc0d1beac2d6f Author: ShinnokDate: Wed Dec 20 12:39:47 2017 +0100 Cleanup missing license reports in the daily mails. By cross-referencing against licenseCompany.csv domain too. Change-Id: I4060e63d0d121825e1ce0b2e3342bb4d3f7e0ccc Reviewed-on: https://gerrit.libreoffice.org/46843 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index f3de599..e0458d3 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -608,6 +608,9 @@ def util_is_company_license(email): domain = line[:line.index(' ')] if email.endswith(domain): return True +for domain in cfg['companies']: + if email.endswith(domain): +return True return False def analyze_reports(): @@ -687,7 +690,9 @@ def analyze_reports(): entry['email'] = ownerEmail entry['license'] = 'GERRIT NO LICENSE' statList['reportList']['missing_license'].append(entry) -elif not statList['people'][ownerEmail]['licenseOK']: +elif not statList['people'][ownerEmail]['licenseOK']\ + and not util_is_company_license(ownerEmail): + print(ownerEmail) entry['license'] = 'GERRIT: ' + statList['people'][ownerEmail]['licenseText'] statList['reportList']['missing_license'].append(entry) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) New commits: commit f1660f3eba03df1f3ce70b04eca32787748d564e Author: ShinnokDate: Sat Dec 16 12:53:39 2017 +0100 Skip we-miss-you mails to company/org entities. By cross-referencing with domain-map before deciding whether to send or not. Change-Id: I89bb75be3b6a206253882b106d96544b3b669ec9 Reviewed-on: https://gerrit.libreoffice.org/46595 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 5dc41df..f3de599 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -71,10 +71,13 @@ def util_errorMail(text): os.system(sendMail) -def util_load_file(fileName): +def util_load_file(fileName, isJson=True): try: fp = open(fileName, encoding='utf-8') - rawData = json.load(fp) + if(isJson): +rawData = json.load(fp) + else: +rawData = fp.readlines() fp.close() except Exception as e: print('Error load file ' + fileName + ' due to ' + str(e)) @@ -592,6 +595,20 @@ def analyze_esc(): statList['data']['esc']['crashreport'] = crashData['crashreport']['versions'] +def util_is_company_license(email): +domainMap = util_load_file(cfg['homedir'] + 'gitdm-config/domain-map', False) +for line in domainMap: + line = line[:-1] + if line.startswith('#') or line.startswith(' ') or len(line) == 0: +continue + domain = line + if '\t' in domain: +domain = line[:line.index('\t')] + else: +domain = line[:line.index(' ')] + if email.endswith(domain): +return True +return False def analyze_reports(): global cfg, statList, openhubData, bugzillaData, gerritData, gitData, automateData @@ -624,7 +641,10 @@ def analyze_reports(): for id, row in statList['people'].items(): entry = {'name': row['name'], 'email': id, 'license': row['licenseText']} - if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate'] and id not in automateData['reminder']: + if row['newestCommit'] > mailedDate\ + and row['newestCommit'] < cfg['3monthDate']\ + and id not in automateData['reminder']\ + and not util_is_company_license(entry['email']): automateList['mail']['we_miss_you_email'][entry['email']] = entry['name'] automateData['reminder'][id] = automateNow x = row['commits']['1month']['owner'] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit bc83c974098dd2d3e0ddc35f6582e85273e38f51 Author: ShinnokDate: Thu Dec 7 13:18:41 2017 +0100 Soft warn for licensing issues instead of aborting. Change-Id: Ieb3af5b7ca153c3110902c21100424246ac46290 Reviewed-on: https://gerrit.libreoffice.org/46026 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index ff83356..5dc41df 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -860,9 +860,9 @@ def runLoadCSV(): # check consistency for i in statList['aliases']: if i in licencePersonalData: - raise Exception('alias ' + i + ' in aliases is licensed') + print('alias ' + i + ' in aliases is licensed') elif statList['aliases'][i] not in licencePersonalData: - raise Exception('target ' + statList['aliases'][i] + ' for alias ' + i + ' in aliases is NOT licensed') + print('target ' + statList['aliases'][i] + ' for alias ' + i + ' in aliases is NOT licensed') # create base people info for id, row in licencePersonalData.items(): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |4 ++-- esc-reporting/esc-automate.py |4 ++-- esc-reporting/esc-collect.py |2 +- esc-reporting/esc-report.py |4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 598368cdb35e886896a61ac7f3db7efc1c4f9432 Author: ShinnokDate: Tue Oct 31 15:37:56 2017 +0100 Change to: address for mentoring e-mails. From mentor...@libreoffice.org to mentor...@documentfoundation.org. Change-Id: I71e091f5d9950f5f0d9c6f3c27b0c30f41a02b80 Reviewed-on: https://gerrit.libreoffice.org/44123 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 458178e..ff83356 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -59,7 +59,7 @@ import re def util_errorMail(text): print(text) -sendMail = 'mail -r mentor...@libreoffice.org ' + cfg['mail']['bcc'] + ' -s "ERROR: esc-analyze FAILED" mentor...@libreoffice.org <
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |7 --- 1 file changed, 7 deletions(-) New commits: commit 252dd394b1df99035c80a3b3da9c53dac3bdaf86 Author: Xisco FauliDate: Mon Sep 18 10:43:28 2017 +0200 This code changes things in Bugzilla on my behalf and I don't like it. Removing it. The assigned issues are already covered by qa-tools diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 756de84..458178e 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -615,10 +615,7 @@ def analyze_reports(): automateList['gerrit']['to_abandon_abandon'] = {} automateList['gerrit']['to_abandon_comment'] = {} automateList['gerrit']['to_review'] = {} -automateList['bugzilla']['assign_problem_status'] = {} -automateList['bugzilla']['assign_problem_user'] = {} automateList['bugzilla']['missing_cc'] = {} -automateList['bugzilla']['missing_ui_cc'] = {} automateList['bugzilla']['remove_cc'] = {} automateList['bugzilla']['to_unassign_comment'] = {} automateList['bugzilla']['to_unassign_unassign'] = {} @@ -750,10 +747,6 @@ def analyze_reports(): automateList['bugzilla']['to_unassign_unassign'][key]= 0 else: automateList['bugzilla']['to_unassign_comment'][key] = 0 - if row['status'] == 'ASSIGNED' and (row['assigned_to'] == '' or row['assigned_to'] == 'libreoffice-b...@lists.freedesktop.org'): -automateList['bugzilla']['assign_problem_status'][key] = 0 - if row['status'] != 'CLOSED' and row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-b...@lists.freedesktop.org': - automateList['bugzilla']['assign_problem_user'][key] = 0 if len(row['comments']) >= 5: statList['reportList']['too_many_comments'].append(key) if not 'mentor...@documentfoundation.org' in row['cc']: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c6f4bee1b1175126d1dbd50cb48a2d1292c8294d Author: ShinnokDate: Wed Sep 13 13:01:38 2017 +0200 Fix spelling for gerritReviewUserEmail. Change-Id: I0d7743fce11e9a7efd6383e78ed64f3ff91ccfba Reviewed-on: https://gerrit.libreoffice.org/42237 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index fb8edf1..73744e7 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -693,7 +693,7 @@ def analyze_reports(): if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: tmpListToReview.append({'id': entry['id'], 'fullid': entry['fullid'], 'patchset': patchset}) -defaultEmail = util_check_mail('', cfg['automate']['gerritRewiewUserEmail']) +defaultEmail = util_check_mail('', cfg['automate']['gerritReviewUserEmail']) for rowTmp in tmpListToReview: reviewEmail = defaultEmail txt = gerritData['patch'][rowTmp['id']]['subject'] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 27ff1e7b74d47cb2ce6e8384b92f2fba9db1c9df Author: ShinnokDate: Wed Sep 13 13:18:10 2017 +0200 Update mentor e-mail. Change-Id: I42afa6d783d5a9fd41b5929ca086fb6f04d9ea0e Reviewed-on: https://gerrit.libreoffice.org/42238 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index b9f2bab..fb8edf1 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -305,7 +305,7 @@ def analyze_mentoring(): statList['people'][mail]['gerrit']['reviewName'] = '{} <{}>'.format(row['name'],row['email']) statList['people'][mail]['isCommitter'] = True statList['people'][mail]['isContributor'] = True -x1 = statList['people']['t...@openoffice.org'] +x1 = statList['people']['ad...@shinnok.com'] statNewDate = cfg['1yearDate'] statOldDate = cfg['nowDate'] for key, row in gerritData['patch'].items(): @@ -706,7 +706,7 @@ def analyze_reports(): else: for comment in row['comments']: email = util_check_mail('', comment['creator']) - if not email == 'aniste...@gmail.com' and not email == 'j...@documentfoundation.org' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: + if not email == 'aniste...@gmail.com' and not email == 'ad...@shinnok.com' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: reviewEmail = email break except Exception as e: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |4 +++- esc-reporting/esc-report.py |7 +-- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit e9f5ef47fc6529aab821f0413fb0dfce16355e7e Author: Xisco FauliDate: Fri Sep 8 19:26:46 2017 +0200 Add android to the unconfirmed list diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index fbe22fe..b9f2bab 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -231,7 +231,7 @@ def util_create_statList(): 'needsUXEval' : 0, 'topicUI': 0}, 'qa': {'unconfirmed': {'count': 0, 'documentation': 0, 'enhancement': 0, 'needsUXEval': 0, -'haveBacktrace': 0, 'needsDevAdvice': 0}}, + 'haveBacktrace': 0, 'needsDevAdvice': 0, 'android': 0}}, 'easyhacks' : {'needsDevEval': 0, 'needsUXEval': 0, 'cleanup_comments': 0, 'total': 0, 'assigned': 0, 'open': 0}, 'esc': {}}, @@ -469,6 +469,8 @@ def analyze_qa(): statList['data']['qa']['unconfirmed']['enhancement'] += 1 if row['component'] == 'Documentation': statList['data']['qa']['unconfirmed']['documentation'] += 1 + if row['component'] == 'Android app' or row['component'] == 'Android Viewer': +statList['data']['qa']['unconfirmed']['android'] += 1 util_build_period_stat(creationDate, email, 'qa', 'owner') diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 61d229a..5850bd6 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -547,7 +547,8 @@ def report_qa(): "+ needsUXEval: {} ({:+d})\n" \ "+ haveBackTrace: {} ({:+d})\n" \ "+ needsDevAdvice: {} ({:+d})\n" \ -"+ documentation: {} ({:+d})\n".format( +"+ documentation: {} ({:+d})\n" \ +"+ android: {} ({:+d})\n".format( statList['data']['qa']['unconfirmed']['count'], statList['diff']['qa']['unconfirmed']['count'], statList['data']['qa']['unconfirmed']['enhancement'], @@ -559,7 +560,9 @@ def report_qa(): statList['data']['qa']['unconfirmed']['needsDevAdvice'], statList['diff']['qa']['unconfirmed']['needsDevAdvice'], statList['data']['qa']['unconfirmed']['documentation'], -statList['diff']['qa']['unconfirmed']['documentation']) +statList['diff']['qa']['unconfirmed']['documentation'], +statList['data']['qa']['unconfirmed']['android'], +statList['diff']['qa']['unconfirmed']['android']) print(text, file=fp) print(text, file=fpESC) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 14 +- esc-reporting/esc-automate.py |8 esc-reporting/esc-collect.py | 14 +++--- esc-reporting/esc-report.py |4 ++-- 4 files changed, 22 insertions(+), 18 deletions(-) New commits: commit e0e308bd703b326c47556ab1027167c848a0abb9 Author: ShinnokDate: Tue Sep 5 12:09:01 2017 +0200 Backport Cloph's fixes in /usr/local/bin. Fixes issues with gerrit CLI not being able to interpret full change IDs and adds support for BCC to sent e-mails. Change-Id: I95b9c1578a01e62af7f3c767bc9d982eeaebc19c Reviewed-on: https://gerrit.libreoffice.org/41989 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e0048ce..fbe22fe 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -59,7 +59,7 @@ import re def util_errorMail(text): print(text) -sendMail = 'mail -r mentor...@libreoffice.org -s "ERROR: esc-analyze FAILED" mentor...@libreoffice.org <
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 -- 1 file changed, 2 deletions(-) New commits: commit 976ac822a962f99aa32962ada0adf2aa089e0cb2 Author: Xisco FauliDate: Mon Jun 26 12:24:43 2017 +0200 This annoys the UX team diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index b022a43..e0048ce 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -727,8 +727,6 @@ def analyze_reports(): statList['reportList']['needsDevEval'].append(key) 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']: -automateList['bugzilla']['missing_ui_cc'][key]= 0 if row['status'] == 'NEEDINFO': statList['reportList']['needinfo'].append(key) elif row['status'] == 'ASSIGNED': ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 718cf68abe7cc59e5dc8d001412a2121a95f1635 Author: jan IversenDate: Thu May 18 16:34:28 2017 +0200 esc-report, reinstate try/Except for run_final diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 6923552..de7ec26 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -931,11 +931,11 @@ def runAnalyze(): except Exception as e: print('ERROR: analyze_reports failed with ' + str(e)) pass -#try: -analyze_final() -#except Exception as e: -# print('ERROR: analyze_final failed with ' + str(e)) -# pass +try: + analyze_final() +except Exception as e: + print('ERROR: analyze_final failed with ' + str(e)) + pass def runUpgrade(args): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) New commits: commit 014861ed6b999ef0ea3684ac5debcd2cafc72005 Author: jan IversenDate: Thu May 18 16:31:05 2017 +0200 esc-report: QAstat problem, user was int diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 3c9587c..6923552 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -3,6 +3,7 @@ # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public +# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # @@ -489,9 +490,9 @@ def analyze_esc(): 'top15_reporters' : {}, 'top15_fixers' : []} for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_closers']: - statList['escList']['QAstat']['top15_squashers'][line['who']] = line['closed'] + statList['escList']['QAstat']['top15_squashers'][str(line['who'])] = line['closed'] for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_reporters']: - statList['escList']['QAstat']['top15_reporters'][line['who']] = line['reported'] + statList['escList']['QAstat']['top15_reporters'][str(line['who'])] = line['reported'] statList['escList']['MostPressingBugs'] = {'open': {'list': {}}, 'closed': {'list': {}}} for type in 'open', 'closed': statList['escList']['MostPressingBugs'][type]['count'] = bugzillaESCData['MostPressingBugs'][type]['count'] @@ -528,7 +529,7 @@ def analyze_esc(): who = statList['people'][who]['name'] if not who in bug_fixers: bug_fixers[who] = 0 - bug_fixers[who] += 1 + bug_fixers[str(who)] += 1 statList['escList']['QAstat']['top15_fixers'] = bug_fixers for id, row in bugzillaESCData['ESC_MAB_UPDATE'].items(): @@ -930,11 +931,11 @@ def runAnalyze(): except Exception as e: print('ERROR: analyze_reports failed with ' + str(e)) pass -try: - analyze_final() -except Exception as e: - print('ERROR: analyze_final failed with ' + str(e)) - pass +#try: +analyze_final() +#except Exception as e: +# print('ERROR: analyze_final failed with ' + str(e)) +# pass def runUpgrade(args): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) New commits: commit e34ecb4ee5fc3d4db6c3da931df3ddd668bccec5 Author: jan IversenDate: Wed May 17 18:36:54 2017 +0200 esc-report, gerrit set-reviewer also need patchset diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 50406a3..3c9587c 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -655,25 +655,26 @@ def analyze_reports(): doBlock = True if x['email'] != ownerEmail and x['email'] != 'c...@libreoffice.org': cntReview += 1 + +x = len(row['messages']) - 1 +if x >= 0: + patchset = row['messages'][x]['_revision_number'] + txt = row['messages'][x]['message'] +else: + patchset = 1 + txt = '' if xDate < cfg['1monthDate'] and not doBlock: - x = len(row['messages'])-1 - if x >= 0: -patchset = row['messages'][x]['_revision_number'] -txt = row['messages'][x]['message'] - else: -patchset = 1 -txt = '' if 'A polite ping' in txt: automateList['gerrit']['to_abandon_abandon'][entry['id']] = patchset else: automateList['gerrit']['to_abandon_comment'][entry['id']] = patchset if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: -tmpListToReview.append(entry['id']) +tmpListToReview.append({'id': entry['id'], 'patchset': patchset}) defaultEmail = util_check_mail('', cfg['automate']['gerritRewiewUserEmail']) -for id in tmpListToReview: +for rowTmp in tmpListToReview: reviewEmail = defaultEmail - txt = gerritData['patch'][id]['subject'] + txt = gerritData['patch'][rowTmp['id']]['subject'] if txt.startswith('tdf#'): try: row = bugzillaData['bugs'][re.findall('\d+', txt)[0]] @@ -688,7 +689,8 @@ def analyze_reports(): break except Exception as e: pass - automateList['gerrit']['to_review'][id] = statList['people'][reviewEmail]['gerrit']['reviewName'] + automateList['gerrit']['to_review'][rowTmp['id']] = {'name': statList['people'][reviewEmail]['gerrit']['reviewName'], + 'patchset': rowTmp['patchset']} for key, row in bugzillaData['bugs'].items(): if not 'cc' in row: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit 1e684252316414a5c4d4d915b1105586c56ab143 Author: jan IversenDate: Wed May 17 13:58:13 2017 +0200 esc-report, gerrit ssh needs patchset and not just id diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 7680be1..50406a3 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -656,11 +656,17 @@ def analyze_reports(): if x['email'] != ownerEmail and x['email'] != 'c...@libreoffice.org': cntReview += 1 if xDate < cfg['1monthDate'] and not doBlock: - txt = row['messages'][len(row['messages'])-1] + x = len(row['messages'])-1 + if x >= 0: +patchset = row['messages'][x]['_revision_number'] +txt = row['messages'][x]['message'] + else: +patchset = 1 +txt = '' if 'A polite ping' in txt: -automateList['gerrit']['to_abandon_abandon'][entry['id']] = 0 +automateList['gerrit']['to_abandon_abandon'][entry['id']] = patchset else: -automateList['gerrit']['to_abandon_comment'][entry['id']] = 0 +automateList['gerrit']['to_abandon_comment'][entry['id']] = patchset if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: tmpListToReview.append(entry['id']) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 970abc0ae1ea75400352663fdbc416f38babc405 Author: jan IversenDate: Mon May 15 07:42:13 2017 +0200 esc-report: not all committers have a gerrit account diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 0b45f70..7680be1 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -664,19 +664,20 @@ def analyze_reports(): if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: tmpListToReview.append(entry['id']) +defaultEmail = util_check_mail('', cfg['automate']['gerritRewiewUserEmail']) for id in tmpListToReview: - reviewEmail = util_check_mail('', cfg['automate']['gerritRewiewUserEmail']) + reviewEmail = defaultEmail txt = gerritData['patch'][id]['subject'] if txt.startswith('tdf#'): try: row = bugzillaData['bugs'][re.findall('\d+', txt)[0]] ownerEmail = util_check_mail(row['creator_detail']['name'], row['creator_detail']['email']) - if statList['people'][ownerEmail]['isCommitter']: + if 'reviewName' in statList['people'][ownerEmail]['gerrit']: reviewEmail = ownerEmail else: for comment in row['comments']: email = util_check_mail('', comment['creator']) - if not email == 'aniste...@gmail.com' and not email == 'j...@documentfoundation.org' and statList['people'][email]['isCommitter']: + if not email == 'aniste...@gmail.com' and not email == 'j...@documentfoundation.org' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: reviewEmail = email break except Exception as e: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |1 + 1 file changed, 1 insertion(+) New commits: commit d5a17cac38809e9d1adbdbf82bd3701afa1eed2d Author: jan IversenDate: Sun May 14 17:53:29 2017 +0200 esc-report, add gerrit name as {name} <{email}> diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 15a17ce..f8b6a7c 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -286,6 +286,7 @@ def analyze_mentoring(): for row in gerritData['committers']: mail = util_check_mail(row['name'], row['email']) statList['people'][mail]['gerrit']['userName'] = row['username'] + statList['people'][mail]['gerrit']['reviewName'] = '{} <{}>'.format(row['name'],row['email']) statList['people'][mail]['isCommitter'] = True statList['people'][mail]['isContributor'] = True ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit c09c457f44106fba5aeb9289fd101d8fddf960b9 Author: jan IversenDate: Sun May 14 17:01:20 2017 +0200 esc-report, no reason to unassign closed bugs diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index a7a1666..15a17ce 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -589,6 +589,14 @@ def analyze_reports(): automateList['gerrit']['to_abandon_abandon'] = {} automateList['gerrit']['to_abandon_comment'] = {} automateList['gerrit']['to_review'] = {} +automateList['bugzilla']['assign_problem_status'] = {} +automateList['bugzilla']['assign_problem_user'] = {} +automateList['bugzilla']['missing_cc'] = {} +automateList['bugzilla']['missing_ui_cc'] = {} +automateList['bugzilla']['remove_cc'] = {} +automateList['bugzilla']['to_unassign_comment'] = {} +automateList['bugzilla']['to_unassign_unassign'] = {} + automateNow = cfg['nowDate'].strftime("%Y-%m-%d") for id, row in statList['people'].items(): @@ -706,8 +714,8 @@ def analyze_reports(): automateList['bugzilla']['to_unassign_comment'][key] = 0 if row['status'] == 'ASSIGNED' and (row['assigned_to'] == '' or row['assigned_to'] == 'libreoffice-b...@lists.freedesktop.org'): automateList['bugzilla']['assign_problem_status'][key] = 0 - if row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-b...@lists.freedesktop.org': -automateList['bugzilla']['assign_problem_user'][key] = 0 + if row['status'] != 'CLOSED' and row['status'] != 'ASSIGNED' and row['assigned_to'] != '' and row['assigned_to'] != 'libreoffice-b...@lists.freedesktop.org': + automateList['bugzilla']['assign_problem_user'][key] = 0 if len(row['comments']) >= 5: statList['reportList']['too_many_comments'].append(key) if not 'mentor...@documentfoundation.org' in row['cc']: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |3 +++ 1 file changed, 3 insertions(+) New commits: commit 68fdd507715064906ebe06b8b334d3384adcc45c Author: jan IversenDate: Sun May 14 12:23:15 2017 +0200 esc-report, gerrit automation does not have history diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index ccb9674..a7a1666 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -586,6 +586,9 @@ def analyze_reports(): 'top10review': []} fileAutomate = cfg['homedir'] + 'automateTODO.json' automateList = util_load_data_file(fileAutomate) +automateList['gerrit']['to_abandon_abandon'] = {} +automateList['gerrit']['to_abandon_comment'] = {} +automateList['gerrit']['to_review'] = {} automateNow = cfg['nowDate'].strftime("%Y-%m-%d") for id, row in statList['people'].items(): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 95b20c15ff144c9a32f63cc41765da8668b7fce0 Author: jan IversenDate: Sat May 13 14:29:47 2017 +0200 esc-report, jani@docu is not a valid reviewer diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 0099c04..ccb9674 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -664,7 +664,7 @@ def analyze_reports(): else: for comment in row['comments']: email = util_check_mail('', comment['creator']) - if not email == 'aniste...@gmail.com' and statList['people'][email]['isCommitter']: + if not email == 'aniste...@gmail.com' and not email == 'j...@documentfoundation.org' and statList['people'][email]['isCommitter']: reviewEmail = email break except Exception as e: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py
esc-reporting/esc-analyze.py | 84 --- esc-reporting/esc-collect.py |5 -- 2 files changed, 48 insertions(+), 41 deletions(-) New commits: commit bd28c82971e3c988c2fc10b7cd2f72956863ddab Author: jan IversenDate: Sat May 13 13:56:49 2017 +0200 esc-report, combined configs, roundtrip automate diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e1bd93a..0099c04 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -222,8 +222,7 @@ def util_create_statList(): 'stat': {'openhub_last_analyse': "2001-01-01"}, 'people': {}, 'escList': {}, - 'reportList': {}, - 'automateList': {'bugzilla': {}, 'gerrit': {}, 'mail': {}}} + 'reportList': {}} @@ -569,10 +568,10 @@ def analyze_esc(): def analyze_reports(): -global cfg, statList, openhubData, bugzillaData, gerritData, gitData +global cfg, statList, openhubData, bugzillaData, gerritData, gitData, automateData print("reports: analyze", flush=True) -mailedDate = datetime.datetime.strptime(cfg['automate']['last-mail-run'], '%Y-%m-%d') - datetime.timedelta(days=90) +mailedDate = cfg['3monthDate'] - datetime.timedelta(days=90) zeroDate = datetime.datetime(year=2001, month=1, day=1) statList['reportList'] = {'award_1st_email': [], 'pending_license': [], @@ -585,29 +584,38 @@ def analyze_reports(): 'too_many_comments': [], 'top10commit': [], 'top10review': []} -statList['automateList']['gerrit'] = {'to_abandon_comment': [], - 'to_abandon_abandon': [], - 'to_review': []} -statList['automateList']['bugzilla'] = {'missing_ui_cc': [], -'to_unassign_comment': [], -'to_unassign_unassign': [], -'missing_cc': [], -'assign_problem_status': [], -'assign_problem_user': [], -'remove_cc': []} -statList['automateList']['mail'] = {'we_miss_you_email': [], -'award_1st_email': []} +fileAutomate = cfg['homedir'] + 'automateTODO.json' +automateList = util_load_data_file(fileAutomate) +automateNow = cfg['nowDate'].strftime("%Y-%m-%d") for id, row in statList['people'].items(): entry = {'name': row['name'], 'email': id, 'license': row['licenseText']} - if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate']: -statList['automateList']['mail']['we_miss_you_email'].append(entry) + if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate'] and id not in automateData['reminder']: +automateList['mail']['we_miss_you_email'][entry['email']] = entry['name'] +automateData['reminder'][id] = automateNow x = row['commits']['1month']['owner'] - if x != 0 and row['commits']['total'] == x and not id in cfg['award-mailed']: - statList['reportList']['award_1st_email'].append(entry) - statList['automateList']['mail']['award_1st_email'].append(entry) + if x != 0 and row['commits']['total'] == x and not id in automateData['award']: + automateList['mail']['award_1st_email'][entry['email']] = entry['name'] + automateData['award'][entry['email']] = automateNow if row['licenseText'].startswith('PENDING'): statList['reportList']['pending_license'].append(entry) +delList = [] +for id, xTime in automateData['reminder'].items(): + x = datetime.datetime.strptime(xTime, '%Y-%m-%d') + if x < cfg['3monthDate']: +delList.append(id) +for id in delList: + del automateData['reminder'][id] +delList = [] +for id, xTime in automateData['award'].items(): + x = datetime.datetime.strptime(xTime, '%Y-%m-%d') + if x > cfg['1weekDate']: +entry = {'name': statList['people'][id]['name'], 'email': id, 'license': statList['people'][id]['licenseText']} +statList['reportList']['award_1st_email'].append(entry) + if x < cfg['1monthDate']: +delList.append(id) +for id in delList: + del automateData['award'][id] tmpListToReview = [] for key,row in gerritData['patch'].items(): @@ -638,9 +646,9 @@ def analyze_reports(): if xDate < cfg['1monthDate'] and not doBlock: txt = row['messages'][len(row['messages'])-1] if 'A polite ping' in txt: - statList['automateList']['gerrit']['to_abandon_abandon'].append(entry['id']) +
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |1 + esc-reporting/esc-collect.py |3 +-- esc-reporting/esc-report.py |9 - 3 files changed, 10 insertions(+), 3 deletions(-) New commits: commit 59f126a82eb207ee57f3b0d1ebca1456276673d0 Author: jan IversenDate: Fri May 12 19:35:34 2017 +0200 esc-report, added crashreport diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 5977a65..e1bd93a 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -564,6 +564,7 @@ def analyze_esc(): statList['data']['esc']['crashtest'] = {'import': crashData['crashtest']['crashlog'], 'export': crashData['crashtest']['exportCrash']} +statList['data']['esc']['crashreport'] = crashData['crashreport']['versions'] diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index 74c1883..bd00450 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -679,8 +679,7 @@ def get_crash(cfg): rawList['crashtest'][type] = len(tmp) -1 print("Updating crashreport dump") -print(".talk with moggi, about REST API") - +rawList['crashreport'] = util_load_url('http://crashreport.libreoffice.org/api/get/crash-count') rawList['newest-entry'] = datetime.datetime.now().strftime('%Y-%m-%d %H') util_dump_file(fileName, rawList) diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index fc2c1f6..a209868 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -315,6 +315,13 @@ def report_esc_prototype(): statList['data']['esc']['crashtest']['export'], statList['diff']['esc']['crashtest']['export']) escPrototype = escPrototype.replace('$', txt) +txt = '' +for id in sorted(statList['data']['esc']['crashreport']): +txt += '+ {}{}({:+d})\n'.format(id, +statList['data']['esc']['crashreport'][id], +statList['diff']['esc']['crashreport'][id]) +escPrototype = escPrototype.replace('$', txt) + fp = open('/tmp/esc_prototype_report.txt', 'w', encoding='utf-8') print('ESC prototype report, generated {} based on stats.json from {}\n\n\n'.format( datetime.datetime.now().strftime("%Y-%m-%d"), statList['addDate']), file=fp) @@ -509,7 +516,7 @@ def report_ui(): print(' {} made {} changes in 1 month, and {} changes in 1 year'.format( top10list[i]['name'], top10list[i]['month'], top10list[i]['year']), file=fp) fp.close() -return {'title': 'ESC UI report', 'mail': 'tietze.he...@gmail.com', 'file': '/tmp/esc_prototype_report.txt'} +return {'title': 'ESC UI report', 'mail': 'tietze.he...@gmail.com', 'file': '/tmp/esc_ui_report.txt'} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py
esc-reporting/esc-analyze.py |2 +- esc-reporting/esc-automate.py | 36 +--- 2 files changed, 18 insertions(+), 20 deletions(-) New commits: commit 60f2b14855a297f2e6a491f3dded6d73d20d6ad7 Author: jan IversenDate: Tue May 9 19:41:21 2017 +0200 esc-report, added config for automation diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 2dc178e..5977a65 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -644,7 +644,7 @@ def analyze_reports(): tmpListToReview.append(entry['id']) for id in tmpListToReview: - reviewEmail = '' + reviewEmail = cfg['automate']['gerritRewiewUserEmail'] txt = gerritData['patch'][id]['subject'] if txt.startswith('tdf#'): try: diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py index e1ee553..f101d22 100755 --- a/esc-reporting/esc-automate.py +++ b/esc-reporting/esc-automate.py @@ -86,29 +86,27 @@ def handle_bugzilla_cc(id, email): def handle_mail_pdf(name, email): -global mail_pdf_index +global cfg, mail_pdf_index mail_pdf_index += 1 -return {'title': 'x', 'mail': 'mentor...@documentfoundation.org', 'attach': 'x', 'file' : '/tmp/x'} +fileName = '/tmp/esc_pdf_' + str(mail_pdf_index) +fp = open(fileName, 'w') +print(cfg['automate']['1st award']['content'], file=fp) +fp.close() +return {'title': cfg['automate']['1st award']['subject'], 'mail': 'mentor...@documentfoundation.org', 'attach': 'x', 'file' : fileName} def handle_mail_miss_you(name, email): -global mail_miss_you +global cfg, mail_miss_you mail_miss_you += 1 -fileName = '/tmp/esc_pdf_' + str(mail_miss_you) -fp = fopen(fileName, 'w') -print('Hi\n' \ - 'We have noticed you have not submitted patches to LibreOffice in a while. ' \ - 'LibreOffice depend on volunteers like you to keep the software growing.\n' \ - 'Volunteering is something most of us does in our spare time, so it is normal to have periods where you ' \ - 'want to concentrate on other items, we basically just wanted to say "we miss you".\n' \ - 'If you have problems or want to comment on issues, please do not hesitate to contact our development mentor.\n\n' \ - 'Thanks in advance\n' \ - 'the LibreOffice Development Team\n', file=fp) -fclose(fp) -return {'title': 'LibreOffice calling for help', 'mail': 'mentor...@documentfoundation.org', 'file': fileName } +fileName = '/tmp/esc_miss_' + str(mail_miss_you) +fp = open(fileName, 'w') +print(cfg['automate']['we miss you']['content'], file=fp) +fp.close() +return {'title': cfg['automate']['we miss you']['subject'], +'mail': 'mentor...@documentfoundation.org', 'file': fileName } @@ -144,13 +142,13 @@ def runAutomate(): try: for id in autoList['gerrit']['to_abandon_abandon']: -handle_gerrit_abandon(id, "Abandoning due to lack of work, be aware it can anytime be reopened if you want to continue working") +handle_gerrit_abandon(id, cfg['automate']['gerrit']['abandon']) except Exception as e: print('ERROR: handle_gerrit_abandon failed with ' + str(e)) pass try: for id in autoList['gerrit']['to_abandon_comment']: -handle_gerrit_comment(id, "A polite ping, still working on this patch") +handle_gerrit_comment(id, 'A polite ping, ' + cfg['automate']['gerrit']['comment']) except Exception as e: print('ERROR: handle_gerrit_comment failed with ' + str(e)) pass @@ -163,13 +161,13 @@ def runAutomate(): try: for id in autoList['bugzilla']['to_unassign_comment']: -handle_bugzilla_comment(id, "A polite ping, still working on this bug") +handle_bugzilla_comment(id, 'A polite ping, ' + cfg['automate']['bugzilla']['comment']) except Exception as e: print('ERROR: handle_bugzilla_comment failed with ' + str(e)) pass try: for id in autoList['bugzilla']['to_unassign_unassign']: -handle_bugzilla_unassign(id, "Unassigning due to lack of work, be aware it can anytime be assigned again if you want to continue working") +handle_bugzilla_unassign(id, cfg['automate']['bugzilla']['comment']) except Exception as e: print('ERROR: handle_bugzilla_unassign failed with ' + str(e)) pass ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py
esc-reporting/esc-analyze.py |2 +- esc-reporting/esc-automate.py | 25 +++-- 2 files changed, 24 insertions(+), 3 deletions(-) New commits: commit bbaeab07825aeedf3b2334f3b56e326d9ae86cbc Author: jan IversenDate: Tue May 9 18:17:49 2017 +0200 esc-report, add automate to config.json diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 1aa6c61..2dc178e 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -571,7 +571,7 @@ def analyze_reports(): global cfg, statList, openhubData, bugzillaData, gerritData, gitData print("reports: analyze", flush=True) -mailedDate = datetime.datetime.strptime(cfg['git']['last-mail-run'], '%Y-%m-%d') - datetime.timedelta(days=90) +mailedDate = datetime.datetime.strptime(cfg['automate']['last-mail-run'], '%Y-%m-%d') - datetime.timedelta(days=90) zeroDate = datetime.datetime(year=2001, month=1, day=1) statList['reportList'] = {'award_1st_email': [], 'pending_license': [], diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py index ca6dfce..e1ee553 100755 --- a/esc-reporting/esc-automate.py +++ b/esc-reporting/esc-automate.py @@ -86,12 +86,29 @@ def handle_bugzilla_cc(id, email): def handle_mail_pdf(name, email): -return +global mail_pdf_index + +mail_pdf_index += 1 +return {'title': 'x', 'mail': 'mentor...@documentfoundation.org', 'attach': 'x', 'file' : '/tmp/x'} def handle_mail_miss_you(name, email): -return +global mail_miss_you + +mail_miss_you += 1 +fileName = '/tmp/esc_pdf_' + str(mail_miss_you) +fp = fopen(fileName, 'w') +print('Hi\n' \ + 'We have noticed you have not submitted patches to LibreOffice in a while. ' \ + 'LibreOffice depend on volunteers like you to keep the software growing.\n' \ + 'Volunteering is something most of us does in our spare time, so it is normal to have periods where you ' \ + 'want to concentrate on other items, we basically just wanted to say "we miss you".\n' \ + 'If you have problems or want to comment on issues, please do not hesitate to contact our development mentor.\n\n' \ + 'Thanks in advance\n' \ + 'the LibreOffice Development Team\n', file=fp) +fclose(fp) +return {'title': 'LibreOffice calling for help', 'mail': 'mentor...@documentfoundation.org', 'file': fileName } @@ -120,6 +137,8 @@ def runCfg(platform): def runAutomate(): global cfg, autoList +global mail_pdf_index, mail_miss_you + autoList = util_load_data_file(cfg['homedir'] + 'stats.json')['automateList'] @@ -180,6 +199,8 @@ def runAutomate(): pass xMail = [] +mail_pdf_index = 0 +mail_miss_you = 0 try: for row in autoList['mail']['award_1st_email']: x = handle_mail_pdf(row['name'], row['email']) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py
esc-reporting/esc-analyze.py | 29 +++-- esc-reporting/esc-automate.py | 133 ++ 2 files changed, 133 insertions(+), 29 deletions(-) New commits: commit e6279b32170c718e08b53f60c74bb733bed3643f Author: jan IversenDate: Tue May 9 17:02:20 2017 +0200 esc-report, control part of automate and update of data diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 081aaca..1aa6c61 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -52,6 +52,7 @@ import operator import datetime import json import xmltodict +import re def util_load_file(fileName): @@ -595,7 +596,7 @@ def analyze_reports(): 'remove_cc': []} statList['automateList']['mail'] = {'we_miss_you_email': [], 'award_1st_email': []} - + for id, row in statList['people'].items(): entry = {'name': row['name'], 'email': id, 'license': row['licenseText']} if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate']: @@ -607,6 +608,7 @@ def analyze_reports(): if row['licenseText'].startswith('PENDING'): statList['reportList']['pending_license'].append(entry) +tmpListToReview = [] for key,row in gerritData['patch'].items(): if row['status'] == 'SUBMITTED' or row['status'] == 'DRAFT': row['status'] = 'NEW' @@ -635,11 +637,30 @@ def analyze_reports(): if xDate < cfg['1monthDate'] and not doBlock: txt = row['messages'][len(row['messages'])-1] if 'A polite ping' in txt: - statList['automateList']['gerrit']['to_abandon_abandon'].append(entry) + statList['automateList']['gerrit']['to_abandon_abandon'].append(entry['id']) else: - statList['automateList']['gerrit']['to_abandon_comment'].append(entry) + statList['automateList']['gerrit']['to_abandon_comment'].append(entry['id']) if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: - statList['automateList']['gerrit']['to_review'].append(entry) +tmpListToReview.append(entry['id']) + +for id in tmpListToReview: + reviewEmail = '' + txt = gerritData['patch'][id]['subject'] + if txt.startswith('tdf#'): +try: + row = bugzillaData['bugs'][re.findall('\d+', txt)[0]] + ownerEmail = util_check_mail(row['creator_detail']['name'], row['creator_detail']['email']) + if statList['people'][ownerEmail]['isCommitter']: +reviewEmail = ownerEmail + else: +for comment in row['comments']: + email = util_check_mail('', comment['creator']) + if not email == 'aniste...@gmail.com' and statList['people'][email]['isCommitter']: +reviewEmail = email +break +except Exception as e: + pass + statList['automateList']['gerrit']['to_review'].append({'id': id, 'email': reviewEmail}) for key, row in bugzillaData['bugs'].items(): if not 'cc' in row: diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py index e8cb77f..ca6dfce 100755 --- a/esc-reporting/esc-automate.py +++ b/esc-reporting/esc-automate.py @@ -50,6 +50,48 @@ def util_dump_file(fileName, rawList): exit(-1) +def handle_gerrit_abandon(id, text): +return + + + +def handle_gerrit_comment(id, text): +return + + + +def handle_gerrit_review(id, email): +return + + + +def handle_bugzilla_comment(id, text): +return + + + +def handle_bugzilla_unassign(id, text): +return + + + +def handle_bugzilla_reset_status(id): +return + + + +def handle_bugzilla_cc(id, email): +return + + + +def handle_mail_pdf(name, email): +return + + + +def handle_mail_miss_you(name, email): +return @@ -81,37 +123,78 @@ def runAutomate(): autoList = util_load_data_file(cfg['homedir'] + 'stats.json')['automateList'] -# analyze test for: -# "A polite ping" - -# gerrit non-committer patches > 4 weeks: overdue review / poking reminders --> "to_abandon_comment" -# gerrit patches > extra 4 weeks: auto-abandon if no comments / changes. --> "to_abandon_abandon" -# gerrit patches from non-committers, add reviewer --> "to_review" -# bugzilla: easy-hacks: un-assign those un-touched for 4 weeks to de-conflict --> "to_unassign_comment" "to_unassign_unassign" -# bugzilla extra: easy-hacks, check assign consistent --> "assign_problem_status" "assign_problem_user", -# bugzilla: checking mentoring@ is CC'd on all easy-hacks --> "missing_cc" -# bugzilla:checking UX team is CC'd on all UX hacks --> "missing_ui_cc" -# 1st patch award email auto-generate that --> "award_1st_email" -# "we miss you" email --> "we_miss_you_email" +try: + for id in
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py
esc-reporting/esc-analyze.py | 65 ++ esc-reporting/esc-automate.py | 13 2 files changed, 48 insertions(+), 30 deletions(-) New commits: commit 0f6c1576ec694642185ad7fd8a39ab7987838220 Author: jan IversenDate: Tue May 9 11:37:02 2017 +0200 esc-report, prepare data for automate diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 42c966e..081aaca 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': {'bugzilla': {}, 'gerrit': {}, 'pdf': {}}} + 'automateList': {'bugzilla': {}, 'gerrit': {}, 'mail': {}}} @@ -572,8 +572,7 @@ def analyze_reports(): print("reports: analyze", flush=True) mailedDate = datetime.datetime.strptime(cfg['git']['last-mail-run'], '%Y-%m-%d') - datetime.timedelta(days=90) zeroDate = datetime.datetime(year=2001, month=1, day=1) -statList['reportList'] = {'we_miss_you_email': [], - 'award_1st_email': [], +statList['reportList'] = {'award_1st_email': [], 'pending_license': [], 'missing_license': [], 'to_be_closed': [], @@ -584,21 +583,27 @@ def analyze_reports(): 'too_many_comments': [], 'top10commit': [], 'top10review': []} -automateList = {'to_abandon': [], -'to_review': [], -'missing_ui_cc': [], -'to_unassign': [], -'missing_cc': [], -'assign_problem': [], -'remove_cc': []} - +statList['automateList']['gerrit'] = {'to_abandon_comment': [], + 'to_abandon_abandon': [], + 'to_review': []} +statList['automateList']['bugzilla'] = {'missing_ui_cc': [], +'to_unassign_comment': [], +'to_unassign_unassign': [], +'missing_cc': [], +'assign_problem_status': [], +'assign_problem_user': [], +'remove_cc': []} +statList['automateList']['mail'] = {'we_miss_you_email': [], +'award_1st_email': []} + for id, row in statList['people'].items(): entry = {'name': row['name'], 'email': id, 'license': row['licenseText']} if row['newestCommit'] > mailedDate and row['newestCommit'] < cfg['3monthDate']: -statList['reportList']['we_miss_you_email'].append(entry) +statList['automateList']['mail']['we_miss_you_email'].append(entry) x = row['commits']['1month']['owner'] if x != 0 and row['commits']['total'] == x and not id in cfg['award-mailed']: statList['reportList']['award_1st_email'].append(entry) + statList['automateList']['mail']['award_1st_email'].append(entry) if row['licenseText'].startswith('PENDING'): statList['reportList']['pending_license'].append(entry) @@ -628,9 +633,13 @@ def analyze_reports(): if x['email'] != ownerEmail and x['email'] != 'c...@libreoffice.org': cntReview += 1 if xDate < cfg['1monthDate'] and not doBlock: - automateList['to_abandon'].append(entry) + txt = row['messages'][len(row['messages'])-1] + if 'A polite ping' in txt: + statList['automateList']['gerrit']['to_abandon_abandon'].append(entry) + else: + statList['automateList']['gerrit']['to_abandon_comment'].append(entry) if cntReview == 0 and not statList['people'][ownerEmail]['isCommitter']: - automateList['to_review'].append(entry) + statList['automateList']['gerrit']['to_review'].append(entry) for key, row in bugzillaData['bugs'].items(): if not 'cc' in row: @@ -643,7 +652,7 @@ def analyze_reports(): if not 'easyHack' in row['keywords']: if 'mentoring' in row['cc']: - automateList['remove_cc'].append(key) +statList['automateList']['bugzilla']['remove_cc'].append(key) continue if 'needsDevEval' in row['keywords']: @@ -651,20 +660,25 @@ 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']: - automateList['missing_ui_cc'].append(key) +
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 10 +++--- esc-reporting/esc-collect.py | 26 +++--- esc-reporting/esc-report.py |5 - 3 files changed, 18 insertions(+), 23 deletions(-) New commits: commit 21c25bb0bf6e26200bfdfc4a98f2eeb0e6fae792 Author: jan IversenDate: Sun May 7 21:12:36 2017 +0200 esc-report, added crashtest to esc-prototype diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 3f6bfd9..42c966e 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -477,7 +477,7 @@ def analyze_qa(): def analyze_esc(): -global cfg, statList, bugzillaData, bugzillaESCData, weekList +global cfg, statList, bugzillaData, bugzillaESCData, crashData, weekList print("esc: analyze bugzilla", flush=True) @@ -561,6 +561,8 @@ def analyze_esc(): for id, row in bugzillaESCData['ESC_COMPONENT_UPDATE']['os'].items(): statList['data']['esc']['component']['os'][id] = row['count'] +statList['data']['esc']['crashtest'] = {'import': crashData['crashtest']['crashlog'], +'export': crashData['crashtest']['exportCrash']} @@ -821,7 +823,7 @@ def loadCfg(platform): def runAnalyze(): -global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, weekList +global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList x = (cfg['nowDate'] - datetime.timedelta(days=7)).strftime('%Y-%m-%d') weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') @@ -831,6 +833,7 @@ def runAnalyze(): bugzillaESCData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_esc_dump.json') gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') +crashData = util_load_data_file(cfg['homedir'] + 'dump/crash_dump.json') statList = util_create_statList() try: runLoadCSV() @@ -875,7 +878,7 @@ def runAnalyze(): def runUpgrade(args): -global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, weekList +global cfg, statList, openhubData, bugzillaData, bugzillaESCData, gerritData, gitData, crashData, weekList args = args[1:] openhubData = util_load_data_file(cfg['homedir'] + 'dump/openhub_dump.json') @@ -883,6 +886,7 @@ def runUpgrade(args): bugzillaESCData = util_load_data_file(cfg['homedir'] + 'dump/bugzilla_esc_dump.json') gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') +crashData = util_load_data_file(cfg['homedir'] + 'dump/crash_dump.json') statList = util_create_statList() runLoadCSV() csvList = statList diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index 3a954c2..74c1883 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -662,9 +662,8 @@ def get_git(cfg): def get_crash(cfg): fileName = cfg['homedir'] + 'dump/crash_dump.json' -searchDate, rawList = util_load_data_file(cfg, fileName, 'crash', {'crashtest': {}, 'crashreport': {}}) - -print("Updating crashtest dump from " + rawList['newest-entry']) +rawList = {'crashtest': {}, 'crashreport': {}} +print("Updating crashtest dump") dirList = util_load_url('http://dev-builds.libreoffice.org/crashtest/?C=M;O=D', useRaw=True) inx = dirList.find('alt="[DIR]"', 0) if inx == -1: @@ -675,22 +674,11 @@ def get_crash(cfg): end = dirList.find('"', inx) url = 'http://dev-builds.libreoffice.org/crashtest/' + dirList[inx:end] -for type in 'exportCrashes', 'importCrash', 'validationErrors': -tmp = util_load_url(url + type + '.csv', useRaw=True).replace('\r', '').split('\n') -csv = [] -for line in tmp: -csv.append(line.split(',')) -for line in csv[1:]: -for inx, item in enumerate(line): -if item == '': - line[inx] = 0 -else: - line[inx] = int(item) -rawList['crashtest'][type] = {} -rawList['crashtest'][type]['title'] = csv[0] -rawList['crashtest'][type]['data'] = csv[1:] - -print("Updating crashreport dump from " + rawList['newest-entry']) +for type in 'crashlog', 'exportCrash': +tmp = util_load_url(url + type + '.txt', useRaw=True).split('\n') +rawList['crashtest'][type] = len(tmp) -1 + +print("Updating crashreport dump") print(".talk with moggi, about REST API") diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index e769c87..7d6d5a3 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -308,9 +308,12 @@ def report_esc_prototype(): txt += ' closed:\n' for id,
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-automate.py esc-reporting/esc-report.py
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 IversenDate: 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'], +
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 36 +++- esc-reporting/esc-report.py | 63 --- 2 files changed, 70 insertions(+), 29 deletions(-) New commits: commit 157afd3f53d28de0be5bdf728cc17db1d9213d98 Author: jan IversenDate: Sun May 7 11:13:50 2017 +0200 esc-report resiliance added to analyze/report too diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index dd7a457..f4fc753 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -688,14 +688,34 @@ def runAnalyze(): gerritData = util_load_data_file(cfg['homedir'] + 'dump/gerrit_dump.json') gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') statList = util_create_statList() -runLoadCSV() - -analyze_mentoring() -analyze_ui() -analyze_qa() -analyze_esc() -analyze_myfunc() -analyze_final() +try: + runLoadCSV() +except: + pass +try: + analyze_mentoring() +except: + pass +try: + analyze_ui() +except: + pass +try: + analyze_qa() +except: + pass +try: + analyze_esc() +except: + pass +try: + analyze_myfunc() +except: + pass +try: + analyze_final() +except: + pass def runUpgrade(args): diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index e45057c..2920470 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -897,27 +897,48 @@ def runReport(): gitData = util_load_data_file(cfg['homedir'] + 'dump/git_dump.json') xMail = [] -x = report_bug_metrics() -if not x is None: - xMail.append(x) -x = report_day_mentoring() -if not x is None: - xMail.append(x) -x = report_mentoring() -if not x is None: - xMail.append(x) -x = report_ui() -if not x is None: - xMail.append(x) -x = report_qa() -if not x is None: - xMail.append(x) -x = report_myfunc() -if not x is None: - xMail.append(x) -x = report_esc_prototype() -if not x is None: - xMail.append(x) +try: + x = report_bug_metrics() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_day_mentoring() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_mentoring() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_ui() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_qa() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_myfunc() + if not x is None: +xMail.append(x) +except: + pass +try: + x = report_esc_prototype() + if not x is None: +xMail.append(x) +except: + pass fp = open('/tmp/runMail', 'w', encoding='utf-8') print("#!/bin/bash", file=fp) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 118 - esc-reporting/esc-collect.py | 352 +++ esc-reporting/esc-report.py | 557 --- 3 files changed, 926 insertions(+), 101 deletions(-) New commits: commit 72959ef97eee9ad305726b422e7a97dd780fc51e Author: jan IversenDate: Tue Apr 25 11:31:08 2017 +0200 update to esc-report as pr contract. Added flatODF and ESC minutes. Solved problem with report_qa, that caused "done by" not to be correct diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 7957a9d..23d9d1a 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -216,9 +216,11 @@ def util_create_statList(): 'qa': {'unconfirmed': {'count': 0, 'documentation': 0, 'enhancement': 0, 'needsUXEval': 0, 'haveBacktrace': 0, 'needsDevAdvice': 0}}, 'easyhacks' : {'needsDevEval': 0, 'needsUXEval': 0, 'cleanup_comments': 0, -'total': 0, 'assigned': 0, 'open': 0}}, +'total': 0, 'assigned': 0, 'open': 0}, + 'esc': {}}, 'stat': {'openhub_last_analyse': "2001-01-01"}, - 'people': {}} + 'people': {}, + 'escList': {}} @@ -462,6 +464,87 @@ def analyze_qa(): if entry['added'] == 'FIXED' and row['resolution'] == 'FIXED': util_build_period_stat(xDate, email, 'qa', 'fixed') + + +def analyze_esc(): +global cfg, statList, bugzillaData, bugzillaESCData, weekList + +print("esc: analyze bugzilla", flush=True) + +statList['data']['esc']['QAstat'] = {'opened': bugzillaESCData['ESC_QA_STATS_UPDATE']['opened'], + 'closed': bugzillaESCData['ESC_QA_STATS_UPDATE']['closed']} +statList['data']['esc']['MAB'] = {} +statList['escList']['QAstat'] = {'top15_squashers' : {}, + 'top15_reporters' : {}, + 'top15_fixers' : []} +for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_closers']: + statList['escList']['QAstat']['top15_squashers'][line['who']] = line['closed'] +for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_reporters']: + statList['escList']['QAstat']['top15_reporters'][line['who']] = line['reported'] + +bug_fixers = {} +for id, bug in bugzillaData['bugs'].items(): + if not bug['status'] == 'RESOLVED': +continue + if 'FIXED' != bug['resolution'] != 'VERIFIED': +continue + if datetime.datetime.strptime(bug['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['1weekDate']: +continue + + who = None + for i in range(len(bug['history'])-1,-1,-1): +fixed = False +changes = bug['history'][i]['changes'] +for j in range(0,len(changes)): + if changes[j]['added'] == 'FIXED': +fixed = True +break +if fixed: + who = bug['history'][i]['who'].lower() + break + if not who: +continue + if who == 'libreoffice-comm...@lists.freedesktop.org': +continue + if who in statList['aliases']: +who = statList['aliases'][who] + if who in statList['people']: +who = statList['people'][who]['name'] + if not who in bug_fixers: +bug_fixers[who] = 0 + bug_fixers[who] += 1 +statList['escList']['QAstat']['top15_fixers'] = bug_fixers + +for id, row in bugzillaESCData['ESC_MAB_UPDATE'].items(): + statList['data']['esc']['MAB'][id] = row + statList['data']['esc']['MAB'][id]['%'] = int((row['open'] / row['total'])*100) + +statList['escList']['bisect'] = weekList['escList']['bisect'] +statList['escList']['bisect'].insert(0, [bugzillaESCData['ESC_BISECTED_UPDATE']['open'], + bugzillaESCData['ESC_BISECTED_UPDATE']['total']]) +del statList['escList']['bisect'][-1] +statList['escList']['bibisect'] = weekList['escList']['bibisect'] +statList['escList']['bibisect'].insert(0, [bugzillaESCData['ESC_BIBISECTED_UPDATE']['open'], + bugzillaESCData['ESC_BIBISECTED_UPDATE']['total']]) +del statList['escList']['bibisect'][-1] + +statList['data']['esc']['regression'] = {} +statList['data']['esc']['regression']['high'] = bugzillaESCData['ESC_REGRESSION_UPDATE']['high'] +statList['data']['esc']['regression']['open'] = bugzillaESCData['ESC_REGRESSION_UPDATE']['open'] +statList['data']['esc']['regression']['total'] = bugzillaESCData['ESC_REGRESSION_UPDATE']['total'] + +statList['data']['esc']['component'] = {} +statList['data']['esc']['component']['high'] = {} +for id, row in
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py esc-reporting/esc-tocsv.py
esc-reporting/esc-analyze.py |2 +- esc-reporting/esc-collect.py |2 +- esc-reporting/esc-report.py |2 +- esc-reporting/esc-tocsv.py |4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 61d05dd8bdac6c608adb7228ad9df0e3d38d5a62 Author: jan IversenDate: Tue Feb 14 11:34:23 2017 +0100 esc-mentoring removed jani diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index dd58527..7957a9d 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -564,7 +564,7 @@ def loadCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/jani/esc' + homeDir = '/home/esc-mentoring/esc' cfg = util_load_data_file(homeDir + '/config.json') cfg['homedir'] = homeDir + '/' cfg['platform'] = platform diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index 49aadb7..e75201e 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -283,7 +283,7 @@ def runCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/jani/esc' + homeDir = '/home/esc-mentoring/esc' cfg = util_load_file(homeDir + '/config.json') if cfg == None: exit(-1) diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index fa077e9..0e3c8d9 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -566,7 +566,7 @@ def runCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/jani/esc' + homeDir = '/home/esc-mentoring/esc' cfg = util_load_data_file(homeDir + '/config.json') cfg['homedir'] = homeDir + '/' cfg['platform'] = platform diff --git a/esc-reporting/esc-tocsv.py b/esc-reporting/esc-tocsv.py index 515d492..9048434 100755 --- a/esc-reporting/esc-tocsv.py +++ b/esc-reporting/esc-tocsv.py @@ -53,7 +53,7 @@ def runCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/jani/esc' + homeDir = '/home/esc-mentoring/esc' cfg = util_load_data_file(homeDir + '/config.json') cfg['homedir'] = homeDir + '/' cfg['platform'] = platform @@ -203,7 +203,7 @@ def loadWeekGenerateCSV(argv): csv['gerrit']['contributor']['merged']['sum'][i] += csv['gerrit']['contributor']['merged']['sum'][i-1] csv['gerrit']['contributor']['merged']['avg'][i] = int(csv['gerrit']['contributor']['merged']['sum'][i] / i) -with open('/Users/jani/TMPesc.csv', 'w') as fp: +with open('/Users/esc-mentoring/TMPesc.csv', 'w') as fp: print('Mentoring 2016;', file=fp) print('', file=fp) print('origin;type;art;', end='', file=fp) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 ++ 1 file changed, 2 insertions(+) New commits: commit bd5992e381753f11164c38cdac70970e98b09f52 Author: jan IversenDate: Tue Jan 31 13:11:39 2017 +0100 esc-mentoring, update to match change in aliases. The new aliases can contain # lines for comment skipping these lines. diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 2921beb..dd58527 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -74,6 +74,8 @@ def util_load_csv(fileName, split): line = line[:-1] if len(line) == 0: continue +if line[0] == '#': + continue x = line.split(split) if split == ';' and len(x) != 3: raise Exception('misformed entry ' + line + ' in filename ' + fileName) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |4 +++- esc-reporting/esc-report.py |6 -- 2 files changed, 7 insertions(+), 3 deletions(-) New commits: commit 1965fe9f9cdd599a341b3e7c9bd498c058c06953 Author: Xisco FauliDate: Tue Jan 24 18:38:41 2017 +0100 Add documentation to unconfirmed list diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 76daab7..2921beb 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -211,7 +211,7 @@ def util_create_statList(): 'total': 0}, 'needsUXEval' : 0, 'topicUI': 0}, - 'qa': {'unconfirmed': {'count': 0, 'enhancement': 0, 'needsUXEval': 0, + 'qa': {'unconfirmed': {'count': 0, 'documentation': 0, 'enhancement': 0, 'needsUXEval': 0, 'haveBacktrace': 0, 'needsDevAdvice': 0}}, 'easyhacks' : {'needsDevEval': 0, 'needsUXEval': 0, 'cleanup_comments': 0, 'total': 0, 'assigned': 0, 'open': 0}}, @@ -436,6 +436,8 @@ def analyze_qa(): statList['data']['qa']['unconfirmed']['haveBacktrace'] += 1 if row['severity'] == 'enhancement': statList['data']['qa']['unconfirmed']['enhancement'] += 1 + if row['component'] == 'Documentation': +statList['data']['qa']['unconfirmed']['documentation'] += 1 util_build_period_stat(creationDate, email, 'qa', 'owner') diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index c018dfe..996cfe2 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -385,12 +385,14 @@ def report_qa(): "+ enhancements: {} ( )\n" "+ needsUXEval: {} ( )\n" "+ haveBackTrace: {} ( )\n" -"+ needsDevAdvice: {} ( )\n".format( +"+ needsDevAdvice: {} ( )\n" +"+ documentation: {} ( )\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) +statList['data']['qa']['unconfirmed']['needsDevAdvice'], +statList['data']['qa']['unconfirmed']['documentation'],), file=fp) reporters = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['owner']), reverse=True) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-tocsv.py
esc-reporting/esc-analyze.py | 56 - esc-reporting/esc-tocsv.py | 248 +++ 2 files changed, 253 insertions(+), 51 deletions(-) New commits: commit 2b41473bd4c7fa35d97148ee3565d592e33827ed Author: jan IversenDate: Fri Jan 20 19:17:03 2017 +0100 update to support csv request diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index eabbd64..76daab7 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -611,6 +611,11 @@ def runUpgrade(args): # create new statlist cfg['cutDate'] += datetime.timedelta(days=7) cfg['nowDate'] = cfg['cutDate'] + cfg['1weekDate'] = cfg['nowDate'] - datetime.timedelta(days=7) + cfg['1monthDate'] = cfg['nowDate'] - datetime.timedelta(days=30) + cfg['3monthDate'] = cfg['nowDate'] - datetime.timedelta(days=90) + cfg['1yearDate'] = cfg['nowDate'] - datetime.timedelta(days=365) + statList = util_create_statList() statList['aliases'] = csvList['aliases'] analyze_mentoring() @@ -618,57 +623,6 @@ def runUpgrade(args): analyze_qa() analyze_myfunc() - # combine old statlist with new statlist - orgStatList = util_load_data_file(cfg['homedir'] + 'OLDweeks/' + week) - - # copy from old data - statList['data']['easyhacks']['assigned'] = orgStatList['data']['easyhacks']['assigned'] - statList['data']['easyhacks']['cleanup_comments'] = orgStatList['data']['easyhacks']['cleanup_comments'] - statList['data']['easyhacks']['needsDevEval'] = orgStatList['data']['easyhacks']['needsDevEval'] - statList['data']['easyhacks']['needsUXEval'] = orgStatList['data']['easyhacks']['needsUXEval'] - statList['data']['easyhacks']['open'] = orgStatList['data']['easyhacks']['open'] - statList['data']['easyhacks']['total'] = orgStatList['data']['easyhacks']['total'] - statList['data']['gerrit']['committer']['1month']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['1month']['ABANDONED'] - statList['data']['gerrit']['committer']['1month']['MERGED'] = orgStatList['data']['gerrit']['committer']['1month']['MERGED'] - statList['data']['gerrit']['committer']['1month']['NEW'] = orgStatList['data']['gerrit']['committer']['1month']['NEW'] - statList['data']['gerrit']['committer']['1month']['reviewed'] = orgStatList['data']['gerrit']['committer']['1month']['reviewed'] - statList['data']['gerrit']['committer']['1week']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['1week']['ABANDONED'] - statList['data']['gerrit']['committer']['1week']['MERGED'] = orgStatList['data']['gerrit']['committer']['1week']['MERGED'] - statList['data']['gerrit']['committer']['1week']['NEW'] = orgStatList['data']['gerrit']['committer']['1week']['NEW'] - statList['data']['gerrit']['committer']['1week']['reviewed'] = orgStatList['data']['gerrit']['committer']['1week']['reviewed'] - statList['data']['gerrit']['committer']['1year']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['1year']['ABANDONED'] - statList['data']['gerrit']['committer']['1year']['MERGED'] = orgStatList['data']['gerrit']['committer']['1year']['MERGED'] - statList['data']['gerrit']['committer']['1year']['NEW'] = orgStatList['data']['gerrit']['committer']['1year']['NEW'] - statList['data']['gerrit']['committer']['1year']['reviewed'] = orgStatList['data']['gerrit']['committer']['1year']['reviewed'] - statList['data']['gerrit']['committer']['3month']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['3month']['ABANDONED'] - statList['data']['gerrit']['committer']['3month']['MERGED'] = orgStatList['data']['gerrit']['committer']['3month']['MERGED'] - statList['data']['gerrit']['committer']['3month']['NEW'] = orgStatList['data']['gerrit']['committer']['3month']['NEW'] - statList['data']['gerrit']['committer']['3month']['reviewed'] = orgStatList['data']['gerrit']['committer']['3month']['reviewed'] - statList['data']['gerrit']['committer']['total'] = orgStatList['data']['gerrit']['committer']['1year']['total'] - statList['data']['gerrit']['contributor']['1month']['ABANDONED'] = orgStatList['data']['gerrit']['contributor']['1month']['ABANDONED'] - statList['data']['gerrit']['contributor']['1month']['MERGED'] = orgStatList['data']['gerrit']['contributor']['1month']['MERGED'] - statList['data']['gerrit']['contributor']['1month']['NEW'] = orgStatList['data']['gerrit']['contributor']['1month']['NEW'] - statList['data']['gerrit']['contributor']['1month']['reviewed'] = orgStatList['data']['gerrit']['contributor']['1month']['reviewed'] - statList['data']['gerrit']['contributor']['1week']['ABANDONED'] = orgStatList['data']['gerrit']['contributor']['1week']['ABANDONED'] - statList['data']['gerrit']['contributor']['1week']['MERGED'] =
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |9 - esc-reporting/esc-collect.py | 12 ++-- esc-reporting/esc-report.py |3 ++- 3 files changed, 12 insertions(+), 12 deletions(-) New commits: commit f38b77f5046c5566eb8a77231a897e8af469b7db Author: jan IversenDate: Tue Jan 10 13:56:27 2017 +0100 esc-mentoring update to match new gitdm-config gitdm-config have been changed to use lowercase email addr only (converted), and as a consequence the mail search algorithms have been updated diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index c28667b..eabbd64 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -70,8 +70,6 @@ def util_load_csv(fileName, split): global statList rawData = {} with open(fileName, 'r', encoding='utf-8') as fp: - fp.readline() - fp.readline() for line in fp: line = line[:-1] if len(line) == 0: @@ -150,7 +148,7 @@ def util_create_person_gerrit(person, email): '1month': {'owner': 0, 'reviewer': 0}, '1week': {'owner': 0, 'reviewer': 0}, 'total': 0, - 'userName': '*DUMMY*'}, + 'userName': '*dummy*'}, 'ui': {'1year': {'commented': 0, 'history': 0}, '3month': {'commented': 0, 'history': 0}, '1month': {'commented': 0, 'history': 0}, @@ -223,14 +221,15 @@ def util_create_statList(): -def util_check_mail(name, mail): +def util_check_mail(name, xmail): global statList +mail = xmail.lower() if mail in statList['aliases']: mail = statList['aliases'][mail] if not mail in statList['people']: statList['people'][mail] = util_create_person_gerrit(name, mail) - if mail == '*DUMMY*': + if mail == '*dummy*': statList['people'][mail]['licenseOK'] = True else: if name and name != '*UNKNOWN*' and statList['people'][mail]['name'] == '*UNKNOWN*': diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py index e222485..49aadb7 100755 --- a/esc-reporting/esc-collect.py +++ b/esc-reporting/esc-collect.py @@ -184,7 +184,7 @@ def get_gerrit(cfg): for row in tmp: for i in 'username', 'email': if not i in row: - row[i] = '*DUMMY*' + row[i] = '*dummy*' rawList['committers'].append(row) url = urlBase + 'changes/?q=after:' + searchDate.strftime("%Y-%m-%d") + \ @@ -197,13 +197,13 @@ def get_gerrit(cfg): for row in tmp: for i in 'email', 'username', 'name': if not i in row['owner']: -row['owner'][i] = '*DUMMY*' +row['owner'][i] = '*dummy*' for x in row['messages']: if not 'author' in x: x['author'] = {} for i in 'email', 'username', 'name': if not i in x['author']: - x['author'][i] = '*DUMMY*' + x['author'][i] = '*dummy*' for i in 'Verified', 'Code-Review': if not i in row['labels']: row['labels'][i] = {} @@ -211,11 +211,11 @@ def get_gerrit(cfg): row['labels'][i]['all'] = [] for x in row['labels'][i]['all']: if 'name' not in x: - x['name'] = '*DUMMY*' + x['name'] = '*dummy*' if 'email' not in x: - x['email'] = '*DUMMY*' + x['email'] = '*dummy*' if 'username' not in x: - x['username'] = '*DUMMY*' + x['username'] = '*dummy*' if 'value' not in x: x['value'] = 0 diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 46899c7..c018dfe 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -52,8 +52,9 @@ def util_load_data_file(fileName): -def util_check_mail(mail): +def util_check_mail(xmail): global statList +mail = xmail.lower() if mail in statList['aliases']: mail = statList['aliases'][mail] if not mail in statList['people']: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 102 --- 1 file changed, 96 insertions(+), 6 deletions(-) New commits: commit 4f06260e705ad553b8a71bfcaa057f24a881c245 Author: jan IversenDate: Wed Dec 21 19:47:28 2016 +0100 upgrade part of script diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 2e10e19..c28667b 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -493,7 +493,7 @@ def analyze_trend(): -def analyze_final(): +def analyze_final(weekList = None): global cfg, statList, openhubData, bugzillaData, gerritData, gitData print("Analyze final") @@ -507,9 +507,10 @@ def analyze_final(): analyze_trend() myDay = cfg['nowDate'] x = (myDay - datetime.timedelta(days=7)).strftime('%Y-%m-%d') -weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') if weekList is None: - weekList = {'data': {}} + weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') + if weekList is None: +weekList = {'data': {}} statList['diff'] = util_build_diff(statList['data'], weekList['data']) sFile = cfg['homedir'] + 'stats.json' util_dump_file(sFile, statList) @@ -517,6 +518,7 @@ def analyze_final(): os.system('cp '+ sFile + ' ' + cfg['homedir'] + 'archive/stats_' + x + '.json') if myDay.strftime('%w') == '4': del statList['people'] +del statList['aliases'] util_dump_file(cfg['homedir'] + 'weeks/week_' + myDay.strftime('%Y_%W') + '.json', statList) @@ -553,8 +555,8 @@ def runLoadCSV(): -def runAnalyze(platform): -global cfg, statList, openhubData, bugzillaData, gerritData, gitData +def loadCfg(platform): +global cfg if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] @@ -571,6 +573,11 @@ def runAnalyze(platform): cfg['1yearDate'] = cfg['nowDate'] - datetime.timedelta(days=365) print("Reading and writing data to " + cfg['homedir']) + + +def runAnalyze(): +global cfg, statList, openhubData, bugzillaData, gerritData, gitData + 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') @@ -585,6 +592,89 @@ def runAnalyze(platform): analyze_final() +def runUpgrade(args): +global cfg, statList, openhubData, bugzillaData, gerritData, gitData + +args = args[1:] +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') +statList = util_create_statList() +runLoadCSV() +csvList = statList +cfg['cutDate'] = datetime.datetime(day=27,month=8,year=2015) +weekList = util_create_statList() + +for week in args: + print('upgrading ' + week) + + # create new statlist + cfg['cutDate'] += datetime.timedelta(days=7) + cfg['nowDate'] = cfg['cutDate'] + statList = util_create_statList() + statList['aliases'] = csvList['aliases'] + analyze_mentoring() + analyze_ui() + analyze_qa() + analyze_myfunc() + + # combine old statlist with new statlist + orgStatList = util_load_data_file(cfg['homedir'] + 'OLDweeks/' + week) + + # copy from old data + statList['data']['easyhacks']['assigned'] = orgStatList['data']['easyhacks']['assigned'] + statList['data']['easyhacks']['cleanup_comments'] = orgStatList['data']['easyhacks']['cleanup_comments'] + statList['data']['easyhacks']['needsDevEval'] = orgStatList['data']['easyhacks']['needsDevEval'] + statList['data']['easyhacks']['needsUXEval'] = orgStatList['data']['easyhacks']['needsUXEval'] + statList['data']['easyhacks']['open'] = orgStatList['data']['easyhacks']['open'] + statList['data']['easyhacks']['total'] = orgStatList['data']['easyhacks']['total'] + statList['data']['gerrit']['committer']['1month']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['1month']['ABANDONED'] + statList['data']['gerrit']['committer']['1month']['MERGED'] = orgStatList['data']['gerrit']['committer']['1month']['MERGED'] + statList['data']['gerrit']['committer']['1month']['NEW'] = orgStatList['data']['gerrit']['committer']['1month']['NEW'] + statList['data']['gerrit']['committer']['1month']['reviewed'] = orgStatList['data']['gerrit']['committer']['1month']['reviewed'] + statList['data']['gerrit']['committer']['1week']['ABANDONED'] = orgStatList['data']['gerrit']['committer']['1week']['ABANDONED'] + statList['data']['gerrit']['committer']['1week']['MERGED'] =
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0a3473127a3e9bc7b5feecba6dd3f0b84c20f0da Author: jan IversenDate: Wed Dec 21 09:05:53 2016 +0100 debian does not have encoding utf8 as default diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 22082f0..17b9f15 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -69,7 +69,7 @@ def util_load_file(fileName): def util_load_csv(fileName, split): global statList rawData = {} -with open(fileName, 'r') as fp: +with open(fileName, 'r', encoding='utf-8') as fp: fp.readline() fp.readline() for line in fp: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |2 +- esc-reporting/esc-report.py |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 652701353fe709be42430c33fa78d6ebd3fc610a Author: jan IversenDate: Wed Dec 21 08:05:43 2016 +0100 update for wrong licensing diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index b217bdb..22082f0 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -26,7 +26,7 @@ # # dump/developers_dump.json is used to identify: # new contributors -# contributors missing license +# contributors missing licensek # contributor award scheme # cross reference emails (several people uses multiple emails, there is a function to control that) # diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 095ffea..b5d02db 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -301,7 +301,7 @@ def report_mentoring(): print("+ big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp) for row in myStatList['award_1st_email']: -print(' ' + row['name'], file=fp) +print(' {} {} {}'.format(row['name'],row['email'],row['license']), file=fp) print("\n\n\n\n\n\n\n\n\n\n", file=fp) print('Day mentoring report, generated {} based on stats.json from {}'.format( datetime.datetime.now().strftime("%Y-%m-%d"), statList['addDate']), file=fp) @@ -473,7 +473,7 @@ def runCfg(platform): cfg['platform'] = platform print("Reading and writing data to " + cfg['homedir']) -cfg['contributor'] = util_load_data_file(cfg['homedir'] + 'award.json') +cfg['award-mailed'] = util_load_data_file(cfg['homedir'] + 'award.json')['award-mailed'] cfg['nowDate'] = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) cfg['cutDate'] = cfg['nowDate'] - datetime.timedelta(days=365) cfg['1weekDate'] = cfg['nowDate'] - datetime.timedelta(days=7) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 18 - esc-reporting/esc-report.py | 450 +++ 2 files changed, 170 insertions(+), 298 deletions(-) New commits: commit c8775f5a99192c92bbf9b8b2544e937747059040 Author: jan IversenDate: Tue Dec 20 20:13:05 2016 +0100 update to make report work with new data flow diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 7d600a9..b217bdb 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -224,12 +224,14 @@ def util_create_statList(): def util_check_mail(name, mail): -global cfg, statList +global statList -if mail in cfg['aliases']: - mail = cfg['aliases'][mail] +if mail in statList['aliases']: + mail = statList['aliases'][mail] if not mail in statList['people']: statList['people'][mail] = util_create_person_gerrit(name, mail) + if mail == '*DUMMY*': +statList['people'][mail]['licenseOK'] = True return mail @@ -455,7 +457,7 @@ def analyze_qa(): util_build_period_stat(xDate, email, 'qa', 'fixed') def analyze_myfunc(): -global cfg, statList, openhubData, bugzillaData, gerritData, gitData, aliasData, licenceCompanyData, licencePersonalData +global cfg, statList, openhubData, bugzillaData, gerritData, gitData, licenceCompanyData, licencePersonalData print("myfunc: analyze nothing", flush=True) @@ -521,18 +523,18 @@ def runLoadCSV(): try: fileName = cfg['homedir'] + 'gitdm-config/aliases' - cfg['aliases'] = util_load_csv(fileName, ' ') + statList['aliases'] = util_load_csv(fileName, ' ') fileName = cfg['homedir'] + 'gitdm-config/licenseCompany.csv' cfg['companies'] = util_load_csv(fileName, ';') fileName = cfg['homedir'] + 'gitdm-config/licensePersonal.csv' licencePersonalData = util_load_csv(fileName, ';') # check consistency - for i in cfg['aliases']: + for i in statList['aliases']: if i in licencePersonalData: raise Exception('alias ' + i + ' in aliases is licensed') -elif cfg['aliases'][i] not in licencePersonalData: - raise Exception('target ' + cfg['aliases'][i] + ' for alias ' + i + ' in aliases is NOT licensed') +elif statList['aliases'][i] not in licencePersonalData: + raise Exception('target ' + statList['aliases'][i] + ' for alias ' + i + ' in aliases is NOT licensed') # create base people info for id, row in licencePersonalData.items(): diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 6281b45..095ffea 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -52,13 +52,14 @@ def util_load_data_file(fileName): -def util_check_mail(mail, statList, combineMail): -if mail in combineMail: - mail = combineMail[mail] +def util_check_mail(mail): +global statList +if mail in statList['aliases']: + mail = statList['aliases'][mail] if not mail in statList['people']: - print('Error mail ' + mail + ' not in stats.json/people') - exit(-1) -return mail + return None +else: + return mail @@ -72,38 +73,36 @@ def util_formatGerrit(id, owner, title): -def util_print_line(fp, loopList, title, doGerrit=False, doBugzilla=False, doName=None): +def util_print_line(fp, loopList, title, doGerrit=False, doBugzilla=False): print("\n\n" + title + ':', file=fp) -for i in loopList: +for row in loopList: if doGerrit: -x = 'https://gerrit.libreoffice.org/#/c/{} {} -> "{}"'.format(i['id'], i['email'], i['title']) +x = 'https://gerrit.libreoffice.org/#/c/{} {} -> "{}"'.format(row['id'], row['email'], row['title']) elif doBugzilla: -x = 'https://bugs.documentfoundation.org/show_bug.cgi?id=' + i - elif not doName is None: -x = i + '' + doName[i]['name'] +x = 'https://bugs.documentfoundation.org/show_bug.cgi?id=' + row + elif 'id' in row: +x = '{} {} {} {}'.format(row['name'], row['email'], row['license'], row['id']) else: -x = i +x = '{} {} {}'.format(row['name'], row['email'], row['license']) print('' + x, file=fp) -def util_build_escNumber(db, tag, statList): +def util_build_escNumber(db, tag): +global statList return str(statList['data'][db][tag]) + '(' + str(statList['data'][db][tag]) + ')' -def util_build_matrix(title, lineDesc, index, statList): +def util_build_matrix(title, lineDesc, index): +global statList xValue = [[title, '1 week', '', '1 month', '', '3 months', '', '12 months', '']] xLen = [len(xValue[0][0]), 0, 0, 0, 0, 0, 0, 0, 0] for row in lineDesc: xLine = [row['text']] for i in '1week', '1month', '3month', '1year': -if index is None: - x1 = statList['data'][row['db']][i][row['tag']] - x2 =
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 72ce9b4a4daf10953fe0b4808b97c40b11236f67 Author: jan IversenDate: Thu Dec 15 17:15:57 2016 +0100 update to esc-analyze based on request from Xisco. diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 04e6742..7d600a9 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -74,6 +74,8 @@ def util_load_csv(fileName, split): fp.readline() for line in fp: line = line[:-1] +if len(line) == 0: + continue x = line.split(split) if split == ';' and len(x) != 3: raise Exception('misformed entry ' + line + ' in filename ' + fileName) @@ -118,14 +120,12 @@ def util_build_period_stat(xDate, email, base, peopleTarget=None, dataTarget=Non if dataTarget: statList['data'][base][xType]['total'] += 1 -nextDate = {'1year': cfg['3monthDate'], '3month': cfg['1monthDate'], '1month': cfg['1weekDate'], '1week': cfg['nowDate']} -for i, oDate in nextDate.items(): - if xDate >= cfg[i + 'Date'] and xDate < oDate: +for i in '1year', '3month', '1month', '1week': + if xDate >= cfg[i + 'Date']: if peopleTarget: statList['people'][email][base][i][peopleTarget] += 1 if dataTarget: statList['data'][base][xType][i][dataTarget] += 1 -break ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 66 ++- 1 file changed, 23 insertions(+), 43 deletions(-) New commits: commit f93bec88d3eba4e5a1fb770dc5039a0fdcc4884b Author: Xisco FauliDate: Wed Dec 14 14:18:09 2016 +0100 Adapt analyze_qa to jan's changes diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 21b0d20..04e6742 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -163,7 +163,8 @@ def util_create_person_gerrit(person, email): '1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, '1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, - 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}}, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, +'total': 0}, 'isCommitter': False, 'isContributor': False, 'licenseOK': False, @@ -212,19 +213,7 @@ def util_create_statList(): 'total': 0}, 'needsUXEval' : 0, 'topicUI': 0}, - 'qa': {'1year': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, - 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, - 'total': 0}, -'3month': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, - 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, - 'total': 0}, -'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}, -'unconfirmed': {'count': 0, 'enhancement': 0, 'needsUXEval': 0, + 'qa': {'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}}, @@ -424,34 +413,14 @@ def analyze_qa(): global cfg, statList, bugzillaData print("qa: analyze bugzilla", flush=True) -return for key, row in bugzillaData['bugs'].items(): - email = util_check_mail(row['creator_detail']['real_name'], row['creator'], statList, cfg['contributor']['combine-email']) + email = util_check_mail(row['creator_detail']['real_name'], row['creator']) 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']: 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 key, row in bugzillaData['bugs'].items(): - 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']: -continue if row['status'] == 'UNCONFIRMED': statList['data']['qa']['unconfirmed']['count'] += 1 @@ -464,15 +433,26 @@ def analyze_qa(): if row['severity'] == 'enhancement': statList['data']['qa']['unconfirmed']['enhancement'] += 1 - util_build_period_stat(cfg,
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 270 ++- 1 file changed, 165 insertions(+), 105 deletions(-) New commits: commit abf8b8450f12e04eef4083de8242fa339299ab3c Author: jan IversenDate: Mon Dec 12 19:17:55 2016 +0100 readded QA on request from Xisco diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index da7018a..21b0d20 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -107,23 +107,25 @@ def util_dump_file(fileName, rawList): -def util_build_period_stat(xDate, email, status, pstatus, base = 'gerrit'): +def util_build_period_stat(xDate, email, base, peopleTarget=None, dataTarget=None): global cfg, statList -for i in '1year', '3month', '1month', '1week': - if xDate > cfg[i + 'Date']: -if not email is None: - statList['people'][email][base][i][pstatus] += 1 - statList['people'][email][base][i]['total'] += 1 - statList['people'][email][base]['total'] += 1 -if not base == 'gerrit' : - statList['data'][base][i][status] += 1 - statList['data'][base]['total'] += 1 -elif statList['people'][email]['isCommitter']: - statList['data'][base]['committer'][i][status] += 1 - statList['data']['gerrit']['committer']['total'] += 1 -else: - statList['data']['gerrit']['contributor']['total'] += 1 - statList['data'][base]['contributor'][i][status] += 1 + +xType = 'contributor' +if email: + statList['people'][email][base]['total'] += 1 + if statList['people'][email]['isCommitter'] and base != 'ui': +xType = 'committer' +if dataTarget: + statList['data'][base][xType]['total'] += 1 + +nextDate = {'1year': cfg['3monthDate'], '3month': cfg['1monthDate'], '1month': cfg['1weekDate'], '1week': cfg['nowDate']} +for i, oDate in nextDate.items(): + if xDate >= cfg[i + 'Date'] and xDate < oDate: +if peopleTarget: + statList['people'][email][base][i][peopleTarget] += 1 +if dataTarget: + statList['data'][base][xType][i][dataTarget] += 1 +break @@ -138,22 +140,30 @@ def util_load_data_file(fileName): def util_create_person_gerrit(person, email): return { 'name': person, 'email': email, - 'commits': {'1year': {'merged': 0, 'reviewMerged': 0, 'total': 0}, - '3month': {'merged': 0, 'reviewMerged': 0, 'total': 0}, - '1month': {'merged': 0, 'reviewMerged': 0, 'total': 0}, - '1week': {'merged': 0, 'reviewMerged': 0, 'total': 0}, + 'commits': {'1year': {'owner': 0, 'reviewMerged': 0}, + '3month': {'owner': 0, 'reviewMerged': 0}, + '1month': {'owner': 0, 'reviewMerged': 0}, + '1week': {'owner': 0, 'reviewMerged': 0}, 'total': 0}, - 'gerrit': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'total': 0}, + 'gerrit': {'1year': {'owner': 0, 'reviewer': 0}, + '3month': {'owner': 0, 'reviewer': 0}, + '1month': {'owner': 0, 'reviewer': 0}, + '1week': {'owner': 0, 'reviewer': 0}, 'total': 0, 'userName': '*DUMMY*'}, - 'ui': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'total': 0}, + 'ui': {'1year': {'commented': 0, 'history': 0}, + '3month': {'commented': 0, 'history': 0}, + '1month': {'commented': 0, 'history': 0}, + '1week': {'commented': 0, 'history': 0}, 'total': 0}, + 'qa': {'1year': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, +'3month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, +'1month': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0, 'backtrace': 0, 'fixed': 0, 'total': 0}, +'1week': {'owner': 0, 'reviewer': 0, 'regression': 0, 'bibisected': 0, + 'bisected': 0,
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 438 ++- 1 file changed, 186 insertions(+), 252 deletions(-) New commits: commit 0decbf85a6b30881c4437fa5114f6baabfa0608c Author: jan IversenDate: Mon Dec 12 12:45:43 2016 +0100 Update to use gitdm-config information and general cleanup diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 28af252..da7018a 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -66,6 +66,34 @@ def util_load_file(fileName): return rawData +def util_load_csv(fileName, split): +global statList +rawData = {} +with open(fileName, 'r') as fp: + fp.readline() + fp.readline() + for line in fp: +line = line[:-1] +x = line.split(split) +if split == ';' and len(x) != 3: + raise Exception('misformed entry ' + line + ' in filename ' + fileName) +if split == ' ' and len(x) != 2: + y = line.split('"') + if len(y) != 3: +raise Exception('misformed entry ' + line + ' in filename ' + fileName) + x[0] = y[1] + x[1] = y[2].split()[0] + del x[2:] + +if x[0] in rawData: + raise Exception('duplicate entry ' + x[0] + ' in filename ' + fileName) +elif len(x) == 3: + rawData[x[0]] = {'name': x[1], 'license': x[2]} +else: + rawData[x[0]] = x[1] +return rawData + + def util_dump_file(fileName, rawList): try: @@ -79,22 +107,23 @@ def util_dump_file(fileName, rawList): -def util_build_period_stat(cfg, statList, xDate, email, status, pstatus, base = 'gerrit'): +def util_build_period_stat(xDate, email, status, pstatus, base = 'gerrit'): +global cfg, statList for i in '1year', '3month', '1month', '1week': - if xDate >= cfg[i + 'Date']: -if email is not None: + if xDate > cfg[i + 'Date']: +if not email is None: statList['people'][email][base][i][pstatus] += 1 statList['people'][email][base][i]['total'] += 1 -if status: - if base != 'gerrit' : -statList['data'][base][i][status] += 1 -statList['data'][base][i]['total'] += 1 - elif statList['people'][email]['isCommitter']: -statList['data'][base]['committer'][i][status] += 1 -statList['data'][base]['committer'][i]['total'] += 1 - else: -statList['data'][base]['contributor'][i]['total'] += 1 -statList['data'][base]['contributor'][i][status] += 1 + statList['people'][email][base]['total'] += 1 +if not base == 'gerrit' : + statList['data'][base][i][status] += 1 + statList['data'][base]['total'] += 1 +elif statList['people'][email]['isCommitter']: + statList['data'][base]['committer'][i][status] += 1 + statList['data']['gerrit']['committer']['total'] += 1 +else: + statList['data']['gerrit']['contributor']['total'] += 1 + statList['data'][base]['contributor'][i][status] += 1 @@ -109,83 +138,76 @@ def util_load_data_file(fileName): def util_create_person_gerrit(person, email): return { 'name': person, 'email': email, - 'commits': {'1year': {'merged': 0, 'reviewMerged': 0}, - '3month': {'merged': 0, 'reviewMerged': 0}, - '1month': {'merged': 0, 'reviewMerged': 0}, - '1week': {'merged': 0, 'reviewMerged': 0}}, - 'gerrit': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'total': 0}, + 'commits': {'1year': {'merged': 0, 'reviewMerged': 0, 'total': 0}, + '3month': {'merged': 0, 'reviewMerged': 0, 'total': 0}, + '1month': {'merged': 0, 'reviewMerged': 0, 'total': 0}, + '1week': {'merged': 0, 'reviewMerged': 0, 'total': 0}, + 'total': 0}, + 'gerrit': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, + '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, + '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, + '1week': {'owner': 0, 'reviewer': 0, 'total': 0}, + 'total': 0, 'userName': '*DUMMY*'}, - 'ui': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, - '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1month': {'owner': 0, 'reviewer': 0, 'total': 0}, - '1week': {'owner': 0, 'reviewer': 0, 'total': 0}}, - 'qa':
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit fd8ba67070f2f20cba6419f9ddca1d130ca541e7 Author: Xisco FauliDate: Mon Dec 12 00:30:58 2016 +0100 needsUXEval can be added or removed along other keywords diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 8332a41..28af252 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -381,15 +381,15 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): email = util_check_mail('*UNKNOWN*', change['who'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(change['when'], "%Y-%m-%dT%H:%M:%SZ") for entry in change['changes']: - if entry['added'] == 'needsUXEval': -st = 'added' - elif entry['removed'] == 'needsUXEval': -st = 'removed' - else: -st = None - if not st is None: -util_build_period_stat(cfg, statList, xDate, email, st, 'reviewer', base='ui') - + keywordsAdded = entry['added'].split(", ") + for keyword in keywordsAdded: +if keyword == 'needsUXEval': + util_build_period_stat(cfg, statList, xDate, email, 'added', 'reviewer', base='ui') + + keywordsRemoved = entry['removed'].split(", ") + for keyword in keywordsRemoved: +if keyword == 'needsUXEval': + util_build_period_stat(cfg, statList, xDate, email, 'removed', 'reviewer', base='ui') def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print("qa: analyze bugzilla", flush=True) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 8b14690e3251b8bc02a4754c2b37112acaca7e83 Author: Xisco FauliDate: Wed Dec 7 15:10:16 2016 +0100 bug owner should be based on creation time, not in last change diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index f6d7cf7..7e68938 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -82,10 +82,10 @@ 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 not email is None: +if email is not None: statList['people'][email][base][i][pstatus] += 1 statList['people'][email][base][i]['total'] += 1 -if not base == 'gerrit' : +if base != 'gerrit' : statList['data'][base][i][status] += 1 statList['data'][base][i]['total'] += 1 elif statList['people'][email]['isCommitter']: @@ -384,10 +384,11 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): for key, row in bugzillaData['bugs'].items(): email = util_check_mail('*UNKNOWN*', 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']: continue - util_build_period_stat(cfg, statList, xDate, email, row['status'], 'owner', base='qa') + util_build_period_stat(cfg, statList, creationDate, email, row['status'], 'owner', base='qa') for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d3b27e1b9988358f27878fdebbaa23a8525172e Author: Xisco FauliDate: Tue Nov 22 12:29:55 2016 +0100 Revert this changes pushed accidentally diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 6245173..f6d7cf7 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -470,7 +470,7 @@ def runCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/xisco/dev-tools/esc-reporting' + homeDir = '/home/jani/esc' cfg = util_load_data_file(homeDir + '/config.json') cfg['homedir'] = homeDir + '/' cfg['platform'] = platform ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/qa-tools.py
esc-reporting/esc-analyze.py |2 esc-reporting/qa-tools.py| 605 +++ 2 files changed, 606 insertions(+), 1 deletion(-) New commits: commit 09b57ca6d15509f266603cdc1b26904c017cc447 Author: Xisco FauliDate: Tue Nov 22 12:23:43 2016 +0100 Add qa-tools Used for generating the Weekly Qa Report and the wikimedia tables diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index f6d7cf7..6245173 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -470,7 +470,7 @@ def runCfg(platform): if 'esc_homedir' in os.environ: homeDir = os.environ['esc_homedir'] else: - homeDir = '/home/jani/esc' + homeDir = '/home/xisco/dev-tools/esc-reporting' cfg = util_load_data_file(homeDir + '/config.json') cfg['homedir'] = homeDir + '/' cfg['platform'] = platform diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py new file mode 100755 index 000..b820ee4 --- /dev/null +++ b/esc-reporting/qa-tools.py @@ -0,0 +1,605 @@ +#!/usr/bin/env python3 +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +import sys +import os +import datetime +import json + +homeDir = '/home/xisco/stats/' + +reportPeriod = '7d' + +newUsersPeriod = '7d' + +targets_list = ['5.3.0'] + +periods_list = ['30d', '60d', '90d'] + +priorities_list = ['highest','high','medium','low','lowest'] + +severities_list = ['blocker', 'critical', 'major', 'normal', 'minor', 'trivial','enhancement'] + +statutes_list = ['UNCONFIRMED', 'NEW', 'CLOSED', 'NEEDINFO', 'REOPENED', 'ASSIGNED', 'RESOLVED_FIXED', +'RESOLVED_DUPLICATE', 'RESOLVED_WORKSFORME', 'RESOLVED_NOTABUG', 'RESOLVED_NOTOURBUG', 'RESOLVED_WONTFIX', +'RESOLVED_INVALID', 'RESOLVED_MOVED', 'RESOLVED_INSUFFICIENTDATA', 'VERIFIED_FIXED', 'VERIFIED_DUPLICATE', +'VERIFIED_WORKSFORME', 'VERIFIED_NOTABUG', 'VERIFIED_NOTOURBUG', 'VERIFIED_WONTFIX', 'VERIFIED_INVALID', +'VERIFIED_MOVED', 'VERIFIED_INSUFFICIENTDATA'] + +keywords_list = ['accessibility', 'bibisected', 'bibisectNotNeeded', 'bibisectRequest', 'bisected', 'corruptProfile', +'dataLoss', 'easyHack', 'filter:doc', 'filter:docx', 'filter:emf', 'filter:fodp', 'filter:fodt', 'filter:html', +'filter:odf', 'filter:odp', 'filter:ods', 'filter:odt', 'filter:ooxml', 'filter:pdf', 'filter:ppt', +'filter:pptx', 'filter:rtf', 'filter:svgInsert', 'filter:svgOpen', 'filter:visio', 'filter:xls', 'filter:xlsx', +'haveBacktrace', 'implementationError', 'needsConfirmationAdvice', 'needsDevAdvice', 'needsDevEval', +'needsUXEval', 'needUITest', 'notBibisectable', 'patch', 'perf', 'possibleRegression', 'preBibisect', +'regression', 'security', 'text:cjk', 'text:ctl', 'text:rtl', 'wantBacktrace'] + +system_list = ['All', 'Linux (All)', 'Android', 'Windows (All)', 'Mac OS X (All)', 'iOS', 'FreeBSD', 'NetBSD', 'OpenBSD', +'BSD (Others)', 'Solaris', 'Cygwin', 'AIX', 'HP-UX', 'IRIX', 'Interix', 'other'] + +product_list = ['cppunit', 'Document Liberation Project', 'Impress Remote', 'libabw', 'libetonyek', 'libexttextcatYes', +'libfreehand', 'libgltf', 'libmspub', 'libpagemaker', 'LibreOffice', 'LibreOffice Online', 'libvisio', 'QA Tools'] + +def util_load_file(fileName): +try: +fp = open(fileName, encoding='utf-8') +rawData = json.load(fp) +fp.close() +except Exception as e: +print('Error load file ' + fileName + ' due to ' + str(e)) +rawData = None +pass +return rawData + +def util_dump_file(fileName, rawList): +try: +fp = open(fileName, 'w', encoding='utf-8') +json.dump(rawList, fp, ensure_ascii=False, indent=4, sort_keys=True) +fp.close() +except Exception as e: +print('Error dump file ' + fileName + ' due to ' + str(e)) +os.remove(fileName) +exit(-1) + +def util_create_person_bugzilla(email, name): +return { 'name': name, + 'email': email, + 'oldest': datetime.datetime.now(), + 'newest': datetime.datetime(2001, 1, 1) +} + +def util_create_detailed_person(email): +return { 'email': email, + 'bugs': [], + 'created': 0, + 'comments':0, + 'status_changed': 0, + 'keyword_added': 0, + 'keyword_removed': 0, + 'severity_changed': 0, + 'priority_changed': 0, + 'system_changed': 0 + } + +def util_create_statList(): +return { +'data': +{ +'bugs': +{ + 'all': + { + 'count': 0, + 'status': {s:0 for s in
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5c25e8306d7dd0b331fa6ff291dd936afd4955d4 Author: jan IversenDate: Tue Nov 22 10:02:35 2016 +0100 esc-analyze remove activated test diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 4abb12f..f6d7cf7 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -489,7 +489,7 @@ def runCfg(platform): def runAnalyze(cfg, openhubData, bugzillaData, gerritData, gitData): statList = util_create_statList() -#analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, cfg) +analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_myfunc(statList, openhubData, gerritData, gitData, bugzillaData, cfg) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 8abf13d55712909b132458b8f3266aa5d5eb3c9d Author: jan IversenDate: Tue Nov 22 09:46:25 2016 +0100 esc-analyze update, error in UI report diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index fd4b4fc..4abb12f 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -368,9 +368,9 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): email = util_check_mail('*UNKNOWN*', change['who'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(change['when'], "%Y-%m-%dT%H:%M:%SZ") for entry in change['changes']: - if entry['added'] != 'needsUXEval': + if entry['added'] == 'needsUXEval': st = 'added' - elif entry['removed'] != 'needsUXEval': + elif entry['removed'] == 'needsUXEval': st = 'removed' else: st = None @@ -489,7 +489,7 @@ def runCfg(platform): def runAnalyze(cfg, openhubData, bugzillaData, gerritData, gitData): statList = util_create_statList() -analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, cfg) +#analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg) analyze_myfunc(statList, openhubData, gerritData, gitData, bugzillaData, cfg) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 64 +++ esc-reporting/esc-report.py | 23 +++ 2 files changed, 46 insertions(+), 41 deletions(-) New commits: commit 62425ccd11ee74ab36e9d020022a5b6c2a5d8e22 Author: jan IversenDate: Mon Nov 21 10:53:47 2016 +0100 esc-reporting update on request from Heiko diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index aaf8b7a..fd4b4fc 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -82,8 +82,9 @@ 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']: -statList['people'][email][base][i][pstatus] += 1 -statList['people'][email][base][i]['total'] += 1 +if not email is None: + statList['people'][email][base][i][pstatus] += 1 + statList['people'][email][base][i]['total'] += 1 if not base == 'gerrit' : statList['data'][base][i][status] += 1 statList['data'][base][i]['total'] += 1 @@ -164,12 +165,11 @@ def util_create_statList(): '3month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, '1month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, '1week': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}}, - 'ui': {'1year': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, -'3month': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, -'1month': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, -'1week': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, + 'ui': {'1year': {'added': 0, 'removed': 0, 'commented': 0, 'resolved': 0, 'total': 0}, +'3month': {'added': 0, 'removed': 0, 'commented': 0, 'resolved': 0, 'total': 0}, +'1month': {'added': 0, 'removed': 0, 'commented': 0, 'resolved': 0, 'total': 0}, +'1week': {'added': 0, 'removed': 0, 'commented': 0, 'resolved': 0, 'total': 0}, 'needsUXEval' : 0, -'closed' : 0, 'topicUI': 0}, 'qa': {'1year': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0}, @@ -350,8 +350,7 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): continue if row['status'] == 'RESOLVED' or row['status'] == 'CLOSED' or row['status'] == 'VERIFIED': -if xDate > cfg['1weekDate']: - statList['data']['ui']['closed'] += 1 +util_build_period_stat(cfg, statList, xDate, None, 'resolved', 'reviewer', base='ui') continue if 'needsUXEval' in row['keywords']: @@ -369,11 +368,14 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): email = util_check_mail('*UNKNOWN*', change['who'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(change['when'], "%Y-%m-%dT%H:%M:%SZ") for entry in change['changes']: - if entry['added'] != '': + if entry['added'] != 'needsUXEval': st = 'added' - else: + elif entry['removed'] != 'needsUXEval': st = 'removed' - util_build_period_stat(cfg, statList, xDate, email, st, 'reviewer', base='ui') + else: +st = None + if not st is None: +util_build_period_stat(cfg, statList, xDate, email, st, 'reviewer', base='ui') def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): @@ -527,25 +529,29 @@ def runBackLoad(cfg): def runUpgrade(cfg, fileList): -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') +#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') -statList = util_load_data_file(cfg['homedir'] + 'weeks/week_2016_44.json') -cfg['nowDate'] =
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 15 --- esc-reporting/esc-report.py |4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) New commits: commit acad72edeea75b892de3d9537893f82076deff94 Author: jan IversenDate: Fri Nov 18 12:00:23 2016 +0100 updated with UX requested changes diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index c5fdfdb..aaf8b7a 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -169,6 +169,7 @@ def util_create_statList(): '1month': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, '1week': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, 'needsUXEval' : 0, +'closed' : 0, 'topicUI': 0}, 'qa': {'1year': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0}, @@ -340,17 +341,25 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print("ui: analyze bugzilla", flush=True) for key, row in bugzillaData['bugs'].items(): - if row['status'] == 'RESOLVED' or row['status'] == 'VERIFIED' or not 'topicUI' in row['keywords']: -continue xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") if xDate > cfg['cutDate']: continue - statList['data']['ui']['topicUI'] += 1 + if not 'topicUI' in row['keywords'] and not 'needsUXEval' in row['keywords']: +continue + + if row['status'] == 'RESOLVED' or row['status'] == 'CLOSED' or row['status'] == 'VERIFIED': +if xDate > cfg['1weekDate']: + statList['data']['ui']['closed'] += 1 +continue + if 'needsUXEval' in row['keywords']: statList['data']['ui']['needsUXEval'] += 1 + if 'topicUI' in row['keywords']: +statList['data']['ui']['topicUI'] += 1 + for change in row['comments']: email = util_check_mail('*UNKNOWN*', change['creator'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(change['creation_time'], "%Y-%m-%dT%H:%M:%SZ") diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 6a207ad..7695fe8 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -360,7 +360,7 @@ def report_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print("copy/paste to esc pad:\n" "* UX update (heiko)\n" "+ Bugzilla (topicUI) statistics\n" - "{} bugs open, {} needs to be evaluated by the UXteam\n" + "{} (topicUI) bugs open, {} (needsUXEval) needs to be evaluated by the UXteam\n" "+ Updates:".format( util_build_escNumber('ui', 'topicUI', statList), util_build_escNumber('ui', 'needsUXEval', statList)), file=fp) @@ -380,7 +380,7 @@ def report_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print("+ top 10 contributors:", file=fp) 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) +top10list[i]['name'], top10list[i]['month'], top10list[i]['year']), file=fp) fp.close() return {'title': 'esc_mentoring, UI', 'mail': 'j...@documentfoundation.org', 'file': '/tmp/esc_ui_report.txt'} ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py |4 1 file changed, 4 insertions(+) New commits: commit 1bd70dd31b2f7d5d510fb6f9a1aee3c7036e7d52 Author: jan IversenDate: Tue Nov 15 13:09:13 2016 +0100 update to esc-reporting. We sometimes pick patches from AOO or committers commit patches directly therefore the git.log is also checked for licenses diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 4882962..c5fdfdb 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -273,6 +273,10 @@ def analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, committer = util_check_mail(row['committer'], row['committer-email'], statList, cfg['contributor']['combine-email']) statList['people'][author]['isContributor'] = True statList['people'][committer]['isContributor'] = True + if author in cfg['contributor']['contributors'] or author in cfg['contributor']['license-pending']: +statList['people'][author]['hasLicense'] = True + if committer in cfg['contributor']['contributors'] or committer in cfg['contributor']['license-pending']: +statList['people'][committer]['hasLicense'] = True for i in author, committer: if xDate > statList['people'][i]['newestCommit']: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 99 +-- esc-reporting/esc-report.py | 25 ++ 2 files changed, 101 insertions(+), 23 deletions(-) New commits: commit 5da9dd141f959bed28d880f44672d9b97dda4931 Author: jan IversenDate: Tue Nov 15 12:25:33 2016 +0100 added distribution analysis to esc-reporting diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 6dc2c0a..4882962 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -148,6 +148,22 @@ def util_create_statList(): '3month': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0, 'total': 0}, '1month': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0, 'total': 0}, '1week': {'ABANDONED': 0, 'MERGED': 0, 'NEW': 0, 'reviewed': 0, 'total': 0}}}, + 'trendCommitter': {'1year': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, +'3month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, +'1month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, +'1week': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}}, + 'trendContributor': {'1year': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '3month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1week': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}}, + 'trendQA': {'1year': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '3month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1week': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}}, + 'trendUI': {'1year': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '3month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1month': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}, + '1week': {'1-5': 0, '6-25': 0, '26-50': 0, '51-100': 0, '100+': 0, 'total': 0}}, 'ui': {'1year': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, '3month': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, '1month': {'added': 0, 'removed': 0, 'commented': 0, 'total': 0}, @@ -190,7 +206,7 @@ def util_build_diff(newList, oldList): else: result[i] = util_build_diff(newList[i], oldList[i]) else: -result[i] = newList[i] - oldList[i] + result[i] = newList[i] - oldList[i] return result @@ -370,6 +386,44 @@ def analyze_myfunc(statList, openhubData, gerritData, gitData, bugzillaData, cfg +def util_build_trend(cnt): +if cnt == 0: + return None +elif cnt <= 5: + return '1-5' +elif cnt <= 25: + return '6-25' +elif cnt <= 50: + return '26-50' +elif cnt <= 100: + return '51-100' +return '100+' + + + +def analyze_trend(statList, cfg): +for email in statList['people']: + person = statList['people'][email] + + for inx in '1year', '3month', '1month', '1week': + x = util_build_trend(person['commits'][inx]['merged']) + if not x is None: + if person['isCommitter']: + statList['data']['trendCommitter'][inx][x] += 1 + statList['data']['trendCommitter'][inx]['total'] += 1 + elif person['isContributor']: + statList['data']['trendContributor'][inx][x] += 1 + statList['data']['trendContributor'][inx]['total'] += 1 + x = util_build_trend(person['qa'][inx]['total']) + if not x is None: + statList['data']['trendQA'][inx][x] += 1 + statList['data']['trendQA'][inx]['total'] += 1 + x = util_build_trend(person['ui'][inx]['total']) + if not x is None: + statList['data']['trendUI'][inx][x] += 1 + statList['data']['trendUI'][inx]['total'] += 1 + + def analyze_final(statList, cfg): print("Analyze final") statList['addDate'] = datetime.date.today().strftime('%Y-%m-%d') @@ -381,6 +435,7 @@
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py
esc-reporting/esc-analyze.py | 96 +-- 1 file changed, 84 insertions(+), 12 deletions(-) New commits: commit f4dfbe0e8993cfb1a785cfe8e1b2dab03598a5d7 Author: jan IversenDate: Sun Nov 13 18:40:22 2016 +0100 esc-reporting update, to upgrade old statistics diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e613289..6dc2c0a 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -221,6 +221,8 @@ def analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, if row['status'] == 'SUBMITTED' or row['status'] == 'DRAFT': row['status'] = 'NEW' xDate = datetime.datetime.strptime(row['updated'], '%Y-%m-%d %H:%M:%S.%f000') + if xDate > cfg['cutDate']: +continue ownerEmail = util_check_mail(row['owner']['name'], row['owner']['email'], statList, cfg['contributor']['combine-email']) statList['people'][ownerEmail]['gerrit']['userName'] = row['owner']['username'] util_build_period_stat(cfg, statList, xDate, ownerEmail, row['status'], 'owner') @@ -245,6 +247,8 @@ def analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, for key in gitData['commits']: row = gitData['commits'][key] xDate = datetime.datetime.strptime(row['date'], "%Y-%m-%d %H:%M:%S") + if xDate > cfg['cutDate']: +continue if xDate < statOldDate: statOldDate = xDate if xDate > statNewDate: @@ -282,6 +286,8 @@ def analyze_mentoring(statList, openhubData, gerritData, gitData, bugzillaData, continue xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") + if xDate > cfg['cutDate']: +continue if xDate < statOldDate: statOldDate = xDate if xDate > statNewDate: @@ -317,6 +323,10 @@ def analyze_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): if row['status'] == 'RESOLVED' or row['status'] == 'VERIFIED' or not 'topicUI' in row['keywords']: continue + xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") + if xDate > cfg['cutDate']: +continue + statList['data']['ui']['topicUI'] += 1 if 'needsUXEval' in row['keywords']: statList['data']['ui']['needsUXEval'] += 1 @@ -343,6 +353,9 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): for key, row in bugzillaData['bugs'].items(): email = util_check_mail('*UNKNOWN*', row['creator'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") + if xDate > cfg['cutDate']: +continue + util_build_period_stat(cfg, statList, xDate, email, row['status'], 'owner', base='qa') for change in row['comments']: @@ -368,17 +381,18 @@ def analyze_final(statList, cfg): person['newestCommit'] = person['newestCommit'].strftime("%Y-%m-%d") person['prevCommit'] = person['prevCommit'].strftime("%Y-%m-%d") -myDay = datetime.date.today() +myDay = cfg['nowDate'] x = (myDay - datetime.timedelta(days=7)).strftime('%Y-%m-%d') weekList = util_load_file(cfg['homedir'] + 'archive/stats_' + x + '.json') if weekList is None: weekList = {'data': {}} statList['diff'] = util_build_diff(statList['data'], weekList['data']) -util_dump_file(cfg['homedir'] + 'stats.json', statList) +sFile = cfg['homedir'] + 'stats.json' +util_dump_file(sFile, statList) x = myDay.strftime('%Y-%m-%d') -util_dump_file(cfg['homedir'] + 'archive/stats_' + x + '.json', statList) +os.system('cp '+ sFile + ' ' + cfg['homedir'] + 'archive/stats_' + x + '.json') if myDay.strftime('%w') == '4': - util_dump_file(cfg['homedir'] + 'weeks/week_' + myDay.strftime('%Y_%W') + '.json', statList) +os.system('cp ' + sFile + ' ' + cfg['homedir'] + 'weeks/week_' + myDay.strftime('%Y_%W') + '.json') @@ -394,7 +408,7 @@ def runCfg(platform): cfg['contributor'] = util_load_data_file(cfg['homedir'] + 'dump/developers_dump.json') cfg['nowDate'] = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) -cfg['cutDate'] = cfg['nowDate'] - datetime.timedelta(days=365) +cfg['cutDate'] = cfg['nowDate'] cfg['1weekDate'] = cfg['nowDate'] - datetime.timedelta(days=7) cfg['1monthDate'] = cfg['nowDate'] - datetime.timedelta(days=30) cfg['3monthDate'] = cfg['nowDate'] - datetime.timedelta(days=90) @@ -403,12 +417,7 @@ def runCfg(platform): -def runAnalyze(cfg): -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 =
[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py esc-reporting/README
esc-reporting/README |6 esc-reporting/esc-analyze.py | 422 +++ esc-reporting/esc-collect.py | 310 ++ esc-reporting/esc-report.py | 506 +++ 4 files changed, 1244 insertions(+) New commits: commit d64010eea0c92aa8ba80422de7ad776ac39e94ce Author: jan IversenDate: Sat Nov 12 18:15:45 2016 +0100 Added esc-reporting tools diff --git a/esc-reporting/README b/esc-reporting/README new file mode 100644 index 000..b3db828 --- /dev/null +++ b/esc-reporting/README @@ -0,0 +1,6 @@ +This directory contains the tools that run on VM174, to generate esc reports (currently mentoring and UX) + +Patches are welcome, deployment can be done by any INFRA person, vm174 is currently maintained by jani + + + diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py new file mode 100755 index 000..e613289 --- /dev/null +++ b/esc-reporting/esc-analyze.py @@ -0,0 +1,422 @@ +#!/usr/bin/env python3 +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + + + +### DESCRIPTION +# +# This program uses data collected by esc-collect.py: +# The data is dumped to json files, with a history of minimum 1 year +# esc/dump/['openhub','bugzilla','gerrit','git']_dump.json +# +# it generates and maintains +# esc/stats.json (the daily data) +# esc/archive/stats__MM_DD.json (copy of stats.json) +# esc/weeks/week__NN.json (thursday copy of stats.json) +# +# The analyze functions run through the data files and generates interesting numbers +# You can add your own analyze function (see analyze_myfunc() for example). +# The numbers are stored in stats.json, and a diff with last weeks numbers are automatically build +# +# dump/developers_dump.json is used to identify: +# new contributors +# contributors missing license +# contributor award scheme +# cross reference emails (several people uses multiple emails, there is a function to control that) +# +# Expand this program if you want to present numbers compared to last week (for e.g. the ESC meeting) +# +# By storing the data over time: +# archive/ contains ca. 1 month +# weeks/contains ca. 1 year +# it is possible to make trend analysis, this is however not part of this program +# +# Installed on vm174:/usr/local/bin runs every night (generating esc/stats.json) +# +# This program is intended to be extended by people interesting in performance numbers +# + + + +import sys +import csv +import io +import os +import operator +import datetime +import json +import xmltodict + + +def util_load_file(fileName): +try: + fp = open(fileName, encoding='utf-8') + rawData = json.load(fp) + fp.close() +except Exception as e: + print('Error load file ' + fileName + ' due to ' + str(e)) + rawData = None + pass +return rawData + + + +def util_dump_file(fileName, rawList): +try: + fp = open(fileName, 'w', encoding='utf-8') + json.dump(rawList, fp, ensure_ascii=False, indent=4, sort_keys=True) + fp.close() +except Exception as e: + print('Error dump file ' + fileName + ' due to ' + str(e)) + os.remove(fileName) + exit(-1) + + + +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']: +statList['people'][email][base][i][pstatus] += 1 +statList['people'][email][base][i]['total'] += 1 +if not base == 'gerrit' : + statList['data'][base][i][status] += 1 + statList['data'][base][i]['total'] += 1 +elif statList['people'][email]['isCommitter']: + statList['data'][base]['committer'][i][status] += 1 + statList['data'][base]['committer'][i]['total'] += 1 +else: + statList['data'][base]['contributor'][i]['total'] += 1 + statList['data'][base]['contributor'][i][status] += 1 + + + +def util_load_data_file(fileName): +rawList = util_load_file(fileName) +if rawList == None: + exit(-1) +return rawList + + + +def util_create_person_gerrit(person, email): +return { 'name': person, + 'email': email, + 'commits': {'1year': {'merged': 0, 'reviewMerged': 0}, + '3month': {'merged': 0, 'reviewMerged': 0}, + '1month': {'merged': 0, 'reviewMerged': 0}, + '1week': {'merged': 0, 'reviewMerged': 0}}, + 'gerrit': {'1year': {'owner': 0, 'reviewer': 0, 'total': 0}, + '3month': {'owner': 0, 'reviewer': 0, 'total': 0}, + '1month': {'owner': 0, 'reviewer':