Skip to content

Commit

Permalink
Alternative: pass through starter in config
Browse files Browse the repository at this point in the history
Signed-off-by: Ahdra Merali <[email protected]>
  • Loading branch information
Ahdra Merali committed Jan 4, 2024
1 parent 0583d7a commit af8e236
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion kedro/framework/cli/starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ def _get_extra_context( # noqa: PLR0913
or None in case the flag wasn't used.
project_name: a string containing the value for the --name flag, or
None in case the flag wasn't used.
example_pipeline: a string containing the value for the --example flag,
or None in case the flag wasn't used
starter_alias: a string containing the value for the --starter flag, or
None in case the flag wasn't used
Returns:
the prompts_required dictionary, with all the redundant information removed.
Expand All @@ -498,6 +502,9 @@ def _get_extra_context( # noqa: PLR0913
prompts_required, cookiecutter_context
)

if starter_alias:
extra_context["starter_alias"] = starter_alias

# Format
extra_context.setdefault("kedro_version", version)

Expand Down Expand Up @@ -852,7 +859,7 @@ def _create_project(template_path: str, cookiecutter_args: dict[str, Any]):
)

# End here if a starter was used
if template_path != TEMPLATE_PATH:
if extra_context.get("starter_alias"):
return

if tools is not None:
Expand Down

0 comments on commit af8e236

Please sign in to comment.