[graph] use 'types' module for data models and signals/slots

* store Nodes and Attributes in Models
* expose key attributes/methods as Properties/Slots
* update command line scripts
This commit is contained in:
Yann Lanthony 2017-09-25 19:14:19 +02:00
parent 4cd9627263
commit 51a9b0e316
4 changed files with 138 additions and 66 deletions

View file

@ -26,7 +26,7 @@ graph.update()
if args.node:
# Execute the node
node = graph.nodes[args.node]
node = graph.node(args.node)
if node.isAlreadySubmitted():
print('Error: Node is already submitted with status "{}"'.format(node.status.status.name))
exit(-1)
@ -35,6 +35,6 @@ if args.node:
else:
startNodes = None
if args.graph:
startNodes = [graph.nodes[args.graph]]
startNodes = [graph.nodes(args.graph)]
pg.execute(graph, startNodes=startNodes, force=args.force)