Propose change in how frontends handle payloads

50 views
Skip to first unread message

Brian Granger

unread,
Sep 26, 2016, 11:01:54 AM9/26/16
to Project Jupyter
Hi all,

For a while, the ipython kernel has had a flag that lets you send
payload message to regular output. I have run my ipython with this
enabled for a long time. In talking with Kyle this weekend, nteract
has decided to always render payloads as output.

I would like to propose that we start to do the same in the classic
notebook and jupyterlab.

The reasons are these:

* If you have a cell with a ? ("math.cos?") no-one can see the result
of running that code in the notebook document (on github, nbviewer).
This means that the notebook isn't really reproducible.
* In JupyterLab, outputs can be dragged anywhere in the dock panel.
Thus, if you want the separate pager like experience we can still
offer it.
* The existing inspector in juptyerlab is overly complicated. This
would allow it to just focus on tooltips as the user types.

Cheers,

Brian

--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Kyle Kelley

unread,
Sep 26, 2016, 1:06:48 PM9/26/16
to jup...@googlegroups.com
Part of the reason we put the pager data within the output area was that we didn't want that "popup" experience and people seemed to like having it inline. We then faced, exactly as you put it, a lack of reproducibility of the notebook - people wanted to see that "output" of documentation right there.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAH4pYpTDrOyEP_rbj2zeydboVHy_2AapPD0xiyi_4sqD1hDqxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Kyle Kelley (@rgbkrklambdaops.com)

Jason Grout

unread,
Sep 26, 2016, 2:07:52 PM9/26/16
to jup...@googlegroups.com
That's how the Sage notebook has worked for as long as I remember: A cell executed with ? and ?? render the relevant docs inline as output. SageMathCloud does this too: https://cloud.sagemath.com/projects/82a3ca9f-7a34-400b-86ee-98fb0b07f23c/files/2016-05-05-133427.sagews. It is handy having it inline - the Sage tutorial uses this to explain ? and ??, for example, and many other tutorials will discuss a function and then do the function? to show the docs inline. HOWEVER, doing something like `math.cos?` and pressing *tab* (instead of shift-enter) will either pop up the completion (SMC) or render it temporarily in the output above existing output, with an option to pop the output out into a dialog (old sage notebook)

This also would make the notebook more consistent with the terminal console, where docs are rendered as outputs.

Thanks,

Jason


To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
--
Kyle Kelley (@rgbkrklambdaops.com)

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

MinRK

unread,
Oct 3, 2016, 3:59:15 PM10/3/16
to Project Jupyter

Two bits here:

  1. payloads are more than the pager. I think we are only talking about the pager payload, not other payloads like set_next_input that allow creation of cells, etc.
  2. have implemented IPython’s ? and ?? twice in the message specification:
    • invoking %pinfo formats output and triggers display via the pager payload
    • inspect_request requests the same information at the protocol level, triggering the same code at the Python leel, but skipping the pager. This is how tooltips are produced (shift-enter some places, automatically others).

Summarizing some discussion from the dev meeting: I support deprecating the pager in JupyterLab, and moving IPython’s default behavior of ? to produce regular output (I’ve used extensions to do this since about the beginning of the notebook, and it sounds like others have, too). The fact that JupyterLab can tear off output puts a big dent in the main reason to keep the pager in the notebook: that it can be independent of the document scrolling, and kept for reference.

Argument for keeping the pager: not all frontends have JupyterLab’s setup. The console, for instance, would still benefit from sending this to the pager for the same reason terminal IPython does.

-Min


To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
--
Kyle Kelley (@rgbkrklambdaops.com)

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Brian Granger

unread,
Oct 4, 2016, 6:18:07 PM10/4/16
to Project Jupyter
> payloads are more than the pager. I think we are only talking about the
> pager payload, not other payloads like set_next_input that allow creation of
> cells, etc.

Yes, sorry about being too vague...just the pager...
>>>> an email to jupyter+u...@googlegroups.com.
>>>> To post to this group, send email to jup...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jupyter/CAH4pYpTDrOyEP_rbj2zeydboVHy_2AapPD0xiyi_4sqD1hDqxQ%40mail.gmail.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>>>
>>> --
>>> Kyle Kelley (@rgbkrk; lambdaops.com)
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to jupyter+u...@googlegroups.com.
>>> To post to this group, send email to jup...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jupyter/CA%2BtbMaW8KsXnCRRseKSCuRcVkX5aeTNm-4-9%2BbDjpSP3cBnOUw%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+u...@googlegroups.com.
>> To post to this group, send email to jup...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAPDWZHzRZb%3Dc2u5OpEzkq_ALw95vaU0SiZ4kEN_8H1oC-iSCGg%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAHNn8BWX%2Bjr-dA-TkT7ii3F2yW_3fzMQeewh4vRDjhXnQbxR8w%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages