GNU bug report logs - #61527
[PATCH] Add edgelist graph backend

Previous Next

Package: guix-patches;

Reported by: Kyle Andrews <kyle <at> posteo.net>

Date: Wed, 15 Feb 2023 05:31:01 UTC

Severity: normal

Tags: patch

Merged with 61888

Full log


Message #8 received at 61527 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Kyle Andrews <kyle <at> posteo.net>, 61527 <at> debbugs.gnu.org
Subject: Re: [bug#61527] [PATCH] Add edgelist graph backend
Date: Wed, 15 Feb 2023 17:32:47 +0100
Hi,

On Wed, 15 Feb 2023 at 05:21, Kyle Andrews <kyle <at> posteo.net> wrote:
> Dear Guix,
>
> I would like to be able to conveniently analyze Guix package
> dependencies using general purpose network analysis software such as
> igraph. To achieve this, I have added another backend to Guix and which
> is exposed via guix graph which spits out a three column table that,
> while not technically and edge list, is readily transformed into one
> with minimal data munging.

You might be interested by [1] where I export all the packages as
JSON-like (Python dictionary) and then import with python-networkx.

Feel free to report your analyses, I am very interested by such. :-)


1: https://yhetil.org/guix/874ju4qyd4.fsf <at> gmail.com

> +(define (emit-edgelist-prologue name port)
> +  (display "" port))

Here, I would add the description of the data as header of the CSV-like
file.  For instance, something:

--8<---------------cut here---------------start------------->8---
# type, name-or-edge1, item-or-edge2
# package, name, item
# depends, edge1, edge2
--8<---------------cut here---------------end--------------->8---

Well, is this format a standard format for representing graph?

From igraph documentation [1], it reads ’igraph_read_graph_edgelist’:

        This format is simply a series of an even number of non-negative
        integers separated by whitespace. The integers represent vertex
        IDs. Placing each edge (i.e. pair of integers) on a separate
        line is not required, but it is recommended for
        readability. Edges of directed graphs are assumed to be in
        "from, to" order.

so maybe it could be nice to use this plain list for the edgelist
backend.  WDYT?

1: https://igraph.org/c/doc/igraph-Foreign.html#igraph_read_graph_edgelist


Cheers,
simon





This bug report was last modified 2 years and 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.