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 a link to the static documentation in Jupyter interactive help (foo?) #20589

Open
nthiery opened this issue May 11, 2016 · 9 comments
Open

Comments

@nthiery
Copy link
Contributor

nthiery commented May 11, 2016

Querying the documentation of an object/class/method foo in the Jupyter notebook opens a help window. The goal of this ticket is to include a link to the corresponding Sphinx-compiled static documentation when it exists.

Notes for potential implementation:

The inventory objects obtained as side product of the Sphinx contains
appropriate information to retrieve the relevant html file name from the
name of foo:

...
sage.combinat.composition.Compositions py:class 1 sage/combinat/composition.html#$ -
...

Alternatively, we could just infer the html file name just from the name of the module. This may be less robust though. Also this does not allow for checking that foo actually has static documentation attached to it.

The anchor in the html file is again the name.

Remaining question:

  • Infering robustly the base url of the static documentation
    (are there cases where we would access documentation outside of the reference manual?)
  • How to hook in the Jupyter interactive help to insert the line?
  • Could things be generalized to work for other projects using Sphinx?

Bonus feature:

  • also handle objects for which we have an intersphinx inventory (e.g. Python's own doc).

Depends on #20599

CC: @hivert @defeo @jdemeyer

Component: notebook

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

@nthiery nthiery added this to the sage-7.3 milestone May 11, 2016
@jdemeyer

This comment has been minimized.

@nthiery

This comment has been minimized.

@nthiery nthiery changed the title Add a link to the static documentation in Jupyter interactive help (?) Add a link to the static documentation in Jupyter interactive help (foo?) May 12, 2016
@jdemeyer
Copy link

Dependencies: #20599

@jdemeyer
Copy link

comment:5

I'm looking in to this. In any case, understanding the Jupyter help system better might also help with other kernels (OpenDreamKit/OpenDreamKit#96).

@kcrisman
Copy link
Member

comment:6

Possibly related to #19740? (I.e., would this be necessary to deal with before having it as default?)

@nthiery
Copy link
Contributor Author

nthiery commented Mar 24, 2017

comment:7

Replying to @kcrisman:

Possibly related to #19740? (I.e., would this be necessary to deal with before having it as default?)

AFAIK, we did not have this feature in Sage's legacy notebook. In any cases, this is nice but not critical. No need to add this as dependency.

@embray
Copy link
Contributor

embray commented Aug 10, 2018

comment:8

An older, related issue is #8482. In that case one would want to produce a doc link to the SageNB's own online doc serving.

While I'm less concerned with this working in SageNB, that ticket does suggest that one would want a good way to customize the base URL for where to find the docs. It could also substitute in doc.sagemath.org if static docs are not available locally, which can be the case, especially in some OS distros that distribute the docs in a separate, optional package.

@mkoeppe
Copy link
Member

mkoeppe commented Nov 27, 2023

I think this can be closed after #36246 @kwankyu

@kwankyu
Copy link
Collaborator

kwankyu commented Nov 27, 2023

The goal of this ticket is different. It is to put a link to the relevant part of the html documentation in the help text that you get from foo?.

The goal of #36246 was to put links to the online html documentation in the "Help" tab.

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

6 participants