diff options
author | Ximin Luo <infinity0@debian.org> | 2016-06-11 16:03:12 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-06-11 16:30:46 +0200 |
commit | 752fa08702f8d0f9187a198af5c757a31df4a6f2 (patch) | |
tree | 699c96c0801aadda8c8e7b9ba55ee4a715827d5d | |
parent | c5b8484dd2dd50a209dfbc12e190e4d490a03d4b (diff) | |
download | jenkins.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>
-rwxr-xr-x | bin/reproducible_html_notes.py | 11 |
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]) |