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 ms0.migadu.com with LMTPS id cAKTMRiS/mFWhgEAgWs5BA (envelope-from ) for ; Sat, 05 Feb 2022 16:04:56 +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 6ETwLRiS/mFUZgEAauVa8A (envelope-from ) for ; Sat, 05 Feb 2022 16:04:56 +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 6545C27BE8 for ; Sat, 5 Feb 2022 16:04:56 +0100 (CET) Received: from localhost ([::1]:58572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGMcR-00069i-Ak for larch@yhetil.org; Sat, 05 Feb 2022 10:04:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGMc7-00069Y-SZ for guix-devel@gnu.org; Sat, 05 Feb 2022 10:04:36 -0500 Received: from [2a0c:e300::1] (port=37142 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGMbw-0002hF-UO for guix-devel@gnu.org; Sat, 05 Feb 2022 10:04:31 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4DCC8A4B; Sat, 5 Feb 2022 16:04:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gl7tH_f-ibAq; Sat, 5 Feb 2022 16:04:19 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B9BB55AF; Sat, 5 Feb 2022 16:04:18 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Christopher Baines Subject: Re: Guix Data Service client module References: <87czs7ypb4.fsf@inria.fr> <87zgn6gbst.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 05 Feb 2022 16:04:18 +0100 In-Reply-To: <87zgn6gbst.fsf@cbaines.net> (Christopher Baines's message of "Fri, 04 Feb 2022 10:14:05 +0000") Message-ID: <878rupgxsd.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4DCC8A4B X-Spamd-Result: default: False [0.53 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.63)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a0c:e300::1 (failed) Received-SPF: softfail client-ip=2a0c:e300::1; envelope-from=ludo@gnu.org; helo=hera.aquilenet.fr X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644073496; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NBogZgAZgv56RLmbX6uv7Bn+m18OW0hkd7xb+aeyx98=; b=eF9slyWYHdZ7PUBbyX2/GHyqxdLNPxEnAvOwBtCkZox4XJMgj6QZHImKMJUXuSBz1YpuNz ELcg+d+6gwEkXxukUG09UrmbVrQHFJq/C1v9TPSL19RCIbo7e3IYsWo+NkIYO/9ootAxZf T+iGZSvC5QfXiEvhX4bwt8wlKhl3DUd5aYtlFxIHg54WsDIERfYqsKLv+fX+iT85dOSd9z ghbkUg4V1L8AJH7w/hs3y3ZvPx/Y1nydFO+8knBPoKKMEhl1CubBIgXucpmGzGtp+27Pet Ad5M4Qwtyu3XMDyoPfxAASKiORZTQVL0iejY8KafzwTYckU6qXaAZuU09ppGJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644073496; a=rsa-sha256; cv=none; b=d1tuZ/5pHdKTzYSt2oqTO8ZKXRiHUl3xnfIpfmMiAgY0EmsDyl4cq3mOA8Ot2mtJqFZc6u 1nsj/ZQ/HLI0DzXkIsr2WUitB0fdkjwYoKIO3xz4N9fRl6Yat5X/uLfN0gM9f9wwwZZyPZ c5xTyP1gkHghqy0k1ZpBqifCLyBsqqVZfsovM2H2DsfQa3fpH2pZtny/pDeaLpI6N+e1Cl rxZJNiawGEgtm0TFN7XFaynMHmkMCGMg3XHcB22prLdImbZusFlUGZ9JxKHwBb1PeVu3cC /qWqT0X2RxmI/+2WuQBlItxslIncfDvITSyAh+S3Fxv+X2ncsP0Mnxemk+/Okg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.63 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6545C27BE8 X-Spam-Score: -3.63 X-Migadu-Scanner: scn1.migadu.com X-TUID: OqLUKQvznX6P Hi! Christopher Baines skribis: > Ludovic Court=C3=A8s writes: > >> Hello Guix! >> >> Here=E2=80=99s a client module for the Guix Data Service, allowing you t= o access >> a subset of the Guix Data Service interfaces from the comfort of your >> REPL. [...] > I added some exports (included below) so that I could more easily use > the module. > > Maybe open-data-service could have the url default to > "https://data.guix.gnu.org". Sure! > The only thing I can see that's required before merging though is the > exports. I'm now thinking about this kind of thing (getting data out of > the data service) in the context of patch/branch review. I think there=E2=80=99s a couple of issues that would be nice to address in= the JSON API of the data service. First, it=E2=80=99s unversioned, which will make it hard to maintain things going forward. How about adding, say, =E2=80=9C/v1=E2=80=9D to URL paths, = similar to what SWH does? Second, there are places where I found inconsistencies or redundancy in the API. For instance there are several JSON schemas for things called =E2=80=9Cbranches=E2=80=9D (see the FIXME in there). The API to access package version history, which I think lots of users are interested in, is not intuitive IMO: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define s (open-data-service "https://data.guix.gnu.or= g")) scheme@(guile-user)> (car (package-versions (lookup-package s "emacs"))) $20 =3D #< string: "27.2" branches: (#< name: "mas= ter" repository-id: 1>)> scheme@(guile-user)> (car (package-version-history s (car (package-version-= branches $20)) "emacs")) $21 =3D #< version: "27.2" first-revision: #< commit: "cc33f50d0e2a7835e99913226cb4c4b0e9e961ae" date: #> last-revision: #< commit: "de38ccf2e0bb2fd21393925c296b65= dca7499bd3" date: #>> --8<---------------cut here---------------end--------------->8--- That said, I don=E2=80=99t have any suggestion on this one. I also wonder if there=E2=80=99s a way to obtain a commit range for a given package version, directly, without having to browse the list returned by =E2=80=98package-version-history=E2=80=99? Thanks for taking a look! Ludo=E2=80=99.