Closed tdiethe closed 7 years ago
Closing this for now. The current syntax looks like:
M = hs.channel_manager.memory
with hs.create_workflow(workflow_id=workflow_id, **workflow_parameters) as w:
ticker = w.create_node(stream_name="ticker", channel=, plate_ids=["T"])
for plate_value in hs.plate_manager.plates["T"]:
ticker_repeated[plate_value] = hs.factors.clock(sources=[])
time_interval = TimeInterval(t1, t1 + minute)
w.execute(time_interval)
At the moment is that all of the nodes have to be created up front (
w.create_node(stream_name, channel_id, plate_ids)
) and, and since we also store a dict of stream_name->node at the same time (N
), they can then be accessed during workflow creation usingN['whatever']
. I'd actually like to get rid of this, so that you can use notation like the following:Of course this can't work because
my_node
hasn't yet been defined. To define it, we need to know what channel it belongs in, and take a reference to the workflow. One way to do this would be to put references to the channels in the workflow, so the last line would become:although I'm not sure if that's going to work either (well it can, but it will be ugly). Actually, there are two references to the workflow on that line (one for the node, and one for the factor), so perhaps old way of referencing the channel could be used:
or another alternative would be to move the channel specification to the right, e.g.: