PyTimeloop
Loading...
Searching...
No Matches
pytimeloop.timeloopfe.common.doc Namespace Reference

Provides information on all node subtypes and their attributes. More...

Functions

str get_property_table (Union[Node, type] node=None, int col_len=25, bool trim_cols=False)
 Returns a table of all Node subclasses and their attributes.
 
str get_property_tree (Union[Node, type] node=None, Union[List[str], None] skip=None, n_levels=-1)
 Returns all node subtypes and their attributes in a tree format.
 
str _get_property_tree (Union[Node, type] node, Union[Node, type] top, Union[List[str], None] skip=None, n_levels=-1)
 Returns all node subtypes and their attributes in a tree format.
 
 get_property_yaml (Node node, "BaseSpecification" top=None, Union[List[str], None] skip=None)
 Returns all node subtypes and their attributes in a YAML format.
 
 _get_property_yaml (Node node, "BaseSpecification" top=None, Union[List[str], None] skip=None)
 Returns a yaml representation of the specification.
 

Detailed Description

Provides information on all node subtypes and their attributes.

Function Documentation

◆ _get_property_tree()

str pytimeloop.timeloopfe.common.doc._get_property_tree ( Union[Node, type] node,
Union[Node, type] top,
Union[List[str], None] skip = None,
n_levels = -1 )
protected

Returns all node subtypes and their attributes in a tree format.

Args: node (Union[Node, type]): The node or type to generate the property tree for. top (Union[Node, type]): The top-level node or type. skip (Union[List[str], None], optional): List of attributes to skip. Defaults to None. n_levels (int, optional): Number of levels to include in the tree. Defaults to -1 (all levels).

Returns: str: The property tree in a string format.

◆ _get_property_yaml()

pytimeloop.timeloopfe.common.doc._get_property_yaml ( Node node,
"BaseSpecification" top = None,
Union[List[str], None] skip = None )
protected

Returns a yaml representation of the specification.

◆ get_property_table()

str pytimeloop.timeloopfe.common.doc.get_property_table ( Union[Node, type] node = None,
int col_len = 25,
bool trim_cols = False )

Returns a table of all Node subclasses and their attributes.

Args: node (Union[Node, type], optional): The Node subclass to generate the table for. If None, generates the table for all Node subclasses. Defaults to None. col_len (int, optional): The length of each column in the table. Defaults to 25. trim_cols (bool, optional): Whether to trim the columns to fit the specified length. Defaults to False.

Returns: str: The generated table as a string.

◆ get_property_tree()

str pytimeloop.timeloopfe.common.doc.get_property_tree ( Union[Node, type] node = None,
Union[List[str], None] skip = None,
n_levels = -1 )

Returns all node subtypes and their attributes in a tree format.

Args: node (Union[Node, type], optional): The node or node type to generate the property tree for. If not provided, the Specification node will be used. Defaults to None. skip (Union[List[str], None], optional): A list of attribute names to skip in the property tree. Defaults to None. n_levels (int, optional): The number of levels to include in the property tree. A negative value indicates all levels. Defaults to -1.

Returns: str: The property tree as a string.

◆ get_property_yaml()

pytimeloop.timeloopfe.common.doc.get_property_yaml ( Node node,
"BaseSpecification" top = None,
Union[List[str], None] skip = None )

Returns all node subtypes and their attributes in a YAML format.

Parameters: node (Node): The node for which to generate the YAML. top (BaseSpecification, optional): The top-level specification. Defaults to None. skip (Union[List[str], None], optional): List of attributes to skip. Defaults to None.

Returns: str: The YAML representation of the node subtypes and their attributes.