all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add CRAN importer.
Date: Tue, 18 Aug 2015 15:43:01 +0200	[thread overview]
Message-ID: <87vbccww4a.fsf@gnu.org> (raw)
In-Reply-To: <idjoaj11tnj.fsf@bimsb-sys02.mdc-berlin.net> (Ricardo Wurmus's message of "Fri, 24 Jul 2015 17:07:12 +0200")

Hello Guix!

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> attached is a patch to add a new importer for R packages published on
> CRAN.  (I still have to add tests for this.)

Yay!

> The importer fetches the HTML description of an R package from
> http://cran.r-project.org, converts it to SXML, and then tries to
> extract the relevant information from the SXML expression.

Do you have an idea of how stable that HTML page is?

> When I finished I thought that maybe this could be done with less effort
> by downloading the tarball from CRAN, extracting the plain text
> DESCRIPTION file containing the same information and parse that instead.
> But in order to get the tarball I’d have to parse the HTML anyway, so
> maybe that’s not so much better after all.

OK.

> This generates package expressions using the r-build-system — this build
> system does not yet exist, but I’ll prepare one soon, not least to test
> the importer.

Sounds good.

> From 8cb9622785feb79fbbe593099105160617ff6acb Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Fri, 24 Jul 2015 16:49:57 +0200
> Subject: [PATCH] import: Add 'cran' importer.
>
> * guix/import/cran.scm: New file.
> * guix/scripts/import.scm: Add "cran" to 'importers'.
> * guix/scripts/import/cran.scm: New file.
> * Makefile.am (MODULES): Add 'guix/import/cran.scm' and
>   'guix/scripts/import/cran.scm'.
> * doc/guix.texi (Invoking guix import): Document it.
> * po/guix/POTFILES.in: Add 'guix/scripts/import/cran.scm'.

[...]

> +@item cran
> +@cindex CRAN
> +Import meta-data from @uref{http://cran.r-project.org/, CRAN}.

s/\./, the central repository for the @uref{http://r-project.org,
GNU@tie{}R statistical and graphical environment}/

> +(define string->license
> +  (match-lambda
> +   ("AGPL-3" 'agpl3)
> +   ("Artistic-2.0" 'artistic2.0)
> +   ("Apache License 2.0" 'asl2.0)
> +   ("BSD_2_clause" 'bsd-2)
> +   ("BSD_3_clause" 'bsd-3)
> +   ("GPL-2" 'gpl2)
> +   ("GPL-3" 'GPL3)
> +   ("LGPL-2" 'lgpl2.0)
> +   ("LGPL-2.1" 'lgpl2.1)
> +   ("LGPL-3" 'lgpl3)

Does it actually mean “or any later version”, or is it just unspecified?

Overall this looks good to me...  with a couple of tests, of course.
:-)  The tests will notably serve as a reference of what HTML form is
expected, in case the HTML page changes.

Thank you!

Ludo’.

      parent reply	other threads:[~2015-08-18 13:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 15:07 [PATCH] Add CRAN importer Ricardo Wurmus
2015-07-24 16:56 ` Thompson, David
2015-08-18 13:43 ` Ludovic Courtès [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbccww4a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.