diff mbox series

[04/11] support/scripts/pkg-stats: do not exclued pkg name in json output

Message ID 20200103151849.10956-5-heiko.thiery@gmail.com
State Changes Requested
Headers show
Series pkg-stats json output improvements | expand

Commit Message

Heiko Thiery Jan. 3, 2020, 3:18 p.m. UTC
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 support/scripts/pkg-stats | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Jan. 3, 2020, 3:24 p.m. UTC | #1
On Fri,  3 Jan 2020 16:18:41 +0100
Heiko Thiery <heiko.thiery@gmail.com> wrote:

> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>

But isn't the package name already present in
http://autobuild.buildroot.net/stats/index.json ? All the subnodes of
/packages/ are nodes named after the packages.

Thomas
Heiko Thiery Jan. 3, 2020, 4:29 p.m. UTC | #2
Am Fr., 3. Jan. 2020 um 16:24 Uhr schrieb Thomas Petazzoni
<thomas.petazzoni@bootlin.com>:
>
> On Fri,  3 Jan 2020 16:18:41 +0100
> Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> > Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
>
> But isn't the package name already present in
> http://autobuild.buildroot.net/stats/index.json ? All the subnodes of
> /packages/ are nodes named after the packages.

When handling a package node I dont have the knowledge of the name. Or
I have to passing the name also to the render function:
https://github.com/hthiery/buildroot-stats/blob/master/app/routes.py#L67

This is also possible. But I thought it is a good idea to do so.

> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
diff mbox series

Patch

diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 92fc01d655..4021aacceb 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -676,7 +676,7 @@  def dump_html(packages, stats, date, commit, output):
 def dump_json(packages, stats, date, commit, output):
     # Format packages as a dictionnary instead of a list
     # Exclude local field that does not contains real date
-    excluded_fields = ['url_worker', 'name']
+    excluded_fields = ['url_worker']
     pkgs = {
         pkg.name: {
             k: v