clean not including forget

9 views
Skip to first unread message

Mike Pagel

unread,
Nov 3, 2017, 3:04:09 AM11/3/17
to python-doit
Hi,

I understand the difference between commands "clean" and "forget". Since I will deploy doit-based automation tasks to developers, they will start using doit without knowing tool details. For the typical developer, a "clean" target (or doit command for that matter) would imply what doit calls "forget", i.e. he would then expect the next "run" to fully redo whatever is part of the task, since that is what he is used to from pretty much all other workflow and build engines.

In case of file-level targets this can be overcome by adding the "clean_targets" action. However, in a case where we have a file-level input dependency, but no target file, this is not possible (I think). Would it make sense to add a "forget_task" action so I could write:

yield dict(
actions=[...],
clean=[forget_task, ...],
file_dep=[...],
)

I can offer to implement it, if this sounds useful and the right approach. If so some hints would be appreciated, e.g. how to get the dependency manager from the context of the action function to implement. But first things first: does that make sense?

Thanks,
Mike

Eduardo Schettino

unread,
Nov 3, 2017, 9:09:10 AM11/3/17
to python-doit
On Fri, Nov 3, 2017 at 8:04 AM, 'Mike Pagel' via python-doit <pytho...@googlegroups.com> wrote:
Hi,

I understand the difference between commands "clean" and "forget". Since I will deploy doit-based automation tasks to developers, they will start using doit without knowing tool details.

Cool. please tell us more what is this tool is used for :) maybe contribute a success story?
http://pydoit.org/stories.html
 
I can offer to implement it, if this sounds useful and the right approach. If so some hints would be appreciated, e.g. how to get the dependency manager from the context of the action function to implement. But first things first: does that make sense?


From your description I would approach things in a different way.

I would create a custom command (and overwrite the current "clean", so that it also perform a "forget" operation).
Basically you need just to re-use the code from 2 commands in a single command.

I guess it makes sense that a "clean" forgets stuff.
I would accept a patch adding a command line option to "clean".
It would not be the default but you could configure that.

If you feel like implementing it please create an issue on github.

cheers,

Mike Pagel

unread,
Nov 3, 2017, 12:23:08 PM11/3/17
to pytho...@googlegroups.com

Thanks for the support!

 

Regarding the usage of doit: I am responsible for setting up a CI system for an embedded software project within my company. I’ve done this before without doit and was dearly missing something between the entry points of CI (like a Jenkinsfile) and the actual SW build tool (like CMake in our case), that is a bit more abstract, can be tested and can be run on developer machines as well (unlike the groovy configuration in a Jenkinsfile). When I discovered doit, I was immediately convinced that the simplicity is just what I need, while it still is deep enough to allow for efficient workflow execution (with dependency and out-of-date checks and parallel execution). So doit is just that: my automation layer between CI/developers on one side and the build tool CMake (and other tools needed for the project) on the other. You could also compare the approach to Github’s “scripts to rule them all” (https://github.com/github/scripts-to-rule-them-all), just that I use platform independent and testable doit instead of Linux shell scripts.

 

I can go into much more detail, but let me get this out of the door first (early 2018) and see how it goes. In the end I might publish a blogpost or something, and I’ll see whether the company name could even show up on your site.

 

Regarding the topic at hand: yes, I’d like to give it a shot. I’ll create an issue and ask there in case of further questions and go for it in a fork.

 

Best,

Mike

--
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.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages