def main(csv_file, output): graph = Graph() records = csv.reader(open(csv_file, 'r')) for record in open_csv(csv_file): graph.add_node(record[0], record[1], record[2], record[3], record[4]) # TODO - get this to work directly with graphviz rather than a screen print print graph.render()
from elements import Graph from manager import NodeManager, minimum_total_costManager, MaximumManager import threading import json import logging.config with open("logging.json") as f: config = json.load(f) logging.config.dictConfig(config) logger = logging.getLogger(__name__) G = Graph("1") G.start_nodes() G.start() Podmana = MaximumManager(G) Podmana.start() for t in threading.enumerate(): print(t) print(G)
def test_dupes(self): graph = Graph() node = Node('alpha','box','default') graph.add_node(node) self.assertRaises(DuplicateNode, graph.add_node, node)