gen_doc.nbdoc
Helper function to build the documentation
Documentation generator
Generates documentation for fastai
classes, functions, types.
View documentation inside a Jupyter Notebook with show_doc
or at docs.fast.ai
Show the documentation of a function
show_doc
[source][test]
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_tests
=True
) No tests found forshow_doc
. To contribute a test please refer to this guide and this discussion.
Show the documentation of an elt
(function, class or enum). doc_string
decides 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
[source][test]
get_source_link
(file
,line
,display_text
='[source]'
, **kwargs
) →str
No tests found forget_source_link
. To contribute a test please refer to this guide and this discussion.
Returns github link for given file
show_video
[source][test]
show_video
(url
) No tests found forshow_video
. To contribute a test please refer to this guide and this discussion.
Display video in url
.
show_video_from_youtube
[source][test]
show_video_from_youtube
(code
,start
=0
) No tests found forshow_video_from_youtube
. To contribute a test please refer to this guide and this discussion.
Display video from Youtube with a code
and a start
time.
Functions for internal fastai library use
get_exports
[source][test]
get_exports
(mod
) No tests found forget_exports
. To contribute a test please refer to this guide and this discussion.
Get the exports of mod
.
get_fn_link
[source][test]
get_fn_link
(ft
) →str
No tests found forget_fn_link
. To contribute a test please refer to this guide and this discussion.
Return function link to notebook documentation of ft
. Private functions link to source code
get_ft_names
[source][test]
get_ft_names
(mod
,include_inner
=False
) →List
[str
] No tests found forget_ft_names
. To contribute a test please refer to this guide and this discussion.
Return all the functions of module mod
.
is_enum
[source][test]
is_enum
() No tests found foris_enum
. To contribute a test please refer to this guide and this discussion.
Check if something is an enumerator.
import_mod
[source][test]
import_mod
(mod_name
:str
,ignore_errors
=False
) No tests found forimport_mod
. To contribute a test please refer to this guide and this discussion.
Return module from mod_name
.
link_docstring
[source][test]
link_docstring
(modules
,docstring
:str
,overwrite
:bool
=False
) →str
No tests found forlink_docstring
. To contribute a test please refer to this guide and this discussion.
Search docstring
for backticks and attempt to link those functions to respective documentation.
©2021 fast.ai. All rights reserved.
Site last generated: Jan 5, 2021