0

I would like to create my own Kedro starter. I have tried to replicate the relevant portions of the pandas iris starter. I have a cookiecutter.json file with what I believe are appropriate mappings, and I have changed the repo and package directory names as well as any references to Kedro version such that they work with cookie cutter.

I am able to generate a new project from my starter with kedro new --starter=path/to/my/starter. However, the newly created project uses the default values for the project, package, and repo names, without prompting me for any input in the terminal.

Have I misconfigured something? How can I create a starter that will prompt users to override the defaults when creating new projects?

Here are the contents of cookiecutter.json in the top directory of my starter project:

{
    "project_name": "default",
    "repo_name": "{{ cookiecutter.project_name }}",
    "python_package": "{{ cookiecutter.repo_name }}",
    "kedro_version": "{{ cookiecutter.kedro_version }}"
}
Tashus
  • 207
  • 2
  • 9

1 Answers1

1

I think you may be missing prompts.yml https://github.com/quantumblacklabs/kedro/blob/main/kedro/templates/project/prompts.yml

Full instructions can be found here: https://kedro.readthedocs.io/en/stable/07_extend_kedro/05_create_kedro_starters.html

datajoely
  • 1,466
  • 10
  • 13
  • I'll give this a shot and accept it if it works. Thanks! I was following a 3rd party example that didn't mention this. – Tashus Jan 06 '22 at 19:47
  • Do you know where `prompts.yml` is supposed to go? I assume the top level directory along with `cookiecutter.yml`, but the documentation doesn't specify, and I don't see any such file in the pandas iris starter: https://github.com/quantumblacklabs/kedro-starter-pandas-iris – Tashus Jan 06 '22 at 20:13
  • I got it working by placing `prompts.yml` in the top level directory of my starter. I'll accept this answer. I'm confused as to how my clone of the pandas iris starter works seemingly without a `prompts.yml`, but I'll leave that for another question. Thank you! – Tashus Jan 06 '22 at 20:18