From 752fa08702f8d0f9187a198af5c757a31df4a6f2 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sat, 11 Jun 2016 16:03:12 +0200 Subject: reproducible debian: fix the ordering of score functions using OrderedDict, round sqrt to int Signed-off-by: Holger Levsen --- bin/reproducible_html_notes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bin/reproducible_html_notes.py') 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]) -- cgit v1.2.3-54-g00ecf