all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] Add recursive CRAN importer
@ 2016-05-24 12:53 Ricardo Wurmus
  2016-05-24 12:53 ` [PATCH] gnu: Add r-knitrbootstrap Ricardo Wurmus
  2016-05-24 13:08 ` [PATCH] Add recursive CRAN importer Ricardo Wurmus
  0 siblings, 2 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2016-05-24 12:53 UTC (permalink / raw)
  To: guix-devel

attached is a patch series that gives us a recursive CRAN importer.  I still
haven't documented it in the manual, because I'm not sure if the
implementation is acceptable.

Simply put, the procedure that produces a package expression now returns
multiple values.  The first is the package expression, the second is a list of
dependencies (with their upstream names).  This allows us to go through that
list and check if any unpackaged inputs are among them.

The recursive importer stops when a package cannot be imported (e.g. when a
bioconductor package has unpackaged CRAN dependencies), or when all packages
either already existed at runtime or have been packaged.

To make this work well I had to create a list of packages that should not be
imported (because they are part of the default R installation), and I had to
make sure that R packages always get a predictable Guix package name.

Comments are very welcome!

~~ Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] gnu: Add r-knitrbootstrap.
  2016-05-24 12:53 [PATCH] Add recursive CRAN importer Ricardo Wurmus
@ 2016-05-24 12:53 ` Ricardo Wurmus
  2016-05-27 17:00   ` Leo Famulari
  2016-05-24 13:08 ` [PATCH] Add recursive CRAN importer Ricardo Wurmus
  1 sibling, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-05-24 12:53 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/statistics.scm (r-knitrbootstrap): New variable.
---
 gnu/packages/statistics.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 76fd3b8..1288d9d 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -792,6 +792,29 @@ generation in R using Literate Programming techniques.")
     ;; here.
     (license license:gpl2+)))
 
+(define-public r-knitrbootstrap
+  (package
+    (name "r-knitrbootstrap")
+    (version "1.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "knitrBootstrap" version))
+       (sha256
+        (base32
+         "0pshn2slzqwpryklslsxwh1dmqcnwv6bwi7yfm6m342wjybpk0wl"))))
+    (properties `((upstream-name . "knitrBootstrap")))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-knitr" ,r-knitr)
+       ("r-rmarkdown" ,r-rmarkdown)))
+    (home-page "https://github.com/jimhester/knitrBootstrap")
+    (synopsis "Knitr bootstrap framework")
+    (description
+     "This package provides a framework to create Bootstrap 3 HTML reports
+from knitr Rmarkdown.")
+    (license license:expat)))
+
 (define-public r-microbenchmark
   (package
     (name "r-microbenchmark")
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Add recursive CRAN importer
  2016-05-24 12:53 [PATCH] Add recursive CRAN importer Ricardo Wurmus
  2016-05-24 12:53 ` [PATCH] gnu: Add r-knitrbootstrap Ricardo Wurmus
@ 2016-05-24 13:08 ` Ricardo Wurmus
  1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2016-05-24 13:08 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

I’m sorry for the confusion.  I accidentally resent this cover letter
along with the patch for r-knitrbootstrap.

Please note that the patch for r-knitrbootstrap has nothing to do with
the recursive CRAN importer patches.

~~ Ricardo


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

> attached is a patch series that gives us a recursive CRAN importer.  I still
> haven't documented it in the manual, because I'm not sure if the
> implementation is acceptable.
>
> Simply put, the procedure that produces a package expression now returns
> multiple values.  The first is the package expression, the second is a list of
> dependencies (with their upstream names).  This allows us to go through that
> list and check if any unpackaged inputs are among them.
>
> The recursive importer stops when a package cannot be imported (e.g. when a
> bioconductor package has unpackaged CRAN dependencies), or when all packages
> either already existed at runtime or have been packaged.
>
> To make this work well I had to create a list of packages that should not be
> imported (because they are part of the default R installation), and I had to
> make sure that R packages always get a predictable Guix package name.
>
> Comments are very welcome!
>
> ~~ Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add r-knitrbootstrap.
  2016-05-24 12:53 ` [PATCH] gnu: Add r-knitrbootstrap Ricardo Wurmus
@ 2016-05-27 17:00   ` Leo Famulari
  2016-05-28  7:36     ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-05-27 17:00 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Tue, May 24, 2016 at 02:53:31PM +0200, Ricardo Wurmus wrote:
> * gnu/packages/statistics.scm (r-knitrbootstrap): New variable.

It builds for me.

> +    (license license:expat)))

I couldn't find this in the source code. The only thing I found was the
authorship info in 'LICENSE' and this line in 'DESCRIPTION':

License: MIT + file LICENSE

If that's enough, then okay.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add r-knitrbootstrap.
  2016-05-27 17:00   ` Leo Famulari
@ 2016-05-28  7:36     ` Ricardo Wurmus
  2016-05-28 15:56       ` Leo Famulari
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-05-28  7:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> On Tue, May 24, 2016 at 02:53:31PM +0200, Ricardo Wurmus wrote:
>> * gnu/packages/statistics.scm (r-knitrbootstrap): New variable.
>
> It builds for me.
>
>> +    (license license:expat)))
>
> I couldn't find this in the source code. The only thing I found was the
> authorship info in 'LICENSE' and this line in 'DESCRIPTION':
>
> License: MIT + file LICENSE
>
> If that's enough, then okay.

Yes, the R project suggests projects to only submit a LICENSE file with
the two attribution lines for year and copyright holder, and set the
“License” field in the DESCRIPTION file as “MIT + file LICENSE”.

Here are the instructions including the remainder of the license for
reference:

    https://www.r-project.org/Licenses/MIT

~~ Ricardo


PS: I still need to update the importer to select the Expat license by
default when it encounters “MIT + file LICENSE” in the DESCRIPTION file.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] gnu: Add r-knitrbootstrap.
  2016-05-28  7:36     ` Ricardo Wurmus
@ 2016-05-28 15:56       ` Leo Famulari
  0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-05-28 15:56 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Sat, May 28, 2016 at 09:36:40AM +0200, Ricardo Wurmus wrote:
> 
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Tue, May 24, 2016 at 02:53:31PM +0200, Ricardo Wurmus wrote:
> >> * gnu/packages/statistics.scm (r-knitrbootstrap): New variable.
> >
> > It builds for me.
> >
> >> +    (license license:expat)))
> >
> > I couldn't find this in the source code. The only thing I found was the
> > authorship info in 'LICENSE' and this line in 'DESCRIPTION':
> >
> > License: MIT + file LICENSE
> >
> > If that's enough, then okay.
> 
> Yes, the R project suggests projects to only submit a LICENSE file with
> the two attribution lines for year and copyright holder, and set the
> “License” field in the DESCRIPTION file as “MIT + file LICENSE”.

Okay, thanks for the clarification!

> 
> Here are the instructions including the remainder of the license for
> reference:
> 
>     https://www.r-project.org/Licenses/MIT
> 
> ~~ Ricardo
> 
> 
> PS: I still need to update the importer to select the Expat license by
> default when it encounters “MIT + file LICENSE” in the DESCRIPTION file.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-28 15:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 12:53 [PATCH] Add recursive CRAN importer Ricardo Wurmus
2016-05-24 12:53 ` [PATCH] gnu: Add r-knitrbootstrap Ricardo Wurmus
2016-05-27 17:00   ` Leo Famulari
2016-05-28  7:36     ` Ricardo Wurmus
2016-05-28 15:56       ` Leo Famulari
2016-05-24 13:08 ` [PATCH] Add recursive CRAN importer Ricardo Wurmus

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.