From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WBO+JoqxcGMAjwAAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 09:57:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gKfGJYqxcGO3aQAAG6o9tA (envelope-from ) for ; Sun, 13 Nov 2022 09:57:46 +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 351EE3C3AE for ; Sun, 13 Nov 2022 09:57:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou8ne-0003lC-UD; Sun, 13 Nov 2022 03:57:10 -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 1ou8nc-0003kl-SR for guix-devel@gnu.org; Sun, 13 Nov 2022 03:57:08 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ou8nX-0002QV-PK for guix-devel@gnu.org; Sun, 13 Nov 2022 03:57:08 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:54d1:d5d4:280e:f699]) by mira.cbaines.net (Postfix) with ESMTPSA id 5077127BBE9; Sun, 13 Nov 2022 08:57:00 +0000 (GMT) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 1ab2490a; Sun, 13 Nov 2022 08:56:59 +0000 (UTC) References: <9vqBOZWiGUiZSkoCuukNGQ3yi98pp4JEJ42TdjCMl3hvFb0HpTZDWD8XCxWkXIwaixIoEAvGrfL-ZUsdw9jgNjOMYrFL0E973-9Cgnv4W_0=@protonmail.com> <87iljtgr72.fsf@cbaines.net> User-agent: mu4e 1.8.9; emacs 28.1 From: Christopher Baines To: Luis Felipe Cc: guix-devel Subject: Re: [Guix Website] A Search Page for Packages Date: Sun, 13 Nov 2022 08:46:42 +0000 In-reply-to: Message-ID: <87fsentep5.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; 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, T_SPF_TEMPERROR=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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org 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=1668329866; 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=THyFwq1DKqwpP26c+HQnxqM+FBO0bYOQ6PFoocC5vsE=; b=aoa3S7YaZ8yjG2r+y0/ZGrvxnYDJyiSsaZrxjf6/xIG86xChJ9go3H77v898/WTwOSF9K4 R5rYxVaCzQO2QsSVzfKFypEV34aZRHRQ8vAKdG9/jvE/ZaVZM8qh8v7B3pQlF/oBh08aEi 4HUO9/kdb6N5iu4INzT5Gitgqw5RItOwIBe4r+7bs44m/Pcnrsd2GWTyF0sBlVuNmLCH/d 4Xah4yoxPYsFPH/YYJ5tPZ3qZsV7VWan9BVzVlBOaYxyqMWmsViiYdaWH3yZEb0u4Hs3Ga P/3uMvA2Z/y5ltsdWx6DagakxA7T4vw1fy5wx630mZ6MJ4FVNrrQkaVk2Cdisw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668329866; a=rsa-sha256; cv=none; b=ad6TzsTmmnL2dLfAq70goSofNNLZyrcUBE7pzEIi7ceFrudqbDz5dRr9BsGkek149WY5dB ZGwTZZRFDjDiEju6ti00oJA9pwXh1x0A/q9WIh2VVaTO1mXsFLHeZM1HKhn3XQaT54O4ol FXe3hMWTZsK50CNX+b6afbzCC11S1tbmeZBBR8mZtRRYtaDYVQQcZzfyN7t7RXzLAZDNcG rQdjMDgAhVk/Pxi/TZsReclHFyhzW2X6spZa2AYfM2yiP8CFWMh2gzSsRiodN7PpXKFT7w k+j4NQWoTOF8+VPxH++fIQsM/XVX5YroRZFEXQZnixLLhHcSyBUIXCpb+0eZfw== 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: -3.45 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: 351EE3C3AE X-Spam-Score: -3.45 X-Migadu-Scanner: scn1.migadu.com X-TUID: yKqmUgAm2ZU4 --=-=-= Content-Type: text/plain Luis Felipe writes: >> > What Danjela produced in terms of the search is probably fine as >> > something to go with, maybe the additional thing that needs writing is >> > pages for the individual packages that the search can link to (they can >> > just be very simple initially). >> >> > But yeah, are you (or anyone else who's reading) up for hacking on this? >> >> Yeah, I'm willing to work on that. I'll start by adding support for handling requests for package detail pages. > > I have a working package browser now and will be styling it next. I'll link to a public repository later. > > However, I have some questions about the Data Service: Hey! Sorry for the slow reply. > 1. Is there any way to page through the data > (e.g. https://dev.socrata.com/docs/paging.html#2.1)? For most bits of data, yes. Although I haven't used limit/offset style pagination as that doesn't perform particularly well. The Guix Data Service web pages should help with how to use the API, so you can look at how the packages page handles pagination for example: https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/packages > 2. What would be an efficient way to get the total count of packages? > (to be used as in https://guix.gnu.org/en/packages/) You can get a count here for example [1], that also works with the latest-processed-revision URL [2]. I think the counting methadolody is a bit different to what's currently used though. 1: https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80.json 2: https://data.guix.gnu.org/repository/1/branch/master/latest-processed-revision.json > 3. Is there any way to get the "supported-systems" info of a package? The value of that specific field isn't recorded, but you could look at the derivations of the package, then just find the systems, that should be pretty close: https://data.guix.gnu.org/revision/c4025af8c11c3e9ea0c2747b6c475c916fb61d80/package/0ad/0.0.26-alpha.json Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmNwsVZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9Xc9AA//Q2OUPdA1IdH/A1Mq7JwZQcX6PVP3DMfs FAFS7yvZGwcWzyLGH/2G7/Mt+QCwTHsyl1YkXwLw6xA/S4Na1a8SqZObxbc+mXn4 qajriphtms3II0hmrlfLPh2iTlmf2xbBeEPbYe60W37q/+XYf+x/b97JeHLocMOy 7iqbtlw46O5TuTaj+pW9li1LnYkI9EiRlXkBJu9+cKTpLsizIH+M1ifR1tGPD7GU NptGsJv8YStoNIbwol3KvSuVidjaFIneDvRfBbkfp3o7blh9Xa6dPxyXPcp7z6hM z8J7FcOIi1tjx52iz1A/J3drVNgg5yBd5So22ir1E63oj9Zc73v1lMCIVvf2KgIZ bidubVVSXn1fF/CLRPw22IIadkvqkTCrPjwipU7WPNP1AY6Cn9S1G+U6OXq4FH+2 422Sw+94piCn4inSJ5JUHufddXJBZmy2zizGtbMfLyOn44sJ1vbDNd94yirB8CWK //b/0Syj+owf4RjZ+gNcbrefjpvj4w6zecVf/6a0i3ehUWqyxcEqp/yLSB2XqU/x H7PJN8+ifMJGMMUIl5VsoHVDRk98CidrTv/T2Cn7aSOXRnG+b/VU/5uE9senk3Dm CoHS89Jv6Tmyc8otVABRy67Ep19EkKW+8L0gH2PBfURb0xILyCg94tTe8tV46ehI Chih1KbgnSw= =4fJP -----END PGP SIGNATURE----- --=-=-=--