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

Investigate removal of prompts.yml #1692

Closed
antonymilne opened this issue Jul 6, 2022 · 4 comments
Closed

Investigate removal of prompts.yml #1692

antonymilne opened this issue Jul 6, 2022 · 4 comments

Comments

@antonymilne
Copy link
Contributor

antonymilne commented Jul 6, 2022

Every starter template has two files, cookiecutter.json and prompts.yml. This has always been kind of confusing: they contain kind of similar information, so do you need to edit just one file or both files?. Following #1643, there's not much left in prompts.yml.

cookiecutter.json is the system used by cookiecutter; prompts.yml is a custom system we added on top of it. As far as I know there's two things that prompts.yml gives us over the cookiecutter.json file:

  1. regex validation of variables with friendly error message
  2. ability to prompt user for only a subset of the variables in cookiecutter.json (as we now do)

I believe we could handle both of these using native cookiecutter features:

  1. cookiecutter hooks to provide validation
  2. private variables

The advantages would be:

  • no longer any need for us to maintain a custom prompts system
  • less confusion about what goes in cookiecutter.json vs. prompts.yml
  • hopefully simpler for a user to customise the prompts (or at least we can just direct them to cookiecutter docs)

The task here is to work out:

  1. are there any other reasons we should keep prompts.yml? What do people use it for?
  2. would the native cookiecutter features be able to handle our needs in a reasonably straightforward way? Note cookiecutter 2 was released relatively recently so might contain new features that are useful.
@antonymilne
Copy link
Contributor Author

antonymilne commented Jul 6, 2022

@MerelTheisenQB might have more context here on why we originally added prompts.yml and which users we should talk to if we want to change this so we can be sure we still satisfy their needs. I don't think there can be many people writing custom prompts.yml files but would be good to hear from those who do.

@merelcht
Copy link
Member

merelcht commented Jul 7, 2022

The original reasoning behind adding the prompts.yml was: "We want to allow users to customise the CLI experience if they write their own starters. Will be useful for vertical starters."

This is the PR that adds the logic (apologies to the community, this was added when Kedro wasn't part of the Linux Foundation yet and so it's in a private repo).

@merelcht
Copy link
Member

merelcht commented Sep 6, 2023

Following the new utilities workflow #2388 we'll be expanding prompts with more options, so I'm closing this ticket.

@merelcht merelcht closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
@astrojuanlu
Copy link
Member

Is there a chance to keep this one open? I recall a conversation with @antonymilne about this issue blocking something else, I'd need to locate it... But I'm wondering if it can be decoupled from the new addons.

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