How to print dependencies and targets of a whole workflow

22 views
Skip to first unread message

mle...@gmail.com

unread,
Nov 2, 2023, 1:09:49 PM11/2/23
to python-doit
Hello,
I am using doit quite successfully for my data science project, to the point where I want to do actions based on whole workflows. For example:

* List all file_deps that are not targets of another task, i.e. file_dep's of the whole workflow
* List the targets of all tasks

This allows me to tell git annex to unlock (make them writable) automatically and it can be a first step towards defining nested workflows (calling a new doit process from doit).

What is the best option to do this? If I do it as a task, can I access the list of other tasks and their targets? If I do it as a stand-alone command, I need to deal with calculated dependencies and targets myself, which doit would do for me if I choose the task route. Is it possible to repeat those calculations (though calc-deps/targets are not a hard requirement for me, it would be nice to keep that road open)

Is there already any development into this that I could base the work on?

Thank you!
Moritz

Eduardo Schettino

unread,
Nov 2, 2023, 3:20:49 PM11/2/23
to pytho...@googlegroups.com
Hi Moritz,

If you want to handle task's metadata I would suggest you to create a custom doit sub-command. [1]
doit provides a nice plug-in mechanism so that you can create sub-commands on "user land".

Check the `info` and `list` command, it seems that what you want is a combination of both.

> This allows me to tell git annex to unlock (make them writable) automatically and it can be a first step towards defining nested workflows (calling a new doit process from doit).

calling doit from doit itself is not really recommended... you need to be careful handling the DB.
Check doit-auto [2] for a sample on how this is done.


Regards


--
You received this message because you are subscribed to the Google Groups "python-doit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-doit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-doit/7263c85e-a87f-4e0f-85ae-89511c0f5de7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages