From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MAoNJ9bwC2K3EAEAgWs5BA (envelope-from ) for ; Tue, 15 Feb 2022 19:28:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KKJ1JNbwC2KLJAEA9RJhRA (envelope-from ) for ; Tue, 15 Feb 2022 19:28:38 +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 527D645A2F for ; Tue, 15 Feb 2022 19:28:38 +0100 (CET) Received: from localhost ([::1]:47794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK2Z3-00041R-1T for larch@yhetil.org; Tue, 15 Feb 2022 13:28:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK2Yk-00040t-TW for guix-devel@gnu.org; Tue, 15 Feb 2022 13:28:18 -0500 Received: from mira.cbaines.net ([212.71.252.8]:36310) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK2Yh-0005Np-H2; Tue, 15 Feb 2022 13:28:18 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id C091427BBE9; Tue, 15 Feb 2022 18:28:13 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 3c8761cd; Tue, 15 Feb 2022 18:28:13 +0000 (UTC) References: <87czs7ypb4.fsf@inria.fr> <87zgn6gbst.fsf@cbaines.net> <878rupgxsd.fsf@gnu.org> User-agent: mu4e 1.6.10; emacs 27.2 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: Guix Data Service client module Date: Tue, 15 Feb 2022 18:10:11 +0000 In-reply-to: <878rupgxsd.fsf@gnu.org> Message-ID: <87r184c7d0.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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=1644949718; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=XYf4q6IsKCFDRkqOg3OzT153qMn/G1QxOrySCTfnptw=; b=oVcXSW9V9rgs8p+nLJhwRd22qPb/y4Xhd+mxxgZX8CG1wB7wJOtZLFYEhuLMmh2uD6Qz2l s95NBLQf3LkJQU2aFn5LL++/G4TdTGRWGbla9vZS1I07jxcXc6w4W9NhB+IgkPDjvpp272 OaWm6/yp2SlkGLIhSc4XyNCAQvkxYZXGDpiR66pObhkGwXu7G1EtY4XiHXvL+G27ZRtXvx dim2fTLpfAnuwSW6tqO2SQ01s9V+A/RiuXpm70iO2BnuO+Nl0Jn2l0CU7Ni1kVxd9jK2MI Yto+MGLu3z/6kXXSorYfehOV0RyY/5WUVLKVf1Bor53048jM+9Bi2tCW0+n5HA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644949718; a=rsa-sha256; cv=none; b=PUUepyX/B6q7y+W/JbhS3D0v3wHSIw41lCM9SbYUNmWYPJXk8uuC5IOTJ9cdkCLoWPg7p+ F290RO3mVz4jH3bV4ig0fDX4xWeAcHreESSAc59UbkuZMeDCV5Txes/cC7oA/PK9y4+frS gQkFTqUJ79/OrjQV/ISDyfP6vuiFzlgOQQVcEq3FFSl0ffi3Ak076XUmTl5L9s9JJDNRcF sO01v80bCUlU8fSAWKx6hKoUE/3Ea7twgeZM/6yq2m0pDKrhH3z+2/tEJfeRcnuVRZVKro Q0qA+eJda+7uuYwgbdXfUHT7FSQ3EMw4/uWQrTmzD2+siMo+RT3It9AM7rDqQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -5.73 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 527D645A2F X-Spam-Score: -5.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: pd1tCoWQnFVW --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> 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 thin= gs > going forward. How about adding, say, =E2=80=9C/v1=E2=80=9D to URL paths= , similar to > what SWH does? I think that's a good idea. > 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). Sounds like something to investigate as well. > The API to access package version history, which I think lots of users > are interested in, is not intuitive IMO: > > scheme@(guile-user)> (define s (open-data-service "https://data.guix.gnu.= org")) > scheme@(guile-user)> (car (package-versions (lookup-package s "emacs"))) > $20 =3D #< string: "27.2" branches: (#< name: "m= aster" repository-id: 1>)> > scheme@(guile-user)> (car (package-version-history s (car (package-versio= n-branches $20)) "emacs")) > $21 =3D #< version: "27.2" first-revision: #< commit: "cc33f50d0e2a7835e99913226cb4c4b0e9e961ae" date: #> last-revision: #< commit: "de38ccf2e0bb2fd21393925c296b= 65dca7499bd3" date: #>> > > 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 giv= en > package version, directly, without having to browse the list returned by > =E2=80=98package-version-history=E2=80=99? I think the "easy" option is to just add API endpoints for useful queries, like the one you suggest above. Though, there's probably some way of providing greater access to the data. For example, if the data service could populate a tripplestore with information, you could use SPARQL to query that. I think there's also other query languages like GraphQL that are designed to address this kind of problem. Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmIL8LtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcckBAAoR1dmNjDygl/XEYukI0TADNaAi2TuU9z szHdqDPWBzioH6F/kUg5Eh/jvOsSwdfhXQ+MkRhA4Qo+XA4dLwGHu+U/fa+rPjVT Mcgm3Zpv418xCXZeYdcX2EN77k0l/mSsrdRjModbAP7B10BjXsqAcaj+HNBgTIUk ovJEqYmWAJ6BmKi9XvJgsYLlpoep/h7/Tjx2XQrNxVmiG4bhdXi5MeimFxS4qMTp j8C7YfCb4nsJNeAbAUTWP20fsDMw8uSUKQmBoCppdl6pdXIGbw6EeI8ywKpLhWIq NOUwfglqEoVEsigPyVAXXoUN0ZzUspGsFUHxmdme6BLc+ntRe0bM3nZZwe5d/fdn NYvz2oqCsqLUtYD6PPku5Bf0hINBspV4S39VAERVTSrPepjVCVY42w6ukq6yczjH /QNPg9ZAGg8fnhyJGB33EjHKg/JHXDFCI8/tnXWBDyPBIINzIOnzjufoZ3ccw+DP PVHg6HWiNBdhgFS5x8pvVkgMPd2po3M4oXGiwsIvy1WkbBBR4yqswMyxa+TK9vOM b3F6pewTScAn0pJAP2Up73bDWkounaiD1IzVhovVATiJSnPqbNuSzjkW54S9rpIW cGrWL8OJwIJ5MqUxXKYDSroQjWkd/aWWqRajr7NvztX0ngLbbTuXujqrsD50bhys wjMHwxJL8og= =X79d -----END PGP SIGNATURE----- --=-=-=--