Adding r-gtk2 and other packages for r-qda (RFC)

  • Done
  • quality assurance status badge
Details
5 participants
  • Clément Lassieur
  • Pjotr Prins
  • Ricardo Wurmus
  • Ricardo Wurmus
  • zimoun
Owner
Somebody
Submitted by
Pjotr Prins
Severity
normal
P
P
Pjotr Prins wrote on 11 Sep 2018 14:23
(address . guix-patches@gnu.org)
20180911122320.eyg4rms4eh36dnzx@thebird.nl
Attached a bunch of packages I wrote for RQDA. This is a particular
useful package because it depends on GTK2. guix import cran is pretty
awesome - it got most of it right :).

One or two hacks in there to disable X11 tests. Anyone any comments on
how to enable X11 instead of having X-headless? And is this good
enough to submit to Guix otherwise?

Pj.
Attachment: r-qda.patch
P
P
Pjotr Prins wrote on 12 Sep 2018 10:50
(address . 32699@debbugs.gnu.org)
20180912085016.m3bfwfyqxusaegyx@thebird.nl
Added another patch for text mining with R tm.

I would appreciate some feedback on the previous patch before I start
submitting.

Pj.
commit b9a90ec3a768b99e112fbfa76e511252fef78fdd
Author: Pjotr Prins <pjotr.public01@thebird.nl>
Date: Tue Sep 11 14:36:38 2018 +0000

added r-tm

Toggle diff (53 lines)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 1c913a5..4e9244b 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -5900,3 +5900,48 @@ text, but it can import PDF highlights if package
'rjpod' (<https://r-forge.r-project.org/projects/rqda/>) is
installed.")
(license license:bsd-3))))
+
+(define-public r-nlp
+ (package
+ (name "r-nlp")
+ (version "0.1-11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "NLP" version))
+ (sha256
+ (base32
+ "15v50gxzmpqx49wzkwxfpb5xjpg9y829a0ifys372kf1cfj521aq"))))
+ (properties `((upstream-name . "NLP")))
+ (build-system r-build-system)
+ (home-page
+ "http://cran.r-project.org/web/packages/NLP")
+ (synopsis
+ "Natural Language Processing Infrastructure")
+ (description
+ "Basic classes and methods for Natural Language Processing.")
+ (license license:gpl3)))
+
+(define-public r-tm
+ (package
+ (name "r-tm")
+ (version "0.7-5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "tm" version))
+ (sha256
+ (base32
+ "05x3kj6dxffcfyn42q2fw9bby5f4wdmslc3ww1dl0r09pz950cax"))))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-bh" ,r-bh)
+ ("r-nlp" ,r-nlp)
+ ("r-rcpp" ,r-rcpp)
+ ("r-slam" ,r-slam)
+ ("r-xml2" ,r-xml2)))
+ (home-page "http://tm.r-forge.r-project.org/")
+ (synopsis "Text Mining Package")
+ (description
+ "This package provides a framework for text mining applications within R.")
+ (license license:gpl3)))
R
R
Ricardo Wurmus wrote on 13 Sep 2018 14:55
Adding r-gtk2 and other packages for r-qda (RFC)
(address . 32699@debbugs.gnu.org)
idjo9d1eev0.fsf@bimsb-sys02.mdc-berlin.net
Hi Pjotr,

thanks for the patches!

I’m glad that you found the recursive importer helpful. Unfortunately,
it doesn’t do a great job with licenses: some of the packages have a
list of GPLv2+ and GPLv3+. Sometimes this is really just a CRAN
expansion for “GPLv2 or later”, other times it means that different
parts of the package are under different licenses.

Could you please check what the license list means for r-rgtk2 and
r-cairodevice? In some cases we can replace the list with a single
license; in other cases we add a comment above the license field to
state what it really means.

Generally, I would recommend putting these packages in (gnu packages
cran) instead of (gnu packages statistics). I’ve been moving packages
from statistics.scm to cran.scm to avoid circular dependencies between
modules.

Here some more comments and questions about the patches:

* the importer unfortunately still defaults to generating HTTP URLs for
the home page instead of HTTPS. It also fails to add a trailing slash
for cran.r-project.org URLs. Could you please add them? (This keeps
the linter happy.)

* the description of many R packages on CRAN don’t use full sentences,
whereas for Guix we’d like to use complete sentences. The easiest way
to fix this is to add “This package provides” to the beginning of the
package description from CRAN. (The importer does this automatically,
when the description begins with “A ”, but it can’t easily guess other
instances where this would be appropriate.)

* the synopses of R packages from CRAN often use … “creative” letter
casing. Instead of, say, “R Bindings for Gtk 2.8.0 and Above” we
would use “R bindings for Gtk 2.8.0 and above”. (I don’t know how to
let the importer do the right thing automatically.)

* for r-cairodevice we might be able to run the tests after setting up
an X server in a pre-check build phase. We would need to add
("xorg-server" ,xorg-server) to the native inputs. Here’s an example
for the phase taken from the caja package:

Toggle snippet (12 lines)
#:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda _
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
;; For the missing /etc/machine-id.
(setenv "DBUS_FATAL_WARNINGS" "0")
#t)))

* the description in r-cairodevice includes references to code: we
would, for example, replace “arbitrary GdkDrawable or Cairo context”
with “arbitrary @code{GdkDrawable} or @code{Cairo} context”. Same
with “RGtk2” and “getGraphicsEvent()”.

* I would replace the description of “r-gwidgets” with this text:

"gWidgets provides a toolkit-independent API for building
interactive GUIs. At least one of the toolkit implementations for
a specific GUI backend (such as @code{gWidgetsRGtk2}) should be
installed."

* In r-gwidgetsrgtk2 we might be able to do without patching the
DESCRIPTION and NAMESPACE files by adding a pre-check phase as shown
above. Is there another reason for patching this file?

* I would change the r-gwidgetsrgtk2 description to this (taken from the
package documentation):

“This package allows the gWidgets API to use the RGtk2 package
allowing the use of the GTK libraries within R.”

* r-igraph already exists in (gnu packages graph).

* r-rqda uses sources from a git checkout, which means that you could
use git-specific helpers:

(version (git-version "0.3-1" revision commit))
(file-name (git-file-name name version))

Note that the revision is just a Guix-internal number (as a string)
starting at "1".

* r-nlp: the same applies as for other packages: please add it to
cran.scm, use HTTPS and a trailing slash for the home-page field, use
lower case for the synopsis, and expand the description to a complete
sentence.

* r-tm looks fine to me.

To generate patches more easily you can create one local commit per
package and then use git format-patch -5 to create 5 patch files for the
last 5 commits. We usually apply one patch per package.

--
Ricardo
R
R
Ricardo Wurmus wrote on 13 Sep 2018 19:02
control message for bug #32699
(address . control@debbugs.gnu.org)
165d3e20dcd.67971f78-1101793078.8721709708423021113@zoho.com
owner 32699 !
Z
Z
zimoun wrote on 23 Mar 2022 16:45
Re: bug#32699: Adding r-gtk2 and other packages for r-qda (RFC)
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)(address . 32699@debbugs.gnu.org)
86cziczn95.fsf_-_@gmail.com
Hi Ricardo,

Digging this old patch [1], well considering that running now “guix
import cran -r” for the second submission:

+ (name "r-nlp“)
+ (version "0.1-11")

+ (name "r-tm")
+ (version "0.7-5")

the result is:

(name "r-nlp")
(version "0.2-1")

(name "r-tm")
(version "0.7-8")


For the others:

+(define-public r-rgtk2
+ (package
+ (name "r-rgtk2")
+ (version "2.20.35")

Not in CRAN anymore.


+(define-public r-cairodevice
+ (package
+ (name "r-cairodevice")
+ (version "2.25")

Not in CRAN anymore.


+(define-public r-gwidgets
+ (package
+ (name "r-gwidgets")
+ (version "0.0-54")

Not in CRAN anymore.


+(define-public r-gwidgetsrgtk2
+ (package
+ (name "r-gwidgetsrgtk2")
+ (version "0.0-86")

Not in CRAN anymore.


+(define-public r-igraph
+ (package
+ (name "r-igraph")
+ (version "1.2.2")

Current Guix:

name: r-igraph
version: 1.2.11


+(define-public r-rqda
+ (let ((commit "3cd9abbbde590e1bf9c602b427ebd49e43b6b71a")
+ (revision "0.3-1"))
+ (package

Not in CRAN anymore.


On Thu, 13 Sep 2018 at 14:55, Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> wrote:

Toggle quote (2 lines)
> Here some more comments and questions about the patches:

[...]

Toggle quote (4 lines)
> To generate patches more easily you can create one local commit per
> package and then use git format-patch -5 to create 5 patch files for the
> last 5 commits. We usually apply one patch per package.

Reading your comments, I propose therefore to drop this patch in favor
of another recent submission one (I or you if you beat me :-)) could do
later after this email.


WDYT?



Cheers,
simon
R
R
Ricardo Wurmus wrote on 6 May 2022 13:26
(name . zimoun)(address . zimon.toutoune@gmail.com)(address . 32699@debbugs.gnu.org)
87mtfuuck1.fsf@mdc-berlin.de
zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (7 lines)
> Reading your comments, I propose therefore to drop this patch in favor
> of another recent submission one (I or you if you beat me :-)) could do
> later after this email.
>
>
> WDYT?

Sounds good.

--
Ricardo
C
C
Clément Lassieur wrote on 7 Nov 2023 15:22
Re: bug#32699: Adding r-gtk2 and other packages for r-qda (RFC)
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)
87zfzp7idi.fsf_-_@lassieur.org
On Fri, May 06 2022, Ricardo Wurmus wrote:

Toggle quote (11 lines)
> zimoun <zimon.toutoune@gmail.com> writes:
>
>> Reading your comments, I propose therefore to drop this patch in favor
>> of another recent submission one (I or you if you beat me :-)) could do
>> later after this email.
>>
>>
>> WDYT?
>
> Sounds good.

Hi, closing since r-nlp, r-tm and r-igraph are already packaged.

Cheers,
Clément
Closed
C
C
Clément Lassieur wrote on 7 Nov 2023 15:23
control message for bug #32699
(address . control@debbugs.gnu.org)
87y1f97icp.fsf@lassieur.org
tags 32699 + wontfix
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32699@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32699
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch