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

task not complete run option for data load #20

Open
bacross opened this issue Dec 18, 2019 · 3 comments
Open

task not complete run option for data load #20

bacross opened this issue Dec 18, 2019 · 3 comments

Comments

@bacross
Copy link

bacross commented Dec 18, 2019

Would like to see an option for the data load function to automatically run if task not marked complete. I find myself writing if else statements like the below to get the desired effect:

if TaskExample().complete: df = TaskExample().output()['df'].load() else: d6tflow.run(TaskExample()) df = TaskExample().output()['df'].load()

@d6tdev
Copy link
Contributor

d6tdev commented Dec 31, 2019

How about asking the user if you want to run the task if it's not complete on load. Not sure if it should auto run.

For now suggest to always run d6tflow.run(TaskExample()) before loading any data. That will guarantee tasks are complete and no need for if statements.

@bacross
Copy link
Author

bacross commented Dec 31, 2019

just a parameter option should be enough:

TaskExample().output()['df'].load(run_if_incomplete=True)

kind of a nice to have

@d6tdev
Copy link
Contributor

d6tdev commented Jan 2, 2020

There a multiple issues that make this non-trivial to implement. 1) a target doesn't know which tasks it belongs to and 2) this could work better in Task().outputLoad(auto_run=True) but would lead to circular imports. TBD. For now suggest to always just run d6tflow.run(TaskExample()) if all tasks are complete this is fast.

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

2 participants