#21416 closed enhancement (fixed)
Add jupyter-kernel-gap package
Reported by: | jdemeyer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.0 |
Component: | packages: optional | Keywords: | |
Cc: | nthiery, dimpase | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | Dima Pasechnik |
Report Upstream: | Reported upstream. Developers acknowledge bug. | Work issues: | |
Branch: | 33e27fd (Commits, GitHub, GitLab) | Commit: | |
Dependencies: | Stopgaps: |
Description (last modified by )
This package provides the GAP kernel for the Jupyter notebook, making it available from the Sage's Jupyter notebook .
The source repository is at
Demo notebook
Tarball
Note. This is an optional package. To make it available to an existing Sage installation, run the following command in a terminal:
sage -i gap_jupyter
Change History (21)
comment:1 Changed 5 years ago by
- Summary changed from Add jupyter_gap_wrapper package to Add gap_jupyter package
comment:2 Changed 5 years ago by
- Branch set to u/jdemeyer/add_jupyter_gap_wrapper_package
comment:3 Changed 4 years ago by
- Commit set to 9a6b076c50e0315a34b3fe2ab5f7ea81a9a5cdc9
- Description modified (diff)
- Milestone changed from sage-7.4 to sage-7.6
comment:4 Changed 4 years ago by
- Summary changed from Add gap_jupyter package to Add jupyter-kernel-gap package
comment:5 Changed 4 years ago by
- Commit changed from 9a6b076c50e0315a34b3fe2ab5f7ea81a9a5cdc9 to 33e27fd1d64773326d3d47601c6ef376c3b71f05
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
33e27fd | Package jupyter-kernel-gap-0.9
|
comment:6 Changed 4 years ago by
- Status changed from new to needs_review
comment:7 Changed 4 years ago by
- Cc dimpase added
comment:8 Changed 4 years ago by
- Description modified (diff)
comment:9 Changed 4 years ago by
I wonder why this cannot be a package of type pip
.
comment:10 Changed 4 years ago by
Anyhow, this appears to work. I'll check this on OSX, too.
comment:11 Changed 4 years ago by
for some reason, the log is very chatty (on OSX):
[IPKernelApp] ERROR | (u'json part: {"result" : {"data" : {"text/html" : "Reference: <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/doc/ref/chap40.html#X87677B0787B4461A\\">AutomorphismGroup</a><br/>AutPGrp (not loaded): <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/pkg/autpgrp/htm/CHAP002.htm\\">AutomorphismGroup</a><br/>GUAVA (not loaded): <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/pkg/guava-3.13/doc/chap4.html#X87677B0787B4461A\\">AutomorphismGroup</a><br/>Reference: <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/doc/ref/chap45.html#X7A19DF1E7E841074\\">AutomorphismGroup for groups with pcgs</a><br/>AutPGrp (not loaded): <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/pkg/autpgrp/htm/CHAP003.htm\\">AutomorphismGroupPGroup</a><br/>HAP (not loaded): <a target=\\"_blank\\" href=\\"https://cloud.gap-system.org/pkg/Hap1.11/doc/chap23.html#X7B54B8CA841C517B\\">AutomorphismGroupAsCatOneGroup</a><br/>"},"source" : "gap","json" : true},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("a := AutomorphismGroup(G); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "<group with 4 generators>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "<group with 4 generators>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("SylowSubgroup(a,2); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "<group>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "<group>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("s := SylowSubgroup(a,2); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "<group>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "<group>"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("Order(s); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "32"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "32"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("IdGroup(s); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "[ 32, 43 ]"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "[ 32, 43 ]"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',) [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("List(LowerCentralSeries(s), Order); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "[ 32, 4, 2, 1 ]"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "[ 32, 4, 2, 1 ]"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',)
it still all seems to work, but it's good to understand how harmless this is.
comment:12 Changed 4 years ago by
- Status changed from needs_review to needs_info
same picture on Linux; here I open a new jupyter notebook and evaluate g:=SymmetricGroup(6);
http://localhost:8888/?token=301f73a3b3d0dc134012907a7430e55612e3049b811f07b2 [19710:19710:0224/145625.946823:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain Created new window in existing browser session. [I 14:56:29.795 NotebookApp] Accepting one-time-token-authenticated connection from ::1 [I 14:56:36.234 NotebookApp] Creating new notebook in [I 14:56:36.760 NotebookApp] Kernel started: 17affbdf-63c3-49fa-ac3e-2e9dd3d2e64f [IPKernelApp] ERROR | ('starting GAP: gap',) [IPKernelApp] ERROR | UNKNOWN MESSAGE TYPE: u'comm_open' [IPKernelApp] ERROR | UNKNOWN MESSAGE TYPE: u'comm_open' [W 14:56:38.367 NotebookApp] 404 GET /static/components/codemirror/mode/gap/gap.js (::1) 9.64ms referer=http://localhost:8888/notebooks/Untitled1.ipynb?kernel_name=gap [IPKernelApp] ERROR | (u'command JUPYTER_RunCommand("g:=SymmetricGroup(6); ;");',) [IPKernelApp] ERROR | (u'reply {"result" : {"name" : "stdout","text" : "Sym( [ 1 .. 6 ] )"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'json part: {"result" : {"name" : "stdout","text" : "Sym( [ 1 .. 6 ] )"},"status" : "ok"}',) [IPKernelApp] ERROR | (u'rest part: ',)
it looks as if json parsing is a problem here. Wrong json or wrong parser?
comment:13 Changed 4 years ago by
- Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.
- Status changed from needs_info to needs_review
Upstream acknowledges bug but doesn't care...
comment:14 follow-up: ↓ 15 Changed 4 years ago by
- Milestone changed from sage-7.6 to sage-duplicate/invalid/wontfix
according to https://github.com/gap-packages/jupyter-kernel-gap/issues/36 this kernel is abandoned by upstream. Apparenly upstream has or is working on another way to hook GAP onto jupyter.
comment:15 in reply to: ↑ 14 Changed 4 years ago by
- Milestone changed from sage-duplicate/invalid/wontfix to sage-8.0
Replying to dimpase:
according to https://github.com/gap-packages/jupyter-kernel-gap/issues/36 this kernel is abandoned by upstream.
True, but I don't see why that means that we shouldn't merge it in Sage. There are several abandoned projects in Sage already, even as standard packages.
comment:16 Changed 4 years ago by
+1. What would be bad would be to introduce the feature, and then later have to remove it because it does not work anymore. Here upstream is very motivated by the feature, and has gone a long way toward the newer implementation with libgap being planned for next GAP release.
So we can expect the new implementation to come along in the coming months. And for now the current implementation works and is useful.
I'll double check with Markus that he is ok to expose the current implementation.
comment:17 Changed 4 years ago by
Markus's answer: absolutely, its available, it should be used. I'm not keen to spend a lot of time on maintenance, since I'd rather get the new kernel to work.
comment:18 Changed 4 years ago by
So please review this ticket then :-)
comment:19 Changed 4 years ago by
- Reviewers set to Dima Pasechnik
- Status changed from needs_review to positive_review
comment:20 Changed 4 years ago by
- Branch changed from u/jdemeyer/add_jupyter_gap_wrapper_package to 33e27fd1d64773326d3d47601c6ef376c3b71f05
- Resolution set to fixed
- Status changed from positive_review to closed
comment:21 Changed 3 years ago by
- Commit 33e27fd1d64773326d3d47601c6ef376c3b71f05 deleted
- Description modified (diff)
Instruction of how to install the optional package:
sage -i gap_jupyter
New commits:
Package jupyter_gap_wrapper