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

Copy sagenb @interact documentation #27747

Open
jdemeyer opened this issue Apr 29, 2019 · 9 comments
Open

Copy sagenb @interact documentation #27747

jdemeyer opened this issue Apr 29, 2019 · 9 comments

Comments

@jdemeyer
Copy link

Copy the documentation for @interact from sagenb to Sage, ideally as interact.__doc__

Depends on #27735

CC: @kcrisman @slel @zerline

Component: documentation

Author: Jeroen Demeyer

Branch/Commit: u/jdemeyer/ticket/27747 @ 3756301

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

@jdemeyer jdemeyer added this to the sage-8.8 milestone Apr 29, 2019
@jdemeyer
Copy link
Author

comment:1

An interesting question is: how should the docs look like? Currently, in sagenb they are formatted as

        sage: @interact
        ....: def _(title=["A Plot Demo", "Something silly", "something tricky"], a=input_box(sin(x*sin(x*sin(x))), 'function'),
        ....:     clr = Color('red'), thickness=[1..30], zoom=(1,0.95,..,0.1), plot_points=(200..2000)):
        ....:     html('<h1 align=center>%s</h1>'%title)
        ....:     print(plot_points)
        ....:     show(plot(a, -zoom*pi,zoom*pi, color=clr, thickness=thickness, plot_points=plot_points))
        <html>...

This shows the code used to generate the interact, but it doesn't show the resulting widget nor the output of running the interact. It's not easy to do that since interacts are inherently graphical, so there may not be a sensible text representation (although in some cases, the output of an interact is textual).

So it's not that useful as documentation. I wonder if we can do better.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link
Author

Branch: u/jdemeyer/ticket/27747

@slel
Copy link
Member

slel commented May 5, 2019

Commit: 3756301

@slel
Copy link
Member

slel commented May 5, 2019

New commits:

335f0a7Support matrix in interact
3756301Document @interact

@embray
Copy link
Contributor

embray commented Jun 14, 2019

comment:5

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

@embray embray removed this from the sage-8.8 milestone Jun 14, 2019
@dimpase
Copy link
Member

dimpase commented Feb 16, 2020

comment:6

Does anyone understand the story of sagenb interacts vs jupyter interacts.
With the switch to Python 3, there is no sagenb available.

It appears that some code from sagenb is still used in jupyter interacts, though.

@kcrisman
Copy link
Member

comment:7

Does anyone understand the story of sagenb interacts vs jupyter interacts.
With the switch to Python 3, there is no sagenb available.

What I do know is that there is some small differences in functionality between Sage cell, CoCalc Sage worksheets (.sagews), Jupyter, and sagenb. I have never seen a 100% reliable list of all such differences, though see #25387 for something related (not directly about interact). See also #27752 for something annoying, and #27735 where at least one instance of less functionality in Jupyter got fixed.

It appears that some code from sagenb is still used in jupyter interacts, though.

Wow.

@kcrisman
Copy link
Member

comment:8

So it's not that useful as documentation. I wonder if we can do better.

See the related #28246.

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