Helper function to build the documentation

Documentation notebook functions

nbdoc contains the functions for documentation notebooks. The most important is show_doc:

Show the documentation of a function

show_doc[source]

show_doc(`elt`, `doc_string`:bool=`True`, `full_name`:str=`None`, `arg_comments`:dict=`None`, `title_level`=`None`, `alt_doc_string`:str=`''`, `ignore_warn`:bool=`False`, `markdown`=`True`)

Show the documentation of an elt (function, class or enum). doc_string decices if we show the doc string of the element or not, full_name will override the name shown, arg_comments is a dictionary that will then show list the arguments with comments. title_level is the level of the corresponding cell in the TOC, alt_doc_string is a text that can replace the doc_string. ignore_warn will ignore warnings if you pass arguments in arg_comments that don't appear to belong to this function and markdown decides if the return is a Markdown cell or plain text.

Plenty of examples of uses of this cell can been seen through the documentation, and you will want to hide input those cells for a clean final result.

Convenience functions

get_source_link(`mod`, `lineno`, `display_text`=`'[source]'`) → str

Returns link to lineno in source code of mod.

show_video[source]

show_video(`url`)

Display video in url.

show_video_from_youtube[source]

show_video_from_youtube(`code`, `start`=`0`)

Display video from Youtube with a code and a start time.

Functions for internal fastai library use

get_exports[source]

get_exports(`mod`)

Get the exports of mod.

get_fn_link(`ft`) → str

Return function link to notebook documentation of ft. Private functions link to source code

get_ft_names[source]

get_ft_names(`mod`, `include_inner`=`False`) → List[str]

Return all the functions of module mod.

is_enum[source]

is_enum()

Check if something is an enumerator.

import_mod[source]

import_mod(`mod_name`:str, `ignore_errors`=`False`)

Return module from mod_name.

link_docstring(`modules`, `docstring`:str, `overwrite`:bool=`False`) → str

Search docstring for backticks and attempt to link those functions to respective documentation.