jdoc
jdoc(obj, max_depth=1, engine=None):
provides documentation in a Jupyter-friendly environment
obj
:Any
the object to extract documentation for
max_depth
:int
the depth in the object tree to go down to (default:
1
):returns
:..Jupyter.Component
Makes use of the JHTML
system to nicely format documentation as well as the
documentation utilities found in McUtils.Docs
(which were orginally written
as part of the Peeves
package).
Asking for too many pieces of documentation at once can really slow things down,
so by default the object tree is traversed only shallowly.
In principle, the documentation could be directly exported to an HTML document as
no Widget
-necessary bits are used (at least as on when I write this) but a better
choice is to generate Markdown docs using the standard DocsBuilder
approach.
This provides flexibility and can be ingested into any number of Markdown->HTML systems.
Examples
Get documentation for jdoc
jdoc(jdoc)
Get documentation for an entire module
import McUtils.Docs as MDoc
jdoc(Mdoc)