Hi,
I am using doit for my bioinformatics project. To get an overview about my tasks, I have written a script that loads the tasks using `doit.loader.load_tasks()` and creates a dot graph from them (I know there is doit-graph, but I need to avoid the external dependency of the graphviz libs and use pydot instead).
But I generate some (sub-)tasks automatically and just printing the graph of all tasks gives a too large and confusing graph. So I want to add metadata to my tasks that can be read by my graphing script with information like for example:
* A short task description
* Which subgraph the task belongs to
* That this task should be conflated with certain other tasks to a group that only appears as one node
* graphviz options, like "rank", color, style etc.
So I need a way to store information in the tasks that is not used by doit but still retained in the task objects. How is this possible?
Option 1: Is there some field in the Task definition that I am not aware of, like
def task_example:
return {
"action" : "my_script args...",
"metadata" : { "dot_rank" : 3 } }
Option 2: Can I change doit so that it does not generate `doit.Task` object, but a subclass that I create and that has a field for this metadata? How can that be done?
Cheers,
Moritz