Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I denote dependencies? #44

Open
retorquere opened this issue May 13, 2018 · 3 comments
Open

How do I denote dependencies? #44

retorquere opened this issue May 13, 2018 · 3 comments

Comments

@retorquere
Copy link

I'm looking to implement the equivalent of

file 'README.html' => 'README.md' do |task|
  system "pandoc -o #{task.name} #{task.source}"
end

file 'README.md' do |task|
  system "curl -O 'https://raw.githubusercontent.com/seomoz/shovel/master/README.md'"
end
@dlecocq
Copy link
Contributor

dlecocq commented May 14, 2018

shovel currently has mechanism for this. The nearest thing (which is a far cry from this functionality) is to invoke other tasks within the body of another task. However, this doesn't do any optimization for when dependencies are already satisfied - that would have to be implemented for each method.

@task
def makeREADMEhtml():
    makeREADMEmd()
    ...

@task
def makeREADMEmd()
    ...

@retorquere
Copy link
Author

I've whipped up something that does dependencies, Makefile-style here. Interested in merging something like this?

@FilBot3
Copy link

FilBot3 commented Jan 17, 2020

To me, its just calling functions. If you need a previous task run, you call it in your shovel/shovel.py and it should run. Then you can throw extra Python logic on it if needed. I find myself using the import os library a lot for file and command based tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants