I am trying to extend invoke to be able to run slurm jobs, and I am slowly figuring out what I need to extend from the example of fabric. It would be nice to have this documented somewhere for other developers. So my understanding is that a common setup is to extend:
Context: The main entity to initialize the work environment and provide a user interface
Config: To add your own configurations to be parsed from .invoke.yaml
Runner: To define how to run a command
The issue currently is that it is not clear what is the minimum that we need to implement in each class. An example that could help illustrate is maybe a wrapper over Local that takes a "Hello world" message from Config, prints this message before each task/command, and prints a similar message at the start of the context setup.
Is there a matrix/IRC/Discord room to get some quick pointers for these?
Similarly, but more specific to the goal of the slurm wrapper:
How can I gather the tasks before a run command? Is that done automatically?
Is it possible to prepare run steps or postpone the execution of run in a context?
In an asynchronous runner, can I dynamically add tasks/run command (dependent or independent on a previous step)
For an asynchronous runner, where do I specify how to query if a run is finished or not?
I am trying to extend
invoke
to be able to runslurm
jobs, and I am slowly figuring out what I need to extend from the example offabric
. It would be nice to have this documented somewhere for other developers. So my understanding is that a common setup is to extend:Context
: The main entity to initialize the work environment and provide a user interfaceConfig
: To add your own configurations to be parsed from.invoke.yaml
Runner
: To define how to run a commandThe issue currently is that it is not clear what is the minimum that we need to implement in each class. An example that could help illustrate is maybe a wrapper over
Local
that takes a "Hello world" message fromConfig
, prints this message before each task/command, and prints a similar message at the start of the context setup.Is there a matrix/IRC/Discord room to get some quick pointers for these?
Similarly, but more specific to the goal of the
slurm
wrapper:run
command? Is that done automatically?run
in a context?run
is finished or not?