Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter R kernel #19427

Closed
vbraun opened this issue Oct 17, 2015 · 23 comments
Closed

Jupyter R kernel #19427

vbraun opened this issue Oct 17, 2015 · 23 comments

Comments

@vbraun
Copy link
Member

vbraun commented Oct 17, 2015

This introduces a new "script" type of packages that only run a script. This is supposed to be an alternative for optional/experimental packages so we can use third-party package managers to install things.

In this case, the R package manager, though it would presumably be useful for TexLive (instead of src/ext/texlive/texlive-install) and npm. But thats for future tickets...

CC: @jdemeyer @EmmanuelCharpentier

Component: packages: optional

Author: Volker Braun

Branch/Commit: 7316730

Reviewer: Emmanuel Charpentier

Issue created by migration from https://trac.sagemath.org/ticket/19427

@vbraun vbraun added this to the sage-6.10 milestone Oct 17, 2015
@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

Branch: u/vbraun/jupyter_r_kernel

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

Author: Volker Braun

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

New commits:

305f3e6Add new "script" type for packages
2958d58Install script for the R Jupyter kernel

@vbraun

This comment has been minimized.

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

Commit: 2958d58

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

comment:3

Note: need to bootstrap before the new make target is available, but since this is not urgent it can wait for the next beta release.

@jdemeyer
Copy link

comment:4

Could you please add a dependencies file (I guess this just depends on R).

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

comment:5

scripts depend on all standard packages (just like optional ones). It also depends on jupyter as it calls it to install its kernel specs. On the one hand it would be nice to have the dependencies explicit, but they would also just be wrong if we can't actually test them.

@jdemeyer
Copy link

comment:6

Replying to @vbraun:

if we can't actually test them.

This describes a way to test dependencies:
http://doc.sagemath.org/html/en/developer/packaging.html#package-dependencies

If make distclean && make base && make PACKAGE_NAME succeeds, the dependencies are probably correct.

I would certainly like to make dependencies mandatory, I am in the process of adding missing dependency files (see for example #19295).

@vbraun
Copy link
Member Author

vbraun commented Oct 17, 2015

comment:7

Still, whats the point? Some packages can't be standard so depending on standard doesn't cost us anything. Whereas additional complexity, new ways of introducing dependency errors, and insufficient test coverage are very real downsides.

@jdemeyer
Copy link

comment:8

Shouldn't the spkg-install script be run within a Sage shell at least?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 13, 2015

Changed commit from 2958d58 to ef5a125

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 13, 2015

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

8074932Add new "script" type for packages
0282c7eInstall script for the R Jupyter kernel
ef5a125Source sage-env before running spkg-install script

@vbraun
Copy link
Member Author

vbraun commented Dec 13, 2015

New commits:

8074932Add new "script" type for packages
0282c7eInstall script for the R Jupyter kernel
ef5a125Source sage-env before running spkg-install script

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 13, 2015

Attachment: Untitled3-native.pdf.gz

A few notebook commands with 6.10rc0+Trac#19427

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 13, 2015

A few notebook commands with 6.10rc0+Trac#19638(rpy2 update)+ manual installation of IRKernel

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 13, 2015

comment:11

Attachment: Untitled3-19638.pdf.gz

Dear Volker,

  1. Great idea ! I am sure a lot of use cases exist in the Sagemath ecosystem.

  2. Your ticket (tested against a fresh clone of 6.10rc0) :

  • builds, and
  • passes ptestlong.
  • Installing r_jupyter effectively installs an R kernel in Sagemath's Jupyter notebook.
  • This notebook is functional (i. e. one can create a worksheet whose native language is R).
  1. However, over Sage 6.10rcO, the Rpy2 interface cannot be used in a Sagemath notebook :
  • The "%load_ext rpy2.ipython" command is not recognized
  • The "%load_ext rmagic" command is recognized (with a warning), but :
  • The %R (and %%R) commands are not recognized

You can compare these results (illustrated in "Untitled3-native.pdf") with those obtained on 6.10rc0+Trac#19638+manual installation of IRKernel in R, which also illustrates the problems with this current implementation :

  • uses a different instance of R than the Sage's pexpect interface
  • converts the output in strange formats, different from those used by Sages's pexpect interface.

If your goal was strictly limited to providing an R notebook in Sage's Jupyter, I think it's good to go. If you aimed at providing Sage with an alternative interface to R, it needs work (needs Trac#19638, IMHO, but I'm biased...).

I would be interested in your point of view in the question I posed in sage-devel. William's sarcastic non-answer misses a part of the point.

Sincerely yours,

@vbraun
Copy link
Member Author

vbraun commented Dec 13, 2015

comment:12

This ticket has nothing to do with rpy2, its only about the jupyter R kernel. Really they are two totally independent approaches to using R, one from within Python and the other without Python.

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 13, 2015

Reviewer: Emmanuel Charpentier

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Dec 13, 2015

comment:13

Replying to @vbraun:

This ticket has nothing to do with rpy2, its only about the jupyter R kernel. Really they are two totally independent approaches to using R, one from within Python and the other without Python.

[ Sorry for the delay. I was busy... ]

Okay. This clarification (that should go in the description) enables positive review.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 19, 2015

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

ba549f3Add new "script" type for packages
753f7bcInstall script for the R Jupyter kernel
4990f59Source sage-env before running spkg-install script
7316730Bump confball version since configure.ac changed

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 19, 2015

Changed commit from ef5a125 to 7316730

@vbraun
Copy link
Member Author

vbraun commented Dec 22, 2015

Changed branch from u/vbraun/jupyter_r_kernel to 7316730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants