[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 48 +++ esc-reporting/esc-report.py | 42 + 2 files changed, 90 insertions(+) New commits: commit c93c1a0858f7b923882f349389d9770519094e8d Author: Xisco Fauli AuthorDate: Wed Oct 20 18:30:59 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 20 18:33:35 2021 +0200 esc-report: create documentation report Change-Id: Idc8d9535949a5e8dbb46e0d0cb1268bc0c403fd8 diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index d9711d7..df9b80a 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -231,6 +231,11 @@ def report_esc_prototype(): fp.close() escPrototype = escPrototype.replace('$', data) +fp = open('/tmp/esc_documentation_report.txt', encoding='utf-8') +data = fp.read() +fp.close() +escPrototype = escPrototype.replace('$', data) + fp = open('/tmp/esc_mentoring_report.txt', encoding='utf-8') data = fp.read() fp.close() @@ -511,7 +516,37 @@ def report_bug_metrics(): return {'title': data, 'mail': 'mentor...@documentfoundation.org', 'attach': {'name': fileName, 'path': filePath, 'extension': 'ods'}, 'file' : fileBody} +def report_documentation(): +global statList, cfg +tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['documentation']['1month']['history']+statList['people'][k]['documentation']['1month']['commented']), reverse=True) +top10list = [] +for i in tmpClist: + if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org': +xYear = statList['people'][i]['documentation']['1year']['history'] + statList['people'][i]['documentation']['1year']['commented'] +xMonth = statList['people'][i]['documentation']['1month']['history'] + statList['people'][i]['documentation']['1month']['commented'] +x = {'mail': i, 'name': statList['people'][i]['name'], + 'month' : xMonth, + 'year': xYear} +top10list.append(x) +if len(top10list) >= 10: + break +fp = open('/tmp/esc_documentation_report.txt', 'w', encoding='utf-8') +print("+ Bugzilla Documentation statistics\n" + "{} bugs open\n" + "+ Updates:".format( + util_build_escNumber('documentation', 'open')), file=fp) + +xRow = [{'db': 'documentation', 'tag': 'created', 'text': 'created'}, +{'db': 'documentation', 'tag': 'commented', 'text': 'commented'}, +{'db': 'documentation', 'tag': 'resolved', 'text': 'resolved'}] +print(util_build_matrix('BZ changes', xRow, 'contributor'), end='', file=fp) +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]['name'], top10list[i]['month'], top10list[i]['year']), file=fp) +fp.close() +return None def report_ui(): global statList, cfg @@ -814,6 +849,13 @@ def runReport(): except Exception as e: common.util_errorMail(cfg, 'esc-report', 'ERROR: report_mentoring failed with ' + str(e)) pass +try: + x = report_documentation() + if not x is None: +xMail.append(x) +except Exception as e: + common.util_errorMail(cfg, 'esc-report', 'ERROR: report_documentation failed with ' + str(e)) + pass try: x = report_ui() if not x is None: commit 91c418a8f52831c9d5af9f96e0e9cf3886b3940f Author: Xisco Fauli AuthorDate: Wed Oct 20 18:29:33 2021 +0200 Commit: Xisco Fauli CommitDate: Wed Oct 20 18:29:33 2021 +0200 esc-analyze: Add documentation stats Change-Id: If494e8268864aec30c9daa962e1ed498ae979644 diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 78b43a7..074e2d5 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -163,6 +163,11 @@ def util_create_person_gerrit(person, email): '1month': {'commented': 0, 'history': 0}, '1week': {'commented': 0, 'history': 0}, 'total': 0}, + 'documentation': {'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, @@ -212,6 +217,8 @@ def util_create_statList(): 'contributor': {'owner':{'1year': {}, '3month':
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 18 -- esc-reporting/esc-report.py | 17 + 2 files changed, 29 insertions(+), 6 deletions(-) New commits: commit ad2e9e582e1bbc9b1146cfe492b14b982425756e Author: Xisco Fauli AuthorDate: Fri Oct 4 17:42:51 2019 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 4 21:04:24 2019 +0200 ESC: Add list of patches automatically abandoned in the last week diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 05e8e26..3326360 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -634,7 +634,8 @@ def analyze_reports(): 'easyhacks_new': [], 'too_many_comments': [], 'top10commit': [], - 'top10review': []} + 'top10review': [], + 'abandonedPatches': []} fileAutomate = cfg['homedir'] + 'automateTODO.json' automateList = util_load_data_file(fileAutomate) automateList['gerrit']['to_abandon_abandon'] = {} @@ -687,6 +688,7 @@ def analyze_reports(): # 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']} + if row['status'] != 'ABANDONED': if ownerEmail is None: ownerEmail = row['owner']['email'] @@ -697,6 +699,16 @@ def analyze_reports(): and not is_domain_mapped(ownerEmail): entry['license'] = 'GERRIT: ' + statList['people'][ownerEmail]['licenseText'] statList['reportList']['missing_license'].append(entry) + else: +if row['branch'] == 'master': + for message in row['messages']: +messageDate = datetime.datetime.strptime(message['date'], '%Y-%m-%d %H:%M:%S.%f000') +if messageDate >= cfg['1weekDate']: + if message['author']['username'] == 'pootlebot' and 'inactivity' in message['message']: +x = {'name': entry['name'], + 'title': entry['title'], + 'id': entry['id']} +statList['reportList']['abandonedPatches'].append(x) if row['status'] == 'NEW': doBlock = False @@ -715,6 +727,7 @@ def analyze_reports(): else: patchset = 1 txt = '' + if xDate < cfg['1monthDate'] and not doBlock: # gerrit cli sucks and doesn't accept changeset,patchrev but only uses numericID if 'A polite ping' in txt: diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 49a0e91..9f54321 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -199,10 +199,19 @@ def report_mentoring(): reviewer['name'], reviewer['month'], reviewer['year']), file=fp) - -print("+ big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp) -for row in statList['reportList']['award_1st_email']: -print(' {} {} {}'.format(row['name'],row['email'],row['license']), file=fp) +if statList['reportList']['abandonedPatches']: + print("+ Patches automatically abandoned:", file=fp) + for patch in statList['reportList']['abandonedPatches']: +print('{} ( {} )'.format( +patch['title'], +patch['name']), file=fp) +print('- https://gerrit.libreoffice.org/#/c/{}'.format( +patch['id']), file=fp) + +if statList['reportList']['award_1st_email']: +print("+ big CONGRATULATIONS to contributors who have at least 1 merged patch, since last report:", file=fp) +for row in statList['reportList']['award_1st_email']: +print(' {} {} {}'.format(row['name'],row['email'],row['license']), file=fp) fp.close() return commit e31384ccc4c0eab44d9849fda18faa03bdfef51b Author: Xisco Fauli AuthorDate: Fri Oct 4 17:08:23 2019 +0200 Commit: Xisco Fauli CommitDate: Fri Oct 4 17:09:03 2019 +0200 ESC: ignore jenkinscollaboraoffice from reviewers diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index dc9c1c0..05e8e26 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -798,7 +798,8 @@ 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' and i != 'fake-em...@fake-email-script-esc.com' and i != '*dummy*': +if i != 'c...@libreoffice.org' and i != 'fake-em...@fake-email-script-esc.com' and \ +i
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py esc-reporting/qa-tools.py
esc-reporting/esc-analyze.py |1 esc-reporting/esc-report.py |9 ++- esc-reporting/qa-tools.py| 113 +-- 3 files changed, 64 insertions(+), 59 deletions(-) New commits: commit ae655e2ad310c367000ff8e01e259721ee11b50d Author: Xisco FauliDate: Thu Jan 11 12:41:57 2018 +0100 Remove unused variable causing KeyError exception See: https://redmine.documentfoundation.org/issues/2455 + Avoid list index out of range diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 4925961..734de84 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -308,7 +308,6 @@ 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']['mentor...@documentfoundation.org'] statNewDate = cfg['1yearDate'] statOldDate = cfg['nowDate'] for key, row in gerritData['patch'].items(): diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index f23840d..4cbeeca 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -193,13 +193,18 @@ def report_mentoring(): if i1 == 'cleanup_comments': print('\n ', end='', file=fp) print("\n+ top 5 contributors:", file=fp) -for i in range(0, 5): +print(statList['reportList']['top10commit']) +for i in range(0, len(statList['reportList']['top10commit'])): + if i == 5: + break print(' {} made {} patches in 1 month, and {} patches in 1 year'.format( statList['reportList']['top10commit'][i]['name'], statList['reportList']['top10commit'][i]['month'], statList['reportList']['top10commit'][i]['year']), file=fp) print("+ top 5 reviewers:", file=fp) -for i in range(0, 5): +for i in range(0, len(statList['reportList']['top10review'])): + if i == 5: + break print(' {} made {} review comments in 1 month, and {} in 1 year'.format( statList['reportList']['top10review'][i]['name'], statList['reportList']['top10review'][i]['month'], commit 86f546c4a9da52d2483a0272a4900126a8bf54ac Author: Xisco Fauli Date: Wed Jan 10 19:36:48 2018 +0100 QA tools: some minor changes diff --git a/esc-reporting/qa-tools.py b/esc-reporting/qa-tools.py index 8a15fea..35d490b 100755 --- a/esc-reporting/qa-tools.py +++ b/esc-reporting/qa-tools.py @@ -34,7 +34,7 @@ untouchedPeriodDays = 365 inactiveAssignedPeriodDays = 90 -targets_list = ['5.3.7', '5.4.3', '6.0.0'] +targets_list = ['5.4.4', '6.0.0'] periods_list = [30, 60, 90, 180] @@ -724,22 +724,22 @@ def analyze_bugzilla(statList, bugzillaData, cfg): if rowStatus == 'UNCONFIRMED' and comments[-1]['creator'] != creatorMail and \ datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['retestPeriod']: if 'untouchedUnconfirmed' not in lResults: -lResults['untouchedUnconfirmed'] = [[],[]] -lResults['untouchedUnconfirmed'][0].append(rowId) - lResults['untouchedUnconfirmed'][1].append(comments[-1]['creator']) +lResults['untouchedUnconfirmed'] = [] +tup = (rowId, row['last_change_time']) +lResults['untouchedUnconfirmed'].append(tup) elif rowStatus == 'NEEDINFO' and comments[-1]['creator'] == creatorMail and \ -datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['retestPeriod']: +datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") >= cfg['retestPeriod']: if 'NeedInfoProvided' not in lResults: -lResults['NeedInfoProvided'] = [[],[]] -lResults['NeedInfoProvided'][0].append(rowId) - lResults['NeedInfoProvided'][1].append(comments[-1]['creator']) +lResults['NeedInfoProvided'] = [] +tup = (rowId, row['last_change_time']) +lResults['NeedInfoProvided'].append(tup) else: if rowStatus == 'UNCONFIRMED' and \ datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") < cfg['retestPeriod']: if 'Unconfirmed1Comment' not in lResults: -lResults['Unconfirmed1Comment'] = [[],[]] -lResults['Unconfirmed1Comment'][0].append(rowId) -lResults['Unconfirmed1Comment'][1].append(creatorMail) +
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py |4 ++-- esc-reporting/esc-report.py |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit e5a33b0cbe16def49811444a2239acfb3ad618c6 Author: ShinnokDate: Wed Dec 13 11:36:41 2017 +0100 Disable UI reports mailed directly to Heiko. Change-Id: I1294290e90ab08a090ccfdbb89716f88c478e4b5 Reviewed-on: https://gerrit.libreoffice.org/46377 Reviewed-by: Heiko Tietze Tested-by: Heiko Tietze diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 028e133..b4b38b4 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -529,7 +529,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_ui_report.txt'} +return None commit 1346ed3572125857d9cf4e0d40e47f0f44c40972 Author: Shinnok Date: Mon Dec 18 09:07:18 2017 +0100 Update mentor e-mail to mentor...@documentfoundation.org. Change-Id: I93c80e21127e92cfe162bd07e4c8146759c8ceea Reviewed-on: https://gerrit.libreoffice.org/46688 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e0458d3..578e625 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -308,7 +308,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']['ad...@shinnok.com'] +x1 = statList['people']['mentor...@documentfoundation.org'] statNewDate = cfg['1yearDate'] statOldDate = cfg['nowDate'] for key, row in gerritData['patch'].items(): @@ -735,7 +735,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 == 'ad...@shinnok.com' and 'reviewName' in statList['people'][ownerEmail]['gerrit']: + if not email == 'aniste...@gmail.com' and not email == 'mentor...@docmentfoundation.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: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 65 +++ esc-reporting/esc-report.py |4 ++ 2 files changed, 40 insertions(+), 29 deletions(-) New commits: commit ab55601b7eac2f52100ca77edd75c73dea66f665 Author: Xisco FauliDate: Thu Sep 14 17:34:06 2017 +0200 Add top 10 confirmers to the esc minutes diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 16ced70..756de84 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -505,7 +505,8 @@ def analyze_esc(): statList['data']['esc']['MAB'] = {} statList['escList']['QAstat'] = {'top15_squashers' : {}, 'top15_reporters' : {}, - 'top15_fixers' : []} + 'top15_fixers' : [], + 'top15_confirmers' : []} for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_closers']: statList['escList']['QAstat']['top15_squashers'][str(line['who'])] = line['closed'] for line in bugzillaESCData['ESC_QA_STATS_UPDATE']['top15_reporters']: @@ -517,31 +518,43 @@ def analyze_esc(): statList['escList']['MostPressingBugs'][type]['list'][id] = bugzillaData['bugs'][id]['summary'] bug_fixers = {} +bug_confirmers = {} for id, bug in bugzillaData['bugs'].items(): - if (bug['status'] == 'RESOLVED' or bug['status'] == 'VERIFIED' or bug['status'] == 'CLOSED') and 'FIXED' == bug['resolution']: + if ((bug['status'] == 'RESOLVED' or bug['status'] == 'VERIFIED' or bug['status'] == 'CLOSED') and 'FIXED' == bug['resolution']) or \ + bug['is_confirmed']: -who = None +fixer = None +confirmer = None for i in range(len(bug['history'])-1,-1,-1): - fixed = False changes = bug['history'][i]['changes'] when = datetime.datetime.strptime(bug['history'][i]['when'], "%Y-%m-%dT%H:%M:%SZ") for j in range(0,len(changes)): -if changes[j]['added'] == 'FIXED' and when >= cfg['1weekDate']: - fixed = True - break - if fixed: -who = bug['history'][i]['who'].lower() -break -if who and who != 'libreoffice-comm...@lists.freedesktop.org': - 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[str(who)] += 1 +if when >= cfg['1weekDate']: + if changes[j]['field_name'] == 'resolution' and changes[j]['added'] == 'FIXED': +fixer = bug['history'][i]['who'].lower() + if changes[j]['field_name'] == 'is_confirmed' and changes[j]['added'] == '1': +confirmer = bug['history'][i]['who'].lower() + +if fixer and fixer != 'libreoffice-comm...@lists.freedesktop.org': + if fixer in statList['aliases']: +fixer = statList['aliases'][fixer] + if fixer in statList['people']: +fixer = statList['people'][fixer]['name'] + if not fixer in bug_fixers: +bug_fixers[fixer] = 0 + bug_fixers[str(fixer)] += 1 + +if confirmer and confirmer != 'libreoffice-comm...@lists.freedesktop.org': + if confirmer in statList['aliases']: +confirmer = statList['aliases'][confirmer] + if confirmer in statList['people']: +confirmer = statList['people'][confirmer]['name'] + if not confirmer in bug_confirmers: +bug_confirmers[confirmer] = 0 + bug_confirmers[str(confirmer)] += 1 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 diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 5850bd6..458fbf7 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -253,6 +253,10 @@ def report_esc_prototype(): x = statList['escList']['QAstat']['top15_fixers'] for name, count in [(k, x[k]) for k in sorted(x, key=x.get, reverse=True)][0:10]: txt += ' {:<23} {}\n'.format(name, count) +txt += '\n+ top 10 bugs confirmers:\n' +x = statList['escList']['QAstat']['top15_confirmers'] +for name, count in [(k, x[k]) for k in sorted(x, key=x.get, reverse=True)][0:10]: + txt += ' {:<23} {}\n'.format(name, count) escPrototype = escPrototype.replace('$', txt) txt = '' commit a13367770ff96e2e0c150706cd14ffc0be8a790c Author: Xisco Fauli Date: Thu Sep 14 17:04:33 2017 +0200 Fix incorrect data in esc's top 10 fixers diff --git
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py scripts/Bugzilla.pm scripts/build-portal.pl scripts/esc-bug-stats.pl
esc-reporting/esc-analyze.py |2 esc-reporting/esc-report.py | 331 +++-- scripts/Bugzilla.pm | 156 --- scripts/build-portal.pl | 65 -- scripts/esc-bug-stats.pl | 420 --- 5 files changed, 80 insertions(+), 894 deletions(-) New commits: commit 130167c4d178b01a86ca5059830d4e5d0868a7e1 Author: jan IversenDate: Thu Apr 27 14:25:55 2017 +0200 axed ESC script after agreement with mmeeks diff --git a/scripts/Bugzilla.pm b/scripts/Bugzilla.pm deleted file mode 100644 index 6d84135..000 --- a/scripts/Bugzilla.pm +++ /dev/null @@ -1,156 +0,0 @@ -package Bugzilla; - -use strict; -use warnings; -use URI::Escape qw(uri_escape); - -our ($bugserver); -our @EXPORT_OK = qw(bugserver get_url get_deps get_query read_bugstats); - -# Please take the time to check that the script still runs -# before changing this to something else. -$bugserver = "bugs.documentfoundation.org"; - -# use me for testing XML pretty printing etc. -my $fast_debug = 0; - -sub get_url($) -{ -my $url = shift; -my @lines; -my $handle; -open ($handle, "curl -A 'Mozilla/4.0' -k -s '$url' 2>&1 |") || die "can't exec curl: $!"; -while (<$handle>) { - push @lines, $_; -} -close ($handle); -return @lines; -} - -sub get_deps($) -{ -my ($url) = @_; - -return 42 if ($fast_debug); - -my @bugs = get_url($url); - -my $bug_count = -1; -while (my $line = shift (@bugs)) { - if ($line =~ m/does not depend on any open bugs/) { - $bug_count = 0; - last; - } - elsif ($line =~ m/^\s*depends on\s*$/) { - $line = shift @bugs; -# print STDERR "Have depends on '$line'\n"; - if ($line =~ m/^\s*(\d+)\s*$/) { - my $num = $1; - $line = shift @bugs; - $line = shift @bugs; - if ($line =~ m/bugs:/) { - $bug_count = $num; - last; - } - } elsif ($line =~ m/\s+one\s+/) { # special case for one - $bug_count = 1; - last; - } else { - print STDERR "odd depends on follow-on: '$line'\n"; - } - } -} -return $bug_count; -} - -sub get_query($) -{ -my ($url) = @_; - -return 6 if ($fast_debug); - -my @bugs = get_url($url); - -my $bug_count = -1; -while (my $line = shift (@bugs)) { - if ($line =~ m/(\d+) bugs found./) { - $bug_count = $1; - last; - } elsif ($line =~ m/One bug found./) { - $bug_count = 1; - last; - } elsif ($line =~ m/Zarro Boogs found./) { - $bug_count = 0; - last; - } -} -return $bug_count; -} - -sub extract_number($) -{ -my $line = shift; -chomp ($line); -$line =~ s/^.*\"\>//; -$line =~ s/<.*$//; -return $line; -} - -sub read_bugstats($) -{ -my @lines = get_url(shift); - -my $debug = 0; - -my $region = 'header'; -my $closer_name; -my %closed_stats; -my $delta = 0; - -while ((my $line = shift @lines) && $region ne 'end') { - print STDERR "$region -> $line\n" if ($debug); - if ($region eq 'header' && $line =~ /Top .* modules<\/h2>/) { - $region = 'top-modules'; - - } elsif ($region eq 'top-modules' && -$line =~ /LibreOffice<\/td>/) { - my ($total, $opened, $closed); - $total = extract_number (shift @lines); - $opened = extract_number (shift @lines); - $closed = extract_number (shift @lines); - my $sign = '', $delta = $opened + $closed; - $sign = '+' if ($delta > 0); - print STDERR "$opened$closed($sign$delta overall)\n"; - $region = 'seek-end-top-modules'; - - } elsif ($region eq 'seek-end-top-modules' && -$line =~ /Top .* bug closers<\/h2>/) { - $region = 'top-closers'; - - } elsif ($region eq 'top-closers' && $line =~ m// || $line =~ m/Top .* bug reporters/)) { - $region = 'end'; - - } elsif ($region eq 'top-closer-name' && $line =~ m/(.*)<\/span>/) { - $closer_name = $1; - print STDERR "$closer_name\n" if ($debug); - $region = 'top-closer-count'; - - } elsif ($region eq 'top-closer-count' && $line =~ m/">([0-9]+)<\/a><\/td>/) { - die "no closer name for '$line'" if (!defined $closer_name); - $closed_stats{$closer_name} = $1; - print STDERR "\tRecord: $closer_name -> $1\n" if ($debug); - $region = 'top-closers' - } -} - -$region eq 'end' || die "Failed to parse weekly bug summary - in region '$region'"; - -return \%closed_stats; -} - -1; diff --git a/scripts/build-portal.pl b/scripts/build-portal.pl deleted file mode 100755 index 2e8edcc..000 ---
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 10 +- esc-reporting/esc-report.py |3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) New commits: commit fa774b3b6715b9d2046b85af56815def459d2832 Author: Xisco FauliDate: Wed Dec 21 14:02:07 2016 +0100 add my email diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index b08dae6..761cde1 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -496,7 +496,8 @@ def report_qa(): max_width), file=fp) fp.close() -return None +return {'title': 'esc_report, QA', 'mail': 'xiscofa...@libreoffice.org', +'file': '/tmp/esc_qa_report.txt'} def report_myfunc(): commit 6e4cc56a1eb0ed2d78008f8f4b2705faf5a20bee Author: Xisco Fauli Date: Wed Dec 21 14:01:05 2016 +0100 check that keywords are still present in the bug diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 3aa3930..2e10e19 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -447,16 +447,16 @@ def analyze_qa(): if entry['field_name'] == 'keywords': keywordsAdded = entry['added'].split(", ") for keyword in keywordsAdded: -if keyword == 'bisected': +if keyword == 'bisected' and 'bisected' in row['keywords']: util_build_period_stat(xDate, email, 'qa', 'bisected') -if keyword == 'bibisected': +if keyword == 'bibisected' and 'bibisected' in row['keywords']: util_build_period_stat(xDate, email, 'qa', 'bibisected') -if keyword == 'regression': +if keyword == 'regression' and 'regression' in row['keywords']: util_build_period_stat(xDate, email, 'qa', 'regression') -if keyword == 'haveBacktrace': +if keyword == 'haveBacktrace' and 'haveBacktrace' in row['keywords']: util_build_period_stat(xDate, email, 'qa', 'backtrace') elif entry['field_name'] == 'resolution': - if entry['added'] == 'FIXED': + if entry['added'] == 'FIXED' and row['resolution'] == 'FIXED': util_build_period_stat(xDate, email, 'qa', 'fixed') def analyze_myfunc(): ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] dev-tools.git: 2 commits - esc-reporting/esc-analyze.py esc-reporting/esc-report.py
esc-reporting/esc-analyze.py | 25 ++--- esc-reporting/esc-report.py | 34 -- 2 files changed, 46 insertions(+), 13 deletions(-) New commits: commit 017c974d29b87bdfa18f57aab462f51e754f1351 Author: Xisco FauliDate: Sun Dec 11 21:45:33 2016 +0100 Create top 10 bug reporters diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index e5571ca..e2713ff 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -81,7 +81,7 @@ def util_dump_file(fileName, rawList): def util_build_period_stat(cfg, statList, xDate, email, status, pstatus, base = 'gerrit'): for i in '1year', '3month', '1month', '1week': - if xDate > cfg[i + 'Date']: + if xDate >= cfg[i + 'Date']: if email is not None: statList['people'][email][base][i][pstatus] += 1 statList['people'][email][base][i]['total'] += 1 @@ -192,8 +192,14 @@ def util_create_statList(): def util_check_mail(name, mail, statList, combineMail): if mail in combineMail: mail = combineMail[mail] + if not mail in statList['people']: + if not name: +name = '*UNKNOWN*' statList['people'][mail] = util_create_person_gerrit(name, mail) +elif name and name != '*UNKNOWN*': + statList['people'][mail]['name'] = name + return mail @@ -384,7 +390,7 @@ def analyze_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): print("qa: analyze bugzilla", flush=True) for key, row in bugzillaData['bugs'].items(): - email = util_check_mail('*UNKNOWN*', row['creator'], statList, cfg['contributor']['combine-email']) + email = util_check_mail(row['creator_detail']['real_name'], row['creator'], statList, cfg['contributor']['combine-email']) xDate = datetime.datetime.strptime(row['last_change_time'], "%Y-%m-%dT%H:%M:%SZ") creationDate = datetime.datetime.strptime(row['creation_time'], "%Y-%m-%dT%H:%M:%SZ") if xDate > cfg['cutDate']: diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py index 8865f6c..a2c7a7b 100755 --- a/esc-reporting/esc-report.py +++ b/esc-reporting/esc-report.py @@ -389,13 +389,15 @@ def report_ui(statList, openhubData, gerritData, gitData, bugzillaData, cfg): def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): -tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1month']['total']), reverse=True) +tmpClist = sorted(statList['people'], key=lambda k: (statList['people'][k]['qa']['1week']['owner']), reverse=True) top10list = [] for i in tmpClist: if i != 'qa-ad...@libreoffice.org' and i != 'libreoffice-comm...@lists.freedesktop.org': -x = {'mail': i, 'name': statList['people'][i]['name'], - 'month' :statList['people'][i]['qa']['1month']['total'], - 'year':statList['people'][i]['qa']['1year']['total']} +x = {'mail': i, + 'name': statList['people'][i]['name'], + 'week' :statList['people'][i]['qa']['1week']['owner'], + 'month' :statList['people'][i]['qa']['1month']['owner'], + '3month':statList['people'][i]['qa']['1month']['owner']} top10list.append(x) if len(top10list) >= 10: break @@ -439,10 +441,11 @@ def report_qa(statList, openhubData, gerritData, gitData, bugzillaData, cfg): {'db': 'trendQA', 'tag': '100+', 'text': '100+'}] print(util_build_matrix('distribution', xRow, None, statList), end='', file=fp) -print("\n+ top 10 contributors:", file=fp) +print("\n+ top 10 bugs reporters:", file=fp) +xRow = [] for i in range(0, 10): - print(' {} made {} changes in 1 month, and {} changes in 1 year'.format( -top10list[i]['mail'], top10list[i]['month'], top10list[i]['year']), file=fp) + print(' {} reported {} bugs in 1 week, {} bugs in 1 month and {} bugs in 3 months'.format( +top10list[i]['name'], top10list[i]['week'], top10list[i]['month'], top10list[i]['3month']), file=fp) fp.close() return None commit 6b94466cb722c21b56c589434ec00a75055a2c33 Author: Xisco Fauli Date: Sun Dec 11 20:38:51 2016 +0100 Add unconfirmed bugs to the report diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py index 7e68938..e5571ca 100755 --- a/esc-reporting/esc-analyze.py +++ b/esc-reporting/esc-analyze.py @@ -178,7 +178,9 @@ def util_create_statList(): '1month': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, 'VERIFIED': 0, 'CLOSED': 0, 'NEEDINFO': 0, 'PLEASETEST': 0, 'commented': 0, 'total': 0}, '1week': {'UNCONFIRMED': 0, 'NEW': 0, 'ASSIGNED': 0, 'REOPENED': 0, 'RESOLVED': 0, -