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

Make default project entrypoint interactive (Databricks) friendly #3191

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* The new spaceflights starters, `spaceflights-pandas`, `spaceflights-pandas-viz`, `spaceflights-pyspark`, and `spaceflights-pyspark-viz` can be used with the `kedro new` command with the `--starter` flag.
* Added the `--conf-source` option to `%reload_kedro`, allowing users to specify a source for project configuration.
* Added the functionality to choose a merging strategy for config files loaded with `OmegaConfigLoader`.
* Improved the default template's entrypoint to allow for `IPython` and Databricks executions without separate scripts.


## Bug fixes and other changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
as `{{ cookiecutter.repo_name }}` and `python -m {{ cookiecutter.python_package }}`
"""
import importlib
import sys
from pathlib import Path

from kedro.framework.cli.utils import KedroCliError, load_entry_points
Expand Down Expand Up @@ -40,6 +41,10 @@ def main(*args, **kwargs):
package_name = Path(__file__).parent.name
configure_project(package_name)
run = _find_run_command(package_name)

interactive = not hasattr(sys, 'ps1')
kwargs["standalone_mode"] = not interactive

run(*args, **kwargs)


Expand Down