modeci_mdf.utils

Useful utility functions for dealing with MDF objects.

Functions

color_rgb_to_hex(rgb)

Convert a rgb color to hexadecimal format.

create_example_node(node_id, graph)

Create a simple example node with Input inside a graph

is_number(s)

Return True if cast to float does not throw ValueError, False otherwise.

load_mdf(filename)

Load an MDF file from JSON or YAML.

load_mdf_json(filename)

Load an MDF JSON file

load_mdf_yaml(filename)

Load an MDF YAML file

print_summary(graph)

Print a summary of a graph to standard out.

simple_connect(pre_node, post_node, graph)

Create an edge connecting two nodes in a graph.