[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible debian: fix the ordering of score functions using OrderedDict, round sqrt to int

Holger Levsen holger at layer-acht.org
Sat Jun 11 14:31:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 752fa08702f8d0f9187a198af5c757a31df4a6f2
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Jun 11 16:03:12 2016 +0200

    reproducible debian: fix the ordering of score functions using OrderedDict, round sqrt to int
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_html_notes.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index a0e8a03..131ca14 100755
--- a/bin/reproducible_html_notes.py
+++ b/bin/reproducible_html_notes.py
@@ -13,6 +13,7 @@
 import copy
 import popcon
 import yaml
+from collections import OrderedDict
 from math import sqrt
 from reproducible_common import *
 from reproducible_html_packages import gen_packages_html
@@ -435,11 +436,11 @@ if __name__ == '__main__':
     issues = load_issues()
     iterate_over_notes(notes)
     iterate_over_issues(issues)
-    index_issues(issues, {
-        'Total popcon score': lambda l: sum(popcon.package(*l).values()),
-        'Total of sqrt(popcon score)': lambda l: sum(map(sqrt, popcon.package(*l).values())),
-        'Total number': len,
-    })
+    index_issues(issues, OrderedDict([
+        ('Total popcon score', lambda l: sum(popcon.package(*l).values())),
+        ('Total of sqrt(popcon score)', lambda l: int(sum(map(sqrt, popcon.package(*l).values())))),
+        ('Total number', len),
+    ]))
     purge_old_notes(notes)
     purge_old_issues(issues)
     gen_packages_html([Package(x) for x in notes])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list