Graph Parameters
This submodule handles the variable flow part of BLUMYCELIUM. This is what allows BLUMYCELIUM to derive the set of instructions necessary to compte a vriable.
Graph Parameters
- class blumycelium.graph_parameters.CodeBlock(init_code=None, return_statement=None)[source]
a code block of python code to run
- class blumycelium.graph_parameters.GraphParameter(uid=None)[source]
A graph of Parameters
- add_dependencies(*deps)[source]
add dependencies (other GraphParaemters) needed to compute the value
- classmethod build_from_traversal(trav: dict, pull_origin_function=None)[source]
build a parameter from a traversal dictionary
- pp_traverse(full_representation=False, representation_attributes=['value', 'code_block', 'uid', 'python_id'], print_it=True)[source]
a pretty print of the graph representation with dependencies representation_attributes: list of field to print
- set_code_block(init_code, return_statement, **dependencies)[source]
set the code block of the parameter
- set_origin(uid, pull_origin_function=None)[source]
set the origin (address) of the parameter and function to retreive the value from the origin