[PATCH] gnu: Add r-sparklyr and its dependencies

  • Open
  • quality assurance status badge
Details
2 participants
  • Lo Peter
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Lo Peter
Severity
normal
L
L
Lo Peter wrote on 28 Jun 2020 10:56
(address . guix-patches@gnu.org)
CAEM+zmjj1dBigr1pimgWTnvVqX+2QfHpLPzYMEELOaJsA45MMg@mail.gmail.com
Dear all,

I am submitting a patch series of r-sparklyr and its dependencies.

Regards,
Peter
P
P
Peter Lo wrote on 28 Jun 2020 10:57
[PATCH 1/4] gnu: Add r-r2d3.
(address . 42106@debbugs.gnu.org)(name . Peter Lo)(address . peterloleungyau@gmail.com)
20200628085745.15796-1-peterloleungyau@gmail.com
* gnu/packages/cran.scm (r-r2d3): New variable.
---
gnu/packages/cran.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index ab5e57c0e2..b92d3341b4 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -22325,3 +22325,33 @@ across a wide array of bioinformatic R packages.")
and clustering large sequence datasets using fast alignment-free k-mer
counting and recursive k-means partitioning.")
(license license:gpl3)))
+
+(define-public r-r2d3
+ (package
+ (name "r-r2d3")
+ (version "0.2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "r2d3" version))
+ (sha256
+ (base32
+ "0v612mbzdjr8cq1ffall9hagbwxfv7fh963x8f0w5r84v1m3y2bl"))))
+ (properties `((upstream-name . "r2d3")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-htmltools" ,r-htmltools)
+ ("r-htmlwidgets" ,r-htmlwidgets)
+ ("r-jsonlite" ,r-jsonlite)
+ ("r-rstudioapi" ,r-rstudioapi)))
+ (native-inputs `(("r-knitr" ,r-knitr)))
+ (home-page "https://github.com/rstudio/r2d3")
+ (synopsis "Interface to 'D3' Visualizations")
+ (description
+ "Suite of tools for using @code{D3}, a library for producing dynamic,
+interactive data visualizations. Supports translating objects into
+@code{D3} friendly data structures, rendering @code{D3} scripts,
+publishing @code{D3} visualizations, incorporating @code{D3} in R
+Markdown, creating interactive @code{D3} applications with Shiny, and
+distributing @code{D3} based @code{htmlwidgets} in R packages.")
+ (license license:bsd-3)))
--
2.17.1
P
P
Peter Lo wrote on 28 Jun 2020 10:57
[PATCH 2/4] gnu: Add r-forge.
(address . 42106@debbugs.gnu.org)(name . Peter Lo)(address . peterloleungyau@gmail.com)
20200628085745.15796-2-peterloleungyau@gmail.com
* gnu/packages/cran.scm (r-forge): New variable.
---
gnu/packages/cran.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index b92d3341b4..93a487deb3 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -22355,3 +22355,26 @@ publishing @code{D3} visualizations, incorporating @code{D3} in R
Markdown, creating interactive @code{D3} applications with Shiny, and
distributing @code{D3} based @code{htmlwidgets} in R packages.")
(license license:bsd-3)))
+
+(define-public r-forge
+ (package
+ (name "r-forge")
+ (version "0.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "forge" version))
+ (sha256
+ (base32
+ "0pjfzsc35agkh0zfw2czwajkbsyn6liys5irl5bhz5r1vim3jmwa"))))
+ (properties `((upstream-name . "forge")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-magrittr" ,r-magrittr) ("r-rlang" ,r-rlang)))
+ (home-page
+ "https://cran.r-project.org/web/packages/forge/")
+ (synopsis "Casting Values into Shape")
+ (description
+ "Helper functions with a consistent interface to coerce and
+verify the types and shapes of values for input checking.")
+ (license license:asl2.0)))
--
2.17.1
P
P
Peter Lo wrote on 28 Jun 2020 10:57
[PATCH 3/4] gnu: Add r-config.
(address . 42106@debbugs.gnu.org)(name . Peter Lo)(address . peterloleungyau@gmail.com)
20200628085745.15796-3-peterloleungyau@gmail.com
* gnu/packages/cran.scm (r-config): New variable.
---
gnu/packages/cran.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 93a487deb3..8d72cfdd78 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -22378,3 +22378,28 @@ distributing @code{D3} based @code{htmlwidgets} in R packages.")
"Helper functions with a consistent interface to coerce and
verify the types and shapes of values for input checking.")
(license license:asl2.0)))
+
+(define-public r-config
+ (package
+ (name "r-config")
+ (version "0.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "config" version))
+ (sha256
+ (base32
+ "0l67nfpm42ssnk0bl4jmq6bibz8hawgfgh2s14s5c8mnimv6mpjs"))))
+ (properties `((upstream-name . "config")))
+ (build-system r-build-system)
+ (propagated-inputs `(("r-yaml" ,r-yaml)))
+ (native-inputs `(("r-knitr" ,r-knitr)))
+ (home-page "https://github.com/rstudio/config")
+ (synopsis
+ "Manage Environment Specific Configuration Values")
+ (description
+ "Manage configuration values across multiple environments (e.g.
+development, test, production). Read values using a function that
+determines the current environment and returns the appropriate
+value.")
+ (license license:gpl3)))
--
2.17.1
P
P
Peter Lo wrote on 28 Jun 2020 10:57
[PATCH 4/4] gnu: Add r-sparklyr.
(address . 42106@debbugs.gnu.org)(name . Peter Lo)(address . peterloleungyau@gmail.com)
20200628085745.15796-4-peterloleungyau@gmail.com
* gnu/packages/cran.scm (r-sparklyr): New variable.
---
gnu/packages/cran.scm | 50 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 8d72cfdd78..4746b74777 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -22403,3 +22403,53 @@ development, test, production). Read values using a function that
determines the current environment and returns the appropriate
value.")
(license license:gpl3)))
+
+(define-public r-sparklyr
+ (package
+ (name "r-sparklyr")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "sparklyr" version))
+ (sha256
+ (base32
+ "15arppq15snihhzk7dwc25ihz7xdn4bxscs5rp4jnfsd643kq0bj"))))
+ (properties `((upstream-name . "sparklyr")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-assertthat" ,r-assertthat)
+ ("r-base64enc" ,r-base64enc)
+ ("r-config" ,r-config)
+ ("r-dbi" ,r-dbi)
+ ("r-dbplyr" ,r-dbplyr)
+ ("r-digest" ,r-digest)
+ ("r-dplyr" ,r-dplyr)
+ ("r-ellipsis" ,r-ellipsis)
+ ("r-forge" ,r-forge)
+ ("r-generics" ,r-generics)
+ ("r-globals" ,r-globals)
+ ("r-httr" ,r-httr)
+ ("r-jsonlite" ,r-jsonlite)
+ ("r-openssl" ,r-openssl)
+ ("r-purrr" ,r-purrr)
+ ("r-r2d3" ,r-r2d3)
+ ("r-rappdirs" ,r-rappdirs)
+ ("r-rjson" ,r-rjson)
+ ("r-rlang" ,r-rlang)
+ ("r-rprojroot" ,r-rprojroot)
+ ("r-rstudioapi" ,r-rstudioapi)
+ ("r-tibble" ,r-tibble)
+ ("r-tidyr" ,r-tidyr)
+ ("r-uuid" ,r-uuid)
+ ("r-withr" ,r-withr)
+ ("r-xml2" ,r-xml2)))
+ (home-page "https://spark.rstudio.com/")
+ (synopsis "R Interface to Apache Spark")
+ (description
+ "R interface to Apache Spark, a fast and general engine for big
+data processing, see <http://spark.apache.org>. This package supports
+connecting to local and remote Apache Spark clusters, provides a
+@code{dplyr} compatible back-end, and provides an interface to Spark's
+built-in machine learning algorithms.")
+ (license license:asl2.0)))
--
2.17.1
R
R
Ricardo Wurmus wrote on 11 Sep 2020 11:19
Re: [bug#42106] [PATCH 1/4] gnu: Add r-r2d3.
(name . Peter Lo)(address . peterloleungyau@gmail.com)(address . 42106@debbugs.gnu.org)
875z8k3c3e.fsf@elephly.net
Hi Peter,

Toggle quote (2 lines)
> * gnu/packages/cran.scm (r-r2d3): New variable.

Unfortunately, I cannot merge this as is. This package contains a bunch
of minified JavaScript files without the corresponding source code:

Toggle snippet (6 lines)
r2d3/inst/www/d3/4.13.0/d3.min.js
r2d3/inst/www/d3/3.5.17/d3.min.js
r2d3/inst/www/d3/5.0.0/d3.min.js
r2d3/inst/htmlwidgets/lib/webcomponents/webcomponents.js

While we can easily replace the different d3 versions with non-minified
source code that we then minify in a build phase, we cannot do this for
webcomponents.js, which is compiled from TypeScript. The source code is
here:


Arun is currently working on packaging swc, a transpiler that supports
TypeScript, so with some luck we might then be able to transpile these
TypeScript source files to webcomponents.js.

Until then I cannot merge this, I’m afraid.

--
Ricardo
R
R
Ricardo Wurmus wrote on 11 Sep 2020 11:26
Re: [bug#42106] [PATCH] gnu: Add r-sparklyr and its dependencies
(name . Lo Peter)(address . peterloleungyau@gmail.com)(address . 42106@debbugs.gnu.org)
87363o3bqa.fsf@elephly.net
Hi Peter,

Toggle quote (2 lines)
> I am submitting a patch series of r-sparklyr and its dependencies.

While I could not apply r-r2d3 due to included minified JavaScript (and
thus couldn’t add r-sparklyr), I did apply your patches for r-forge and
r-config after changing the synopses, descriptions, and indentation.

Pushed to the “master” branch with commit 1c87536287.

--
Ricardo
L
L
Lo Peter wrote on 12 Sep 2020 09:54
Re: [bug#42106] [PATCH 1/4] gnu: Add r-r2d3.
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 42106@debbugs.gnu.org)
CAEM+zmjO5RCGbFxtBYzacT11sQrcZpZkY1EeNbHYTKhZvJNs6Q@mail.gmail.com
Dear Ricardo,

Sorry that I was not aware of the problem regarding the javascript for
the R package, because I simply import it from CRAN. I will try to be
more careful in the future.

Regards,
Peter

On Fri, Sep 11, 2020 at 5:17 PM Ricardo Wurmus <rekado@elephly.net> wrote:
Toggle quote (31 lines)
>
>
> Hi Peter,
>
> > * gnu/packages/cran.scm (r-r2d3): New variable.
>
> Unfortunately, I cannot merge this as is. This package contains a bunch
> of minified JavaScript files without the corresponding source code:
>
> --8<---------------cut here---------------start------------->8---
> r2d3/inst/www/d3/4.13.0/d3.min.js
> r2d3/inst/www/d3/3.5.17/d3.min.js
> r2d3/inst/www/d3/5.0.0/d3.min.js
> r2d3/inst/htmlwidgets/lib/webcomponents/webcomponents.js
> --8<---------------cut here---------------end--------------->8---
>
> While we can easily replace the different d3 versions with non-minified
> source code that we then minify in a build phase, we cannot do this for
> webcomponents.js, which is compiled from TypeScript. The source code is
> here:
>
> https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs
>
> Arun is currently working on packaging swc, a transpiler that supports
> TypeScript, so with some luck we might then be able to transpile these
> TypeScript source files to webcomponents.js.
>
> Until then I cannot merge this, I’m afraid.
>
> --
> Ricardo
R
R
Ricardo Wurmus wrote on 30 Aug 2021 16:03
(name . Peter Lo)(address . peterloleungyau@gmail.com)(address . 42106@debbugs.gnu.org)
875yvn9gid.fsf@elephly.net
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (28 lines)
> Hi Peter,
>
>> * gnu/packages/cran.scm (r-r2d3): New variable.
>
> Unfortunately, I cannot merge this as is. This package contains
> a bunch
> of minified JavaScript files without the corresponding source
> code:
>
> --8<---------------cut
> here---------------start------------->8---
> r2d3/inst/www/d3/4.13.0/d3.min.js
> r2d3/inst/www/d3/3.5.17/d3.min.js
> r2d3/inst/www/d3/5.0.0/d3.min.js
> r2d3/inst/htmlwidgets/lib/webcomponents/webcomponents.js
> --8<---------------cut
> here---------------end--------------->8---
>
> While we can easily replace the different d3 versions with
> non-minified
> source code that we then minify in a build phase, we cannot do
> this for
> webcomponents.js, which is compiled from TypeScript. The source
> code is
> here:
>
> https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs

Toggle quote (6 lines)
> Arun is currently working on packaging swc, a transpiler that
> supports
> TypeScript, so with some luck we might then be able to transpile
> these
> TypeScript source files to webcomponents.js.

It’s a bit more complicated than that. The source files import
code from files in node_modules, which is supposed to be
downloaded with npm. If we can identify these actual source files
we could include them explicitly.

--
Ricardo
R
R
Ricardo Wurmus wrote on 29 Dec 2022 23:37
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
87pmc17s55.fsf@elephly.net
tags 42106 moreinfo
thanks

--
Ricardo
?