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

package Kedro project should return session.run #2681

Closed
noklam opened this issue Jun 14, 2023 · 2 comments
Closed

package Kedro project should return session.run #2681

noklam opened this issue Jun 14, 2023 · 2 comments
Assignees

Comments

@noklam
Copy link
Contributor

noklam commented Jun 14, 2023

The problem with the main() method is that it currently returns an exit code, so downstream processes can't do anything with it.

Clarify this one a bit. I think these are 2 problems

  1. main should return the session.run() - so downstream processing is possible
  2. click generate a sys.exit() by default, and since main wrap around the CLI so it creates some issue on Databricks or even just IPython - this link explains more.

Originally posted by @noklam in #1423 (comment)

https://github.com/kedro-org/kedro-starters/blob/ef88b095119e050161dab5e593f184eaf11b1af0/pandas-iris/%7B%7B%20cookiecutter.repo_name%20%7D%7D/src/%7B%7B%20cookiecutter.python_package%20%7D%7D/__main__.py#L39-L43C10

def main(*args, **kwargs):
    package_name = Path(__file__).parent.name
    configure_project(package_name)
    run = _find_run_command(package_name)
    run(*args, **kwargs)

This currently doesn't return anything

@astrojuanlu
Copy link
Member

Related: #2682 (comment)

@noklam
Copy link
Contributor Author

noklam commented Jun 19, 2023

Pre-requisite: #2682

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

No branches or pull requests

3 participants