From: Luis Felipe <luis.felipe.la@protonmail.com>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [Guix Website] A Search Page for Packages
Date: Tue, 15 Nov 2022 13:30:23 +0000 [thread overview]
Message-ID: <2B7u3iFPNl6PNQBWL19Z8NS2-D7ZyNR8CgNefdZ9ozIHufpJQYTpyqB4lokxC_YA698wOqppMkJ_gorC-vP_psbgyAVpXx_YeuPT0vGi6EI=@protonmail.com> (raw)
In-Reply-To: <87fsentep5.fsf@cbaines.net>
[-- Attachment #1.1: Type: text/plain, Size: 2255 bytes --]
------- Original Message -------
On Sunday, November 13th, 2022 at 08:46, Christopher Baines <mail@cbaines.net> wrote:
> Hey! Sorry for the slow reply.
No problem :)
> > 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
I see. Although it seems that pagination only works to page through the whole package data set and not through the results of a search. So right now the package browser can only show LIMIT, or less, number of packages after performing a search. For example:
https://data.guix.gnu.org/repository/1/branch/master/latest-processed-revision/packages?locale=en_US.UTF-8&search_query=python&field=version&field=synopsis&after_name=python-cython&limit_results=30
So one can't use "search_query" and "after_name" in the same request. I'm stuck in that part.
> > 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
Ah, I'll use that.
> > 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
I decided to link to the package builds in the CI for now, but I'll explore that option too.
Thanks, Chris.
[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1722 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]
next prev parent reply other threads:[~2022-11-15 13:31 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 16:53 [Guix Website] A Search Page for Packages Luis Felipe
2022-11-05 18:53 ` Christopher Baines
2022-11-05 19:59 ` Luis Felipe
2022-11-09 16:43 ` Luis Felipe
2022-11-13 8:46 ` Christopher Baines
2022-11-15 13:30 ` Luis Felipe [this message]
2022-11-16 16:25 ` Christopher Baines
2022-11-16 18:46 ` Luis Felipe
2022-11-16 14:55 ` Luis Felipe
2022-11-16 16:32 ` Christopher Baines
2022-11-16 18:50 ` Luis Felipe
2022-11-18 19:03 ` Luis Felipe
2022-11-19 10:51 ` Christopher Baines
2022-11-19 12:03 ` Luis Felipe
2022-11-19 13:53 ` Luis Felipe
2022-11-21 11:06 ` Ludovic Courtès
2022-11-19 16:07 ` John Kehayias
2022-11-19 16:13 ` Christopher Baines
2022-11-21 20:30 ` John Kehayias
2022-11-20 22:33 ` zimoun
2022-11-21 8:57 ` Christopher Baines
2022-11-21 17:03 ` zimoun
2022-11-22 8:23 ` Christopher Baines
2022-11-21 12:57 ` Ludovic Courtès
2022-11-21 13:21 ` Christopher Baines
2022-11-21 19:11 ` Luis Felipe
2022-11-21 19:00 ` Luis Felipe
2022-11-21 20:42 ` Julien Lepiller
2022-11-07 9:18 ` Ludovic Courtès
-- strict thread matches above, loose matches on Subject: below --
2020-07-08 18:49 Daniela Lura
2020-07-08 20:31 ` Cook, Malcolm
2020-07-08 21:00 ` pelzflorian (Florian Pelz)
2020-07-10 10:15 ` Daniela Lura
2020-07-09 0:53 ` Bengt Richter
2020-07-09 6:17 ` Pierre Neidhardt
2020-07-10 10:26 ` Daniela Lura
2020-07-09 7:47 ` Hartmut Goebel
2020-07-09 8:50 ` zimoun
2020-07-09 9:32 ` YP
2020-07-13 13:56 ` Ludovic Courtès
2020-07-13 14:00 ` Ludovic Courtès
2020-07-13 20:10 ` Christopher Baines
2020-07-13 22:04 ` Marius Bakke
2020-07-14 13:24 ` Ludovic Courtès
2020-07-14 19:47 ` Marius Bakke
2020-09-06 14:19 ` Daniela Lura
2020-09-07 10:20 ` Ludovic Courtès
2020-09-08 16:50 ` Daniela Lura
2020-09-08 16:38 ` Hartmut Goebel
2020-07-14 9:19 ` Daniela Lura
2020-07-14 13:23 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='2B7u3iFPNl6PNQBWL19Z8NS2-D7ZyNR8CgNefdZ9ozIHufpJQYTpyqB4lokxC_YA698wOqppMkJ_gorC-vP_psbgyAVpXx_YeuPT0vGi6EI=@protonmail.com' \
--to=luis.felipe.la@protonmail.com \
--cc=guix-devel@gnu.org \
--cc=mail@cbaines.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).