Closed laszewsk closed 5 years ago
so you do not have to fix this but here is a way on how to list the nodes as dict
db = CmDatabase()
nodes = db.find(collection=f"{arguments.FLOWNAME}-flow")
order = ["name", "workflow", "dependencies", "cm.modified"]
header = ["Name", "Workflow", "Dependencies", "Modified"]
for node in nodes:
node["dependencies"] = ", ".join(node["dependencies"])
print(Printer.flatwrite(nodes,
order=order,
header=header,
output=arguments.output))
this can be used as example not yet sure how the viz comom=nent does it
This is now the default list code for the command line.
For the WorkFlowDB
class, I am reluctant to change as that would break the format used in the visualization portion. Best to leave this to after the freeze ends on the viz component.
please make sure your documentatio in the manual, contains the description how the db object looks like. Just in case I reopened this. If you alread ydid that, close this issue again with the comment that db object is documented in the manual
Created new docs in manual. Should be good
I think there may be an issue with the database implementation.
why are we not just returning a dict representing the flow. THis woudl make things I guess easier? we could than use our flatten dict method so you could get easily values for the display, I think your Node object ignores all of them but I was not sure? so the list would just return an arry of dicts of the form shown next.