Issue
Is there a way to make Jupyter notebooks render docstrings that contain Sphinx markup correctly in a Jupyter notebooks.
At the moment if I have a Foo
class with Sphinx documentation and the user tries to get the docstring with
[1] Foo.bar?
They end up with the raw text. E.g.
Calls the :py:meth:`bar` method of the :py:class:`Foo` class.
Is there a way to make Jupyter automatically render the docstring correctly as Sphinx. Or anything that's easier to read than raw rst?
Solution
SageMath does this, I believe using its "sphinxify" code: https://github.com/sagemath/sage/blob/develop/src/sage/misc/sphinxify.py. That is not easy to use out of the box — it has various SageMath specific things in it — but maybe you can adapt it.
Answered By - John Palmieri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.