Opened 7 years ago
Closed 7 years ago
#19427 closed defect (fixed)
Jupyter R kernel
Reported by: | vbraun | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.10 |
Component: | packages: optional | Keywords: | |
Cc: | jdemeyer, charpent | Merged in: | |
Authors: | Volker Braun | Reviewers: | Emmanuel Charpentier |
Report Upstream: | N/A | Work issues: | |
Branch: | 7316730 (Commits, GitHub, GitLab) | Commit: | 731673067452f10e8f7aa62bba4d7004be05c76f |
Dependencies: | Stopgaps: |
Description (last modified by )
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...
Attachments (2)
Change History (18)
comment:1 Changed 7 years ago by
- Branch set to u/vbraun/jupyter_r_kernel
comment:2 Changed 7 years ago by
- Cc jdemeyer added
- Commit set to 2958d585514229caca197d73c34c1176c77210b6
- Component changed from PLEASE CHANGE to packages: optional
- Description modified (diff)
- Status changed from new to needs_review
- Type changed from PLEASE CHANGE to defect
comment:3 follow-up: ↓ 4 Changed 7 years ago by
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.
comment:4 in reply to: ↑ 3 Changed 7 years ago by
Could you please add a dependencies
file (I guess this just depends on R).
comment:5 follow-up: ↓ 6 Changed 7 years ago by
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.
comment:6 in reply to: ↑ 5 Changed 7 years ago by
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).
comment:7 Changed 7 years ago by
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.
comment:8 Changed 7 years ago by
- Status changed from needs_review to needs_work
Shouldn't the spkg-install
script be run within a Sage shell at least?
comment:9 Changed 7 years ago by
- Commit changed from 2958d585514229caca197d73c34c1176c77210b6 to ef5a125d04b24694e5fca9b09d02ba36a19875dd
comment:10 Changed 7 years ago by
- Cc charpent added
- Status changed from needs_work to needs_review
Changed 7 years ago by
A few notebook commands with 6.10rc0+Trac#19638(rpy2 update)+ manual installation of IRKernel
comment:11 Changed 7 years ago by
- Status changed from needs_review to needs_work
Dear Volker,
- Great idea ! I am sure a lot of use cases exist in the Sagemath ecosystem.
- 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).
- 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,
comment:12 follow-up: ↓ 13 Changed 7 years ago by
- Status changed from needs_work to needs_review
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.
comment:13 in reply to: ↑ 12 Changed 7 years ago by
- Reviewers set to Emmanuel Charpentier
- Status changed from needs_review to positive_review
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.
comment:14 Changed 7 years ago by
- Commit changed from ef5a125d04b24694e5fca9b09d02ba36a19875dd to 731673067452f10e8f7aa62bba4d7004be05c76f
- Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:
ba549f3 | Add new "script" type for packages
|
753f7bc | Install script for the R Jupyter kernel
|
4990f59 | Source sage-env before running spkg-install script
|
7316730 | Bump confball version since configure.ac changed
|
comment:15 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:16 Changed 7 years ago by
- Branch changed from u/vbraun/jupyter_r_kernel to 731673067452f10e8f7aa62bba4d7004be05c76f
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
Add new "script" type for packages
Install script for the R Jupyter kernel