[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py esc-reporting/esc-collect.py esc-reporting/esc-report.py

2023-03-08 Thread Xisco Fauli (via logerrit)
 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-collect.py esc-reporting/esc-report.py

2019-05-03 Thread Libreoffice Gerrit user
 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-collect.py esc-reporting/esc-report.py

2017-05-12 Thread jan Iversen
 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 Iversen 
Date:   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-collect.py esc-reporting/esc-report.py

2017-05-07 Thread jan Iversen
 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 Iversen 
Date:   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-collect.py esc-reporting/esc-report.py

2017-04-25 Thread jan Iversen
 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 Iversen 
Date:   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

2017-02-14 Thread jan Iversen
 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 Iversen 
Date:   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-collect.py esc-reporting/esc-report.py

2017-01-10 Thread jan Iversen
 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 Iversen 
Date:   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-collect.py esc-reporting/esc-report.py esc-reporting/README

2016-11-12 Thread jan Iversen
 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 Iversen 
Date:   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':