-
Notifications
You must be signed in to change notification settings - Fork 925
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
Kedro new starter CLI : user_input.lower() #3783
Comments
I think that is by design that we don't allow upper case. As I understand this is the convention for Python community. https://gist.github.com/etigui/7600441926e73c3385057718c2fdef8e However the error may not be clear enough, curious if you are creating your own starters? |
I know about python naming convention, the point is not here : the regex of prompt for project name in uppercase was just for the example. |
@lpsedo got it, would you like to send a PR to fix this? It should be a relative simple one happy to merge this. |
Sure, I will potentially make the PR this weekend |
Hi @Ipsedo are you still interested in creating a PR for this? |
@merelcht I would like to work on this - do I need to be assigned first or should I submit a PR directly? |
Hi @parthmshah1302, thanks for helping out! You can just go ahead and create a PR when you're ready 🙂 |
Hi, could I please get a status update on this? I’d like to work on it if possible. |
Hi @AdityaS8804, the ticket is still open, so you can just go ahead and create a PR when you're ready 🙂 |
Summary: The docs say that starter creators can add their own variables with custom https://docs.kedro.org/en/stable/starters/create_a_starter.html#custom-project-creation-variables but Kedro is not allowing uppercase letters even in variables: kedro/kedro/framework/cli/starters.py Line 957 in 87773e8
Future takers of this issue: don't ask for permission, just go ahead and open a PR. If you need clarification about the problem, don't hesitate to ask. |
Description
I use kedro starter CLI configured by prompt.yml with regex check and I think I found one issue : the user inputs are systematically transformed to lowercase : https://github.com/kedro-org/kedro/blob/main/kedro/framework/cli/starters.py#L957
The result is that I can't restrict user input to uppercase or lowercase
Context
I want to restrict user input to uppercase
Steps to Reproduce
project_name
as unique promptproject_name
regex_validator
field to"[A-Z_]+"
kedro new --starter=./my_starter
and answerMY_PROJECT
forproject_name
promptuser_input.lower()
inkedro/framework/cli/starters.py
line 957Expected Result
The regex and the input must match
Actual Result
The user input is refused
Your Environment
Python : 3.9.13
Kedro : 0.19.3
OS : Linux (distribution and kernel version confidential)
The text was updated successfully, but these errors were encountered: