-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
IPython notebook with Sage Extensions #16996
Comments
Branch: u/vbraun/sage_ipynb |
Commit: |
comment:3
Picture at https://plus.google.com/113188225509686176367/posts/MCdWKxYyryH |
Dependencies: #16746 |
This comment has been minimized.
This comment has been minimized.
comment:5
Aww, but sage -ipynb seems so cute. After all, it's the Ipython notebook, not the Notebook Ipython. Maybe both? |
comment:6
Its cute. I also wanted to call the Parent object that owns the Singular ring "Frodo". Sometimes, you have to resist being cute ;-) Since there is bound to be more than one notebook, I think its best to go with |
comment:7
Such as Well, it might still be good to make it more easily discoverable with an alias or something, just because of the English syntax order. |
This comment has been minimized.
This comment has been minimized.
comment:9
Also, you can lanuch the plain IPython notebook with |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
|
comment:11
2d graphics works, 3d graphics will be displayed as 2d render. IMHO this is good enough for a first stab at it. I've extended the magic The same idea should be extended to text/html/latex output as well. The user specifies which formats he wants (or his frontend can display), and Sage then picks the best representation. I'll work on refactoring the |
comment:12
Replying to @vbraun:
I'm glad you're working on this, since I've been meaning to do something like this for Sage for a long time, since it is needed for So if you can do all of the above, but also provide a hook for replacing every show method by one of the user's choosing, especially supporting 3d graphics which can't be monkey patched, then I'm on board. |
comment:13
Monkey patching stuff left and right isn't going to be maintainable in the long run anyways, so sooner or later you'll have to implement a proper solution. And that means a compute kernel starting with a custom displayhook or piggy-backing on the Sage-IPython ZMQ kernel. I can't see the SMC code so I can't really help with that, but I do intend to write the necessary framework to make implementing the displayhook easy. And powerful enough to include graphics, latex, and html output if desired. |
comment:14
Replying to @vbraun:
It's actually been very easy to maintain for almost two years now, since Sage's 2d and 3d graphics, etc., are all VERY stable code for the last 3 years. However, I don't like doing it. Amusingly, what you're doing now is the first situation that could make it harder.
All relevant Python code is BSD or GPL'd licensed. The latest versions are always the Python files in ~/.sagemathcloud in any SageMathCloud project. If you want me to post a snapshot somewhere else I can. SageMathCloud makes absolutely no use of ZMQ or IPython. However, it uses a custom displayhook.
Cool -- that's exactly what I want -- I way to make the necessary framework for implementing the displayhook easy, instead of just replacing show methods. Anyway, I'm thrilled you're working on this, and I hope you'll keep SMC in mind for your design, so that I can rewrite my code to use your framework instead of monkey patching. |
comment:16
|
comment:17
You need to run "make" to install the templates |
comment:18
You are right. Running "make" fixed the problem. I can now open it and continue the review. I do not know what goes in this ticket and what doesn't. For instance, as of now I believe the description of the ticket as been fulfilled ("IPython html-based notebook work just like the sage command line", "make zeromq and pyzmq standard packages"). And it could get a positive review. But it would be nice if output like images would appear in the notebook as it is suggested in the screeshot. Also, I have some problems viewing the documentation. More precisely,
|
comment:19
At least for now, it is intentional that show() opens external programs. For example that is currently the only way to see jmol 3d. In the long run I think show() should just be removed. Really, it only serves two purposes: easier forkbombing The other reason is that there is no "stdout for graphics", so to my knowledge the IPython notebook doesn't have a separate output channel for graphics either. Other than returning an image via the displayhook, that is. Of course the old notebook is entangled with the show() methods, e.g. 3d plots show() is a whole mess of spaghetti code. Fun fact: you can't save a jmol script to a file, you can only generate it on-the-fly inside show(). So my plan would be first to implement |
comment:20
PS: For the documentation to work you need to build it: "make doc" |
comment:21
I guess there is |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:41
I've added a |
comment:42
Replying to @vbraun:
Can the default (sagenb vs ipython) be changed by the user? If yes, how? |
comment:43
It seems there is a space missing in the usage line :
I also wonder why
To me it is an important feature that I am sory to say this, but to me if we default to
In any case, should we document in |
comment:44
If
|
comment:45
The default can't be changed without editing the source. You can always make an alias if its too much effort to type out. The notebook launch script is |
comment:47
|
comment:48
Ok I agree. This should be discussed on sage-devel. I agree with John Palmieri about the doctest coverage in the |
comment:49
I said already that the |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Karl-Dieter Crisman, Sébastien Labbé, John Palmieri, Eric Gourgoulhon, ssinglet |
comment:51
I give this a positive review. Unfinished discussions (reported later) concerns:
|
Changed reviewer from Karl-Dieter Crisman, Sébastien Labbé, John Palmieri, Eric Gourgoulhon, ssinglet to Karl-Dieter Crisman, Sébastien Labbé, John Palmieri, Eric Gourgoulhon, Steve Singleton |
Changed branch from u/vbraun/sage_ipynb to |
Changed commit from |
comment:54
This is now #17203. Volker I am sure you can fix #17203 much quicklier than me since you put your hands in those files recently. Will you have time to work on #17203 in the next days? Sébastien |
comment:55
See https://groups.google.com/d/msg/sage-release/xgmJ3nAcUOY/d9-MZLTyowYJ for some regressions/incompatible changes in the syntax for command line launch of sagenb, presumably introduced in this ticket. |
comment:57
this ticket is closed. Followup is #17280 |
Make the IPython html-based notebook work just like the sage command line.
In particular: make zeromq and pyzmq standard packages.
Screenshots: https://plus.google.com/photos/113188225509686176367/albums/6061181433704732017
Depends on #16746
CC: @jondo @videlec
Component: interfaces
Author: Volker Braun
Branch:
c54edb5
Reviewer: Karl-Dieter Crisman, Sébastien Labbé, John Palmieri, Eric Gourgoulhon, Steve Singleton
Issue created by migration from https://trac.sagemath.org/ticket/16996
The text was updated successfully, but these errors were encountered: