@Stefan and team, great forum and really cool project here!
Out of sheer curiosity, can you create and run Vector Scheduler workflows (typically .wfl files) with PyHamilton? If yes, I can’t wait to see an example. If not, how might you try to tackle this especially the handling of parameters for the tasks which will now correspond to Python scripts rather than .hsl files? How would you go about designing activities? Since you still have to use Method Editor for the deck layout, I assume adding resources wouldn’t be an issue though.
I’m only a little familiar with the Vector Scheduler. My understanding is it lets you link a sequence of methods together into a larger process. So you have methods A, B, and C, and the scheduler lets you run A->B->C within a single workflow.
There are a lot of options for this in PyHamilton. One possibility is to define each separate method as a function, and call each function sequentially in a Python script. Here’s how this might look:
from pyhamilton import tip_pick_up, aspirate, dispense, tip_eject
def parse_worklist():
...
def method_1(num_samples, plate_barcode):
tip_pick_up(...)
...
tip_eject(...)
def method_2(worklist_path):
worklist = parse_worklist(...)
tip_pick_up(...)
...
tip_eject(...)
if __name__ == '__main__':
with HamiltonInterface(simulate = False) as ham_int:
method_1(...)
method_2(...)
Crucially, we can (and should) define these method functions separately in a common repository or library of functions. That way I can arbitrarily orchestrate any set of method functions in any order I want.
The “scheduler” part of the above code is the very last two lines. Let me know if this answers your question and if you’d like any more info.
Once you are in the python ecosystem, you might as well go for a well-tested python scheduler instead (assuming you mean dynamic scheduling rather than just method composition/orchestration), something like User guide — APScheduler 3.9.1 documentation, coupled with parameterised/CLI python calls (using something like click) could work well.