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

Check if starter is used before printing tools message #3484

Merged
merged 20 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions kedro/framework/cli/starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,9 +851,12 @@ def _create_project(template_path: str, cookiecutter_args: dict[str, Any]):
f"\nYour project '{project_name}' has been created in the directory \n{result_path}\n"
)

# we can use starters without tools:
# End here if a starter was used
if template_path != TEMPLATE_PATH:
return

if tools is not None:
AhdraMeraliQB marked this conversation as resolved.
Show resolved Hide resolved
if tools == "['None']": # TODO: This should be a list
AhdraMeraliQB marked this conversation as resolved.
Show resolved Hide resolved
if tools == "['None']":
click.secho(
"You have selected no project tools",
fg="green",
Expand Down
1 change: 1 addition & 0 deletions tests/framework/cli/test_starters.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,7 @@ def test_no_hint(self, fake_kedro_cli):
"To skip the interactive flow you can run `kedro new` with\nkedro new --name=<your-project-name> --tools=<your-project-tools> --example=<yes/no>"
not in result.output
)
assert "You have selected" not in result.output
_assert_template_ok(result)
_clean_up_project(Path("./new-kedro-project"))

Expand Down
Loading