Vivien Kraus writes: > Hi! > > Here is a small library that exports 3 types: > − is the collection of metadata that is present > in the square brackets in the patch names; > − is an individual item of the patch series; > − is a whole series of patches; > > And a set of functions to parse and serialize these. > > A fun experiment is to run the following script: > > (use-modules (guix-qa-frontpage patchwork patch-series)) > (use-modules (rnrs bytevectors)) > (use-modules (web client)) > (use-modules (ice-9 receive)) > (use-modules (json)) > > (define patchwork-data > (receive (r body) > (http-get "https://patches.guix-patches.cbaines.net/api/patches/?order=-id") > (json-string->scm (utf8->string body)))) > > (define patchwork-series > (map scm->patch-series (vector->list patchwork-data))) > > (for-each > (lambda (correct-series) > (display correct-series) > (newline)) > (map patch-series->scm patchwork-series)) > > You will see that patchwork has quite a lot of creativity when it > comes to breaking my expectations. I made sure to add as much > information in exceptions so that we can understand what is happening. This looks good, but would it be possible to adapt this to work with the series endpoint [1], rather than the patches one? 1: https://patches.guix-patches.cbaines.net/api/series/?order=-id I think the use of the patches endpoint currently is just because previously the Patchwork checks information was used. Now that Patchwork checks aren't used, I think the series endpoint can be used instead, and this should map much more closely to the data structures you're trying to construct. Thanks, Chris