The Tree Object

class cmaple.tree.CMapleTree(name=None, tree_dir=None, logging_config_dict={}, logging_level='INFO', log_file_mode='w')[source]

This class defines the top level object for MAPLE; the ‘tree’ object.

The tree object provides methods to instantiate and manage MAPLE ‘leaf’ objects.

__init__(name=None, tree_dir=None, logging_config_dict={}, logging_level='INFO', log_file_mode='w')[source]

__init__ receives a kwargs dict to define parameters. This allows __init__ to pass these parameters to the superclass.

Returns a tree object.

Parameters

name: string, keyword, default=None
The name of this MAPLE tree. The name is required and will be used to create a working directory for the tree object.
tree_dir: string, keyword, default=None
The path to the desired location for the tree’s working directory. Together with the tree name, will be used to create the tree’s working directory (e.g. leaf_dir/name)
logging_level: string, keyword, default=None
The desired logging level for the tree object (inherited by all leaf objects
log_file_mode: string, keyword, default=’w’
The file mode for the log file. Default is ‘w’ for write mode.
add_leaf_instance(leaf_type=None, **kwargs)[source]

Initializes a leaf instance.

Returns a leaf object.

Parameters

leaf_type: string, keyword, default=None
The leaf type to initialize.
kwargs: dictionary
kwargs dictionary containing keyword: value pairs pass to the leaf’s __init__ method
multi_leaf_chained_smart_get(get_chains=None, responses_dict=None, query_dict=None)[source]

Under construction.

Returns…

Parameters

…: string, keyword, default=None
The leaf type to initialize.