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

Add jupyter-kernel-gap package #21416

Closed
jdemeyer opened this issue Sep 5, 2016 · 23 comments
Closed

Add jupyter-kernel-gap package #21416

jdemeyer opened this issue Sep 5, 2016 · 23 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Sep 5, 2016

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

Upstream: Reported upstream. Developers acknowledge bug.

CC: @nthiery @dimpase

Component: packages: optional

Author: Jeroen Demeyer

Branch: 33e27fd

Reviewer: Dima Pasechnik

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

@jdemeyer jdemeyer added this to the sage-7.4 milestone Sep 5, 2016
@jdemeyer jdemeyer changed the title Add jupyter_gap_wrapper package Add gap_jupyter package Sep 5, 2016
@jdemeyer
Copy link
Author

jdemeyer commented Sep 5, 2016

@jdemeyer
Copy link
Author

Commit: 9a6b076

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

New commits:

9a6b076Package jupyter_gap_wrapper

@jdemeyer jdemeyer modified the milestones: sage-7.4, sage-7.6 Feb 13, 2017
@jdemeyer jdemeyer changed the title Add gap_jupyter package Add jupyter-kernel-gap package Feb 13, 2017
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 13, 2017

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

33e27fdPackage jupyter-kernel-gap-0.9

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 13, 2017

Changed commit from 9a6b076 to 33e27fd

@jdemeyer

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Feb 22, 2017

comment:9

I wonder why this cannot be a package of type pip.

@dimpase
Copy link
Member

dimpase commented Feb 22, 2017

comment:10

Anyhow, this appears to work. I'll check this on OSX, too.

@dimpase
Copy link
Member

dimpase commented Feb 23, 2017

comment:11

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.

@dimpase
Copy link
Member

dimpase commented Feb 24, 2017

comment:12

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?

@jdemeyer
Copy link
Author

jdemeyer commented Mar 1, 2017

Upstream: Reported upstream. Developers acknowledge bug.

@jdemeyer
Copy link
Author

jdemeyer commented Mar 1, 2017

comment:13

Upstream acknowledges bug but doesn't care...

@dimpase
Copy link
Member

dimpase commented Apr 27, 2017

comment:14

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.

@dimpase dimpase removed this from the sage-7.6 milestone Apr 27, 2017
@jdemeyer
Copy link
Author

comment:15

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.

@jdemeyer jdemeyer added this to the sage-8.0 milestone Apr 27, 2017
@nthiery
Copy link
Contributor

nthiery commented Apr 28, 2017

comment:16

+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.

@nthiery
Copy link
Contributor

nthiery commented Apr 28, 2017

comment:17

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.

@jdemeyer
Copy link
Author

comment:18

So please review this ticket then :-)

@dimpase
Copy link
Member

dimpase commented Apr 28, 2017

Reviewer: Dima Pasechnik

@vbraun
Copy link
Member

vbraun commented Apr 29, 2017

Changed branch from u/jdemeyer/add_jupyter_gap_wrapper_package to 33e27fd

@slel

This comment has been minimized.

@slel
Copy link
Member

slel commented Jan 26, 2018

Changed commit from 33e27fd to none

@slel
Copy link
Member

slel commented Jan 26, 2018

comment:21

Instruction of how to install the optional package:

sage -i gap_jupyter

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

5 participants