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

Documented way for starting Luigi tasks inside Python code #2301

Merged
merged 3 commits into from
Feb 26, 2018

Conversation

nryanov
Copy link
Contributor

@nryanov nryanov commented Dec 6, 2017

Description

Information about another existing way for starting Luigi tasks

Motivation and Context

This way can be useful if user wants to get dynamic params from anywhere before start the task and pass them automatically

This way can be useful if user wants to get dynamic params from anywhere before start the task and pass them automatically
@nryanov nryanov changed the title [Docs - cmdline] Additional way to start Luigi tasks Documented way for starting Luigi tasks inside Python code Dec 7, 2017
@Tarrasch
Copy link
Contributor

Looks good:

  • Can you change the filename from "comman_line" to "running_luigi" or something?
  • Perhaps remove the class file code?
  • If you mention run() you should also mention build I think to be fair, and also link to the whole run interface code module.

@erikbern
Copy link
Contributor

I don't think this is the right way to run tasks from inside Python. Why deal with the command line interface at all

@erikbern
Copy link
Contributor

Look at interface.build: https://github.com/spotify/luigi/blob/master/luigi/interface.py#L251

We should probably document that somewhere

@Tarrasch
Copy link
Contributor

Tarrasch commented Dec 12, 2017

Actually yes, looking at the code it seems it heeds quite strong warnings against using run (written by myself a long time ago).

@nryanov
Copy link
Contributor Author

nryanov commented Dec 12, 2017

Oh, yes, i had to document build, not run (as i see now). It's all because i use run method in my code despite on warnings about it ^_^


So, i'll edit it after i try out build in my code

@dlstadther
Copy link
Collaborator

Any update here @Gr1f0n6x ?

@nryanov
Copy link
Contributor Author

nryanov commented Feb 18, 2018

@dlstadther yes, sorry for delay (a lot of work), i'll continue to work on this issue and try to finish another one (parameter visibility)

1. Rename command_line file to running_luigi
2. Add description how to start luigi tasks using luigi.build function from luigi.interface module
@nryanov
Copy link
Contributor Author

nryanov commented Feb 25, 2018

My apologize for big delay in time.

i amended the doc as you proposed and additionally i added minor extra information which may be useful for users who want to provide additional logic in task execution or something else

@Tarrasch
Copy link
Contributor

Wow, what an improvement! Thanks!

@Tarrasch Tarrasch merged commit 037eb71 into spotify:master Feb 26, 2018
This was referenced Jun 29, 2022
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

Successfully merging this pull request may close these issues.

4 participants