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

Improve style of prompts using rich #1901

Merged
merged 15 commits into from Aug 2, 2023
Merged

Conversation

vemonet
Copy link
Contributor

@vemonet vemonet commented Jul 17, 2023

Hi, this PR adds rich to the cookiecutter dependencies and improve the style of the prompts without changing the prompt workflow

  • Add a counter, e.g. [1/10], at the start of each prompt so the user knows how many steps are left
  • Default values are shown between parenthesis in the cyan color
  • This enables cookiecutter template creators to use simple markup to style their questions, e.g. `What is [bold yellow]your name[/]"
  • The answers accepted for the different types of prompts are the same as before:
    • y/t/true/yes/on or n/f/false/no/off for boolean questions
    • Using integers for multiple choices questions
    • Json prompt supported the same was as before
  • Add a 2 spaces indent at the start of each prompts

You can find screenshots of the changes proposed in the issue #1885

I used rich as it seems the most mature, maintained, and popular package to style CLI apps in python

@ericof ericof added this to the 2.3.0 milestone Jul 27, 2023
@ericof ericof added the enhancement This issue/PR relates to a feature request. label Jul 27, 2023
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that was not supposed to be pushed in this branch! Well spotted, I removed it @ericof

Copy link
Member

@ericof ericof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the bug.yml

@ericof ericof merged commit 90bd2f7 into cookiecutter:main Aug 2, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants