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

Make the sage notebook optional #25837

Closed
timokau opened this issue Jul 11, 2018 · 59 comments
Closed

Make the sage notebook optional #25837

timokau opened this issue Jul 11, 2018 · 59 comments

Comments

@timokau
Copy link
Contributor

timokau commented Jul 11, 2018

If you're coming from the deprecation notice in the notebook

The legacy SageNB notebook has been effectively deprecated for quite some time.
We are now making that official.
But that does not mean that Sage will not have notebook functionality.
In fact, most of the functionality of the sage notebook can already be replaced by using the Juypter Notebook instead.
For an introduction on how to use the new notebook and convert existing notebooks, see the documentation.

There are some features that are not yet ported to the new notebook however.
We will not completely stop supporting the legacy notebook until those issues are resolved.
Those features are listed below. If there is some feature you're missing that is not listed or you want to give general feedback, feel free to leave a comment on this ticket. If you do not have an account yet, you can log in with a GitHub account.

Implementation details

Reasons to make sagenb optional

Reasons to keep sagenb around

  • there are still some features depending on it

  • there might still be people using it. An example would be @kiwifb's university: #25382 comment:16

In making it optional, we still make it possible to use it for now. And when it inevitably breaks further, the people relying on it can weigh the effort of keeping it alive themselves against the effort of switching to the new notebook.

Tickets and issues tracking progress/going in that direction

Necessary to keep all tested behaviour intact without sagenb ("pass the doctests")

Misc changes

Functionality sagenb currently does better than Jupyter

Otherwise relevant

CC: @embray @vbraun @jdemeyer @kcrisman @kiwifb @antonio-rojas @timokau @infinity0 @novoselt @pcpa @nthiery @slel @saraedum @haraldschilly @strogdon @tobihan @sagetrac-tmonteil @williamstein

Component: packages: standard

Keywords: notebook, sagenb

Branch/Commit: u/chapoton/25837 @ ec7931a

Reviewer: Dima Pasechnik, John Palmieri

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

@timokau timokau added this to the sage-8.3 milestone Jul 11, 2018
@embray
Copy link
Contributor

embray commented Jul 12, 2018

comment:1

Some issues I'm aware of related to features that are only in sagenb:

I think at a minimum these issues should be fixed before taking further steps at abandoning the old sagenb.

@kcrisman
Copy link
Member

comment:2

I would also say that something "official" when one uses sagenb even when directly that says it is deprecated is necessary.

@timokau

This comment has been minimized.

@timokau
Copy link
Contributor Author

timokau commented Jul 12, 2018

comment:4

I modified the ticket description to incorporate (read: shamelessly copy) your additions.

It would be nice if we could get the deprecation warning into 8.3 so that users will have at least one release to prepare. Thats a very optimistic estimate of course, but getting it in 8.3 would be nice either way.

@timokau

This comment has been minimized.

@timokau
Copy link
Contributor Author

timokau commented Jul 12, 2018

comment:5

I have opened #25852 for that. I have only ever actually started the notebook once. Do you have an idea where best to add such a message? Just print it on the command line?

@kcrisman
Copy link
Member

comment:6

Probably on the notebook itself as well, which would require changes in sagenb.

@slel
Copy link
Member

slel commented Jul 13, 2018

comment:7

cc a few people who package Sage in various ways

@slel
Copy link
Member

slel commented Jul 13, 2018

Changed keywords from notebook to notebook, sagenb

@embray
Copy link
Contributor

embray commented Jul 18, 2018

comment:8

Another issue that was brought up here: https://ask.sagemath.org/question/43051/file-download-as-latex/

Converting a Jupyter notebook to PDF kind of sucks at the moment for notebooks that contain a lot of math in latex. There are two main cases in the notebook where latex can appear, and both have issues in sage:

  1. If an object output from a code cell has _render_latex_ then the notebook will display the rendered latex with mathjax. However, when converting the notebook to PDF, nbconvert just takes the plain-text representation of the output, not the latex, and puts it in a verbatim block. Not good, especially not for Sage.

  2. If a markdown cell contains equations in latex, nbconvert will render them correctly, but only if you have pandoc installed. This is already a known issue, but since pandoc does not come with Sage and is not a dependency this makes for a sucky user experience for something that should Just Work.

I'm not sure what to do about the first case; it seems like an issue for nbconvert but I haven't explored it too deeply. For the latter case (which probably also affects the first case) I wonder if we shouldn't just make pandoc another sage dependency.

@timokau

This comment has been minimized.

@timokau
Copy link
Contributor Author

timokau commented Jul 20, 2018

comment:9

I've updated the ticket. The flask issue was resolved (thanks @fchapoton!), I added the pdf complaint and improved formatting.

@jdemeyer

This comment has been minimized.

@timokau
Copy link
Contributor Author

timokau commented Jul 23, 2018

comment:11

I've added a section intended for end users. Please improve on that if you have more knowledge about sagenb or the Jupyter Notebook, which you probably do.

@timokau

This comment has been minimized.

@sagetrac-tmonteil

This comment has been minimized.

@egourgoulhon

This comment has been minimized.

@embray

This comment has been minimized.

@williamstein
Copy link
Contributor

comment:15

Those features are listed below.

Where is the list? I can't find it.

I touched on this on page 26 of a talk I gave yesterday (https://share.cocalc.com/share/6cd832d3-c523-41e3-9e54-c8f2d2e8fa2a/travel/2018/2018-07-icms/talks/cocalc/slides/slides.html#1)

One example is that if you start running:

for i in range(10):
   print(i)
   sys.stdout.flush()
   time.sleep(1)

then close and open your browser (to simulate a network failure, say), you
should not loose output. In Jupyter, you do.

@embray
Copy link
Contributor

embray commented Jul 25, 2018

comment:16

Replying to @williamstein:

Those features are listed below.

Where is the list? I can't find it.

It's in the description of the ticket, but perhaps that still needs more reformatting, because there are a number of thing "below" that sentence that include, but are not limited to, missing features.

Most of it falls under the heading "Functionality sagenb currently does better than Jupyter" though that list is far from complete. There's also a link to a wiki page listing other issues.

@nthiery

This comment has been minimized.

@nthiery

This comment has been minimized.

@jhpalmieri
Copy link
Member

comment:19

"#24784: search_doc does not work in the Jupyter notebook" is now ready for review.

@fchapoton
Copy link
Contributor

comment:20

Could someone (having the required rights) please now merge the 4 top pull requests in sagenb github, including the one related to the present ticket ?

https://github.com/sagemath/sagenb/pulls

@dimpase
Copy link
Member

dimpase commented Oct 17, 2018

comment:21

Replying to @fchapoton:

Could someone (having the required rights) please now merge the 4 top pull requests in sagenb github, including the one related to the present ticket ?

https://github.com/sagemath/sagenb/pulls

done, I guess. See #26499 for the new release of sagenb.

@fchapoton
Copy link
Contributor

Branch: u/chapoton/25837

@fchapoton
Copy link
Contributor

New commits:

ec7931amake sagenb optional

@jhpalmieri
Copy link
Member

comment:42

When we talk about regressions, I think the context is: we are imagining people converting their notebooks from SageNB to Jupyter and not using SageNB any more (as opposed to: using SageNB for some tasks, Jupyter for others). In that context, it is also worthwhile to ask what features Jupyter has that SageNB doesn't. I don't think we are just losing things by moving from SageNB to Jupyter; aside from Python 3 compatibility, I think we gain some things by moving to Jupyter. So it is a trade-off. At what point does the balance tip to the Jupyter side? Maybe the Python 3 support is enough on its own, in fact.

@kcrisman
Copy link
Member

kcrisman commented Nov 8, 2019

comment:43

Maybe the Python 3 support is enough on its own, in fact.

Obviously that is the consensus decision. I'm just quoting this ticket right now when I mention these things, and would hate to have them disappear for all time. But as you said elsewhere, someone has to work on them.

@nthiery
Copy link
Contributor

nthiery commented Nov 23, 2019

comment:44

A functionality that Jupyter is currently missing over sagenb is the rich text editor. This may possibly be resolved by:

https://github.com/jupytercalpoly/jupyterlab-richtext-mode

@dimpase
Copy link
Member

dimpase commented Nov 23, 2019

comment:45

the most pressing issue is inability to normally use jsmol in Jupyter notebooks, needed to export 3d drawings for animations. We are having a lot of complaints about it.
There is something with the jsmol pop-up menu, which gets cut out by the notebook cell, and can't be used (thus making exports impossible)

jupyter/notebook#1872 discussing this has been opened in 2016 (pity that it was not resolved during ODK).

@nthiery
Copy link
Contributor

nthiery commented Nov 24, 2019

comment:46

Indeed; too bad this was not brought up. That being said, we still are in good contact with the Jupyter team :-) So if we provide them with a specific and easy to reproduce example (e.g. through a binder link) on the above issue, there are chances that we can make progress. It would be worth testing how things are in jupyterlab too.

@kcrisman
Copy link
Member

comment:47

By the way, I note that only jsmol can make stereographic plots for 3d viewing, though I don't know how often this capability is used. (People like it when advertising Sage!)

@dimpase
Copy link
Member

dimpase commented Nov 25, 2019

comment:48

Replying to @kcrisman:

By the way, I note that only jsmol can make stereographic plots for 3d viewing, though I don't know how often this capability is used. (People like it when advertising Sage!)

can't plotly do it? see e.g. https://plot.ly/~empet/13037.embed

@kcrisman
Copy link
Member

comment:49

By "only jsmol", I meant the only thing included standard in Sage. What is plotly? (Am I so behind that I missed a major new Sage internal plot mechanism? Yikes.)

@dimpase
Copy link
Member

dimpase commented Nov 25, 2019

comment:50

I read your comments as "the only Python library that can do this sort if plotting"

plotly is Python library, no idea if it can work in Sage.

@embray
Copy link
Contributor

embray commented Dec 30, 2019

comment:51

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-8.9, sage-9.1 Dec 30, 2019
@mkoeppe
Copy link
Contributor

mkoeppe commented May 4, 2020

comment:52

This was done another ticket merged for 9.1 (see #29320), should be closed.

But #17590 (update sagenb SPKG.txt) needs work for 9.1

@mkoeppe mkoeppe removed this from the sage-9.1 milestone May 4, 2020
@jhpalmieri
Copy link
Member

Changed reviewer from Dima Pasechnik to Dima Pasechnik, John Palmieri

@slel

This comment has been minimized.

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