kedro icon indicating copy to clipboard operation
kedro copied to clipboard

Use `click` choice options to simplify validation of project creation workflow

Open ankatiyar opened this issue 9 months ago • 0 comments

Description

Going through the click documentation, I came across these features -

  • https://click.palletsprojects.com/en/8.1.x/options/#choice-options
  • https://click.palletsprojects.com/en/8.1.x/options/#prompting

These could be used to get rid of/simplify the validation we do for inputs to kedro new options like --tools and --example.

Context

The project creation workflow is a little complicated, some values come from the CLI command and some from the cookiecutter prompts

Possible Implementation

  • Could use click functionalities to get rid of some of the custom validation we do for inputs using regex etc
  • Could explore if click prompts allow us to replace the cookiecutter prompts (related https://github.com/kedro-org/kedro/issues/2928 cc @lrcouto)
  • There might be other CLI options that we're accepting as strings and validating (haven't checked) that could benefit from inbuild click features

ankatiyar avatar May 20 '24 12:05 ankatiyar