-
Notifications
You must be signed in to change notification settings - Fork 915
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
Use click features for project creation prompts #4387
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
The current problem with this is that when the |
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
I confirm that the current branch works at least! IIUC this now purely uses Click. Is there a plan to try to restore the colors later on, maybe using https://click.palletsprojects.com/en/stable/utils/#ansi-colors ? (not necessarily right now, as it would probably complicate fixing the remaining tests) |
Definitely! I want to make sure all of the functionality is as we expect first, but it would be nice to have an option for colors (with the added bonus of not relying on Rich) |
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
@lrcouto, could you please clarify if colours should work and how we can check everything works as expected? |
They do not work yet, I'm implementing a color scheme at the moment. It should not affect automated tests, but the visual appearance will also be slightly different, as those prompts from cookiecutter were importing the Prompt class from Rich. I'll post some screenshots with options once I finish implementing it. |
Signed-off-by: Laura Couto <[email protected]>
Signed-off-by: Laura Couto <[email protected]>
Description
Replaces Cookiecutter prompts with the
click.prompt
method, without affecting functionality inkedro new
.We are still using some methods that Cookiecutter imports from Rich, mainly for exceptions, so at the moment it'll still not allow us to uninstall rich without downgrading Cookiecutter.
Prompt appearance is now defined used the click.style method, so it can be changed if we so desire.
Example appearance:
Development notes
Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file