From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sJJlOYUJ7WMFQQEAbAwnHQ (envelope-from ) for ; Wed, 15 Feb 2023 17:34:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kHgJOYUJ7WNq8QAAauVa8A (envelope-from ) for ; Wed, 15 Feb 2023 17:34:13 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7B2382A659 for ; Wed, 15 Feb 2023 17:34:13 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="jwNTb/MS"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676478853; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eigV7drV3uP9KCIfVNbWRt/BPX9bTfNIEB8UZZ/0Ilc=; b=cktM64pUbjHhmdst8yR/AijepjV4qqMieeYBPfSNhD8uz6qWNmuuDCu/9QrcBb0m4U4IDu 8W1fBee+6SPKtowSbyq89/z6ADxAPT19Nrc0mWWBEvrY5X9dS1P+1SyjLP+VZdxcRb8y8V uBSLtQsEDm4hd8ueEuDRJaAROmvCdQhIa1oAZp160VNDQgVWiXrF5nx4K4g94bQa8EKMQP VCFbCwIiYbGpviKH01Afr09LOL67LEDb4lploLoEU5coX6yqPNSdeFUOwdFOr+fh/j1uw4 E378VBVLfq1R2wtPZGCqQG2+OhtM9KrvhxSKHJTBBf7B/QJBCoejOLci1iwE3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="jwNTb/MS"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676478853; a=rsa-sha256; cv=none; b=caH4LEj8rny/JQq3VXyDpVZKpKgbsztDlkDv0Ltf9p1bUvZvMxxp9mBQp7iofAbwY60DkI A7g4lUL76taOz0qvG17JLvoXsGrpbq0ESaS/PgucYxNo+y/Ay4KiTxMWHxC0BVebgs+ogC vRT3GkW1Xcjb3VN37uP4A/POylgAg2K7y/e6KHeBaL3r2x78i0kMjOQ8KIVK0gmMQ42HVb LCRpnix2AtFfSdqENjOJ3pcdLYO7wR7+yB2Np7Q3iPS6H1XBqDrdX8+TySpw0T1nGsUPzA nZ+pYiFeGrUEpD9Tbw4spidpsCH2KPZLAcKtH1tlBbysDefi8bL6DNt0202Z/Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSKjN-0001t6-5E; Wed, 15 Feb 2023 11:34:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSKjL-0001sh-Kq for guix-patches@gnu.org; Wed, 15 Feb 2023 11:34:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSKjL-0005DS-4u for guix-patches@gnu.org; Wed, 15 Feb 2023 11:34:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSKjK-0001CW-FD for guix-patches@gnu.org; Wed, 15 Feb 2023 11:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61527] [PATCH] Add edgelist graph backend Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Feb 2023 16:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61527 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Kyle Andrews , 61527@debbugs.gnu.org Received: via spool by 61527-submit@debbugs.gnu.org id=B61527.16764787954543 (code B ref 61527); Wed, 15 Feb 2023 16:34:02 +0000 Received: (at 61527) by debbugs.gnu.org; 15 Feb 2023 16:33:15 +0000 Received: from localhost ([127.0.0.1]:33758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSKiY-0001BC-D1 for submit@debbugs.gnu.org; Wed, 15 Feb 2023 11:33:14 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:37845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSKiV-0001Au-Sm for 61527@debbugs.gnu.org; Wed, 15 Feb 2023 11:33:12 -0500 Received: by mail-wr1-f49.google.com with SMTP id m10so10844398wrn.4 for <61527@debbugs.gnu.org>; Wed, 15 Feb 2023 08:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1676478786; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eigV7drV3uP9KCIfVNbWRt/BPX9bTfNIEB8UZZ/0Ilc=; b=jwNTb/MSGL3nKwHujq53zOh4To5JnsbmQOJnG/N8tYs7+6CdCCTEIstBeIcKpM+i95 va2a4eMFTWsgla4yhGKlateITWxEnXpB6hS8X1FHnC/UVo6oxm6LZDcxH5gcob3qek2u w8DYQ/SkZXnUTWlACa87dtuoEeYt0RiXOPEyOqsNv84NLeYnvanXvYm+us7NLb+GFzKo mkKIdOpD+cSA5ra+YZ8d+DQkwmGFKRHHTfT6HckdWMzLLAF6G1MLlrlF43FjUbfdrbN/ Y3n2aEeoyOEVhf3jkvk1wGUt6SD8RYBRpIVeWnLOT81yj18/TrpFJuR7RrliuEcM2S/H 3mug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676478786; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=eigV7drV3uP9KCIfVNbWRt/BPX9bTfNIEB8UZZ/0Ilc=; b=LZKu9LxqHoIE4Ya3BdvCJvMvETnVCuehTJc3HfJWUpmR9Th4Tp9ZxcTYl84HmgZx1+ s9hUCW2SB5oAlSs4YlD1KaHSpN5QWqTgbF+Z9C7bVUG+F1xX912kWWp60lulEfNNctIq Z5EOnwEIbKHaFutb7aL54fgW1I4+VIzv2/0QMNvV9v0VNebmTmUu8alwXBJ/swlnSJOf O6UWjY29jCOTfIWcm9H+y9keYwmx5j62XBs30GClD8V2jSre5A9jh38A6+L51URI+Xy/ SadjSUNCTDcLiE8yVnml8EyIUT/eqWJkcRSqoF01AzinH/+gPPT3l5VsVL5j5GHv9BsW 5bRg== X-Gm-Message-State: AO0yUKXRTbJuk9cACk67KklE+eDbG9d/kpDjMHE5woOD7pUIASu2GTBt jTnWB5/RTAvBhy0P8U8tTJOGB+tV5M4= X-Google-Smtp-Source: AK7set+FicAwITKGBJDhnO3JO4oTh4uexumP4x8V+AjyPHKF6aVFJE6Y9ezQ/46Iw/YxHmQENEc96A== X-Received: by 2002:adf:dd82:0:b0:2c3:d296:7a94 with SMTP id x2-20020adfdd82000000b002c3d2967a94mr1573745wrl.3.1676478785861; Wed, 15 Feb 2023 08:33:05 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id h12-20020adff4cc000000b002be505ab59asm16176885wrp.97.2023.02.15.08.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 08:33:05 -0800 (PST) From: Simon Tournier In-Reply-To: <875yc3sdfo.fsf@posteo.net> References: <875yc3sdfo.fsf@posteo.net> Date: Wed, 15 Feb 2023 17:32:47 +0100 Message-ID: <86h6vmdh3k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: 7B2382A659 X-Spam-Score: 5.08 X-Migadu-Spam-Score: 5.08 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: p265q8ZrkRxF Hi, On Wed, 15 Feb 2023 at 05:21, Kyle Andrews 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@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 =E2=80=99igraph_read_graph_edgelist= =E2=80=99: 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