Generate a class signature string.
1
2
3
4class cls_sig:
"""Generate a class signature string."""
n: Node # the node to generate signature for
dataclass = False # whether to include @dataclass decorator Generate a class signature string.
1
2
3
4class cls_sig:
"""Generate a class signature string."""
n: Node # the node to generate signature for
dataclass = False # whether to include @dataclass decorator Generate a function signature string with inline parameter documentation.
1
2
3
4
5def fn_sig(
n: Node, # the node to generate signature for
is_async=False # async ?
) -> str:
"""Generate a function signature string with inline parameter documentation.""" Generate a signature string for a class or function node.
1
2
3class sig:
"""Generate a signature string for a class or function node."""
n: Node # the node to generate signature for Write API signatures to llms.txt file for LLM consumption.
1
2
3
4
5
6def write_llms(
meta: dict, # project metadata from pyproject.toml
nodes: list, # list of Node objects to document
root: str='.' # root directory containing pyproject.toml
):
"""Write API signatures to llms.txt file for LLM consumption.""" 1
2class exp_type:
n 1
2
3def render_param(
p
): [TODO]
1
2
3
4
5def nb_path(
mod_name,
root='.'
):
"""[TODO] """ Builds a `node` for docs
1
2
3
4
5
6def render_node(
n,
repo_url=None,
root='.'
):
"""Builds a `node` for docs""" Builds a Module Page
1
2
3
4
5
6
7
8def render_module_page(
mod_name,
mod_nodes,
all_mod_names,
meta,
root='.'
):
"""Builds a Module Page""" Builds the static documentation website
1
2
3
4def build_docs(
root='.' # the project root (this should never really change)
):
"""Builds the static documentation website""" 1
2
3def export_wasm(
root='.'
): 1
2
3def write_nojekyll(
root='.'
): Display FT components in an IFrame
1
2
3
4
5def html_preview(
width='100%',
height='300px'
):
"""Display FT components in an IFrame""" 1
2
3
4
5def render_index_page(
meta,
mods,
repo_url=None
): Creates a custom html compliant <icon-{name}>... Intended to be used with a Global Dict of icons {"home": "<svg...", "info": "<svg..."} Icon('home') -> <icon-home> .... </icon-home>
1
2
3
4
5
6
7
8
9def Icon(
name: str, # name of the icon MUST be in icon_dict
size=24, # value to be passed to height and width of the icon
stroke=1.5, # stroke width
icon_dict: dict=icons # Dict of icons {"name":"<svg...>"}
):
"""Creates a custom html compliant <icon-{name}>...
Intended to be used with a Global Dict of icons {"home": "<svg...", "info": "<svg..."}
Icon('home') -> <icon-home> .... </icon-home>"""