summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorXimin Luo <infinity0@debian.org>2016-06-11 16:03:12 +0200
committerHolger Levsen <holger@layer-acht.org>2016-06-11 16:30:46 +0200
commit752fa08702f8d0f9187a198af5c757a31df4a6f2 (patch)
tree699c96c0801aadda8c8e7b9ba55ee4a715827d5d /bin
parentc5b8484dd2dd50a209dfbc12e190e4d490a03d4b (diff)
downloadjenkins.debian.net-752fa08702f8d0f9187a198af5c757a31df4a6f2.tar.xz
reproducible debian: fix the ordering of score functions using OrderedDict, round sqrt to int
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_notes.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py
index a0e8a030..131ca14e 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])