[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Guix Website] A Search Page for Packages
From: |
Luis Felipe |
Subject: |
Re: [Guix Website] A Search Page for Packages |
Date: |
Tue, 15 Nov 2022 13:30:23 +0000 |
------- 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.
publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
- [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/05
- Re: [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/16
- Re: [Guix Website] A Search Page for Packages, Christopher Baines, 2022/11/16
- Re: [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/16
- Re: [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/18
- Re: [Guix Website] A Search Page for Packages, Christopher Baines, 2022/11/19
- Re: [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/19
- Re: [Guix Website] A Search Page for Packages, Luis Felipe, 2022/11/19
- Re: [Guix Website] A Search Page for Packages, Ludovic Courtès, 2022/11/21