public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Owen W. Taylor <otaylor@fishsoup.net>
To: git-commits@fedoraproject.org
Subject: [flatpaks/flatpak-runtime] f45: generate-app-reports.py: Add sorting to generated results
Date: Fri, 11 Sep 2026 14:40:25 GMT [thread overview]
Message-ID: <178913762559.1.3889614099627870642.flatpaks-flatpak-runtime-af13e99cb19e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : flatpaks/flatpak-runtime
Branch : f45
Commit : af13e99cb19eed6c8dff2f996c489da971d0a6fe
Author : Owen W. Taylor <otaylor@fishsoup.net>
Date : 2020-03-20T21:51:58+01:00
Stats : +8/-4 in 1 file(s)
URL : https://src.fedoraproject.org/flatpaks/flatpak-runtime/c/af13e99cb19eed6c8dff2f996c489da971d0a6fe?branch=f45
Log:
generate-app-reports.py: Add sorting to generated results
Sorting the output JSON files makes it easier to tell what changed.
---
diff --git a/tools/generate-app-reports.py b/tools/generate-app-reports.py
index 6e7f29d..f4b312b 100755
--- a/tools/generate-app-reports.py
+++ b/tools/generate-app-reports.py
@@ -240,7 +240,10 @@ output = []
apps = set(id_to_application.values())
packaged_apps = {a for a in apps if a.package is not None}
-top_packaged_apps = sorted(packaged_apps, key=lambda a: -(a.star_total or 0))[0:100]
+
+top_packaged_apps = sorted(packaged_apps, key=lambda a: a.package)
+top_packaged_apps.sort(key=lambda a: -(a.star_total or 0))
+top_packaged_apps = top_packaged_apps[0:100]
info_json = subprocess.check_output(['fedmod', 'flatpak-report'] + [a.package for a in packaged_apps])
info = json.loads(info_json)
@@ -266,7 +269,8 @@ for p, i in top_info['packages'].items():
def dict_to_list(packages):
result = []
- for p, i in packages.items():
+ for p in sorted(packages.keys()):
+ i = packages[p]
x = {
'package': p,
'all': sorted(i['all']),
@@ -284,7 +288,7 @@ with open('reports/application-packages.json', 'w') as f:
json.dump({
'runtime': dict_to_list(runtime_packages),
'extra': dict_to_list(extra_packages),
- }, f)
+ }, f, indent=4, sort_keys=True)
def sanitize_piece(m):
if m.group(1) is not None:
@@ -351,4 +355,4 @@ with open('reports/applications.json', 'w') as f:
['ODRS review, not in Flathub or Flathub', review_only],
['Total', fedora_appstream + no_appstream + flathub + review_only],
]
- }, f, indent=4)
+ }, f, indent=4, sort_keys=True)
reply other threads:[~2026-09-11 14:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913762559.1.3889614099627870642.flatpaks-flatpak-runtime-af13e99cb19e@fedoraproject.org \
--to=otaylor@fishsoup.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox