{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Documentation notebook functions" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.gen_doc.nbdoc import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[`nbdoc`](/gen_doc.nbdoc.html#gen_doc.nbdoc) contains the functions for documentation notebooks. The most important is [`show_doc`](/gen_doc.nbdoc.html#show_doc):" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Show the documentation of a function" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "hide_input": true }, "outputs": [ { "data": { "text/markdown": [ "
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`)"
],
"text/plain": [
"get_source_link[source]get_source_link(`mod`, `lineno`, `display_text`=`'[source]'`) → `str`\n",
"\n",
"Returns link to `lineno` in source code of `mod`. "
],
"text/plain": [
"show_video[source]show_video(`url`)\n",
"\n",
"Display video in `url`. "
],
"text/plain": [
"show_video_from_youtube[source]show_video_from_youtube(`code`, `start`=`0`)\n",
"\n",
"Display video from Youtube with a `code` and a `start` time. "
],
"text/plain": [
"get_exports[source]get_exports(`mod`)"
],
"text/plain": [
"get_fn_link[source]get_fn_link(`ft`) → `str`\n",
"\n",
"Return function link to notebook documentation of `ft`. Private functions link to source code "
],
"text/plain": [
"get_ft_names[source]get_ft_names(`mod`, `include_inner`=`False`) → `List`\\[`str`\\]\n",
"\n",
"Return all the functions of module `mod`. "
],
"text/plain": [
"is_enum[source]is_enum()"
],
"text/plain": [
"import_mod[source]import_mod(`mod_name`:`str`, `ignore_errors`=`False`)\n",
"\n",
"Return module from `mod_name`. "
],
"text/plain": [
"link_docstring[source]link_docstring(`modules`, `docstring`:`str`, `overwrite`:`bool`=`False`) → `str`\n",
"\n",
"Search `docstring` for backticks and attempt to link those functions to respective documentation. "
],
"text/plain": [
"jekyll_important[source]jekyll_important(`s`)"
],
"text/plain": [
"jekyll_warn[source]jekyll_warn(`s`)"
],
"text/plain": [
"jekyll_note[source]jekyll_note(`s`)"
],
"text/plain": [
"doc[source]doc(`elt`)\n",
"\n",
"Show [`show_doc`](/gen_doc.nbdoc.html#show_doc) info in preview window along with link to full docs. "
],
"text/plain": [
"