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

Don't require users to review all questions when running copier update #1178

Closed
drewoldag opened this issue Jun 9, 2023 · 4 comments · Fixed by #1276
Closed

Don't require users to review all questions when running copier update #1178

drewoldag opened this issue Jun 9, 2023 · 4 comments · Fixed by #1276

Comments

@drewoldag
Copy link

Actual Situation

When someone runs copier update, they have to review all of the responses that they have provided in their answers file. People get kind of blind to these responses and just return through the list as fast as possible.

Desired Situation

It would be nice if there was an argument that would take all the previous responses found in the answers file and only present the user with new template questions that were added after the hydrated project was created.

Proposed solution

I have no technical solution, but an initial questions like this would be amazing. (Actual wording should be improved.)

>> Would you like an interactive update?
          Full interaction - review previous answers
    >> Some interaction - use previous answers, show me new questions
          No interaction - show no questions, just take previous answers and default values for new questions
@sisp
Copy link
Member

sisp commented Jun 10, 2023

I like the idea. 👍 I'd use a flag though, e.g. copier update --keep-answers ... (just an idea, to be discussed) and --defaults might be added to use default answers for new questions.

@yajo
Copy link
Member

yajo commented Jun 10, 2023

Using --defaults, any question without a default value will be asked. Does that solve your problem?

@yajo yajo added the triage Trying to make sure if this is valid or not label Jun 10, 2023
@drewoldag
Copy link
Author

--defaults would be fine, but I like the clarity of the --keep-answers flag.

At the end of the day, it would just be nice not to be forced to review all the prior responses when updating :)

@yajo yajo added this to the Community contribution milestone Jun 12, 2023
@yajo
Copy link
Member

yajo commented Jun 12, 2023

Maybe, but --keep-answers is a bit absurd as a flag name. Answers are always kept on updates and recopies. Something like --skip-answered or --ask-only-new-questions makes more sense.

I don't have plans to implement this, but any PR would be welcome.

@yajo yajo removed the triage Trying to make sure if this is valid or not label Jun 12, 2023
@yajo yajo closed this as completed in #1276 Sep 3, 2023
yajo added a commit that referenced this issue Sep 3, 2023
This change addresses a usability issue troubling users when they run 'copier update'. Previously, each time 'copier update' was run, the user had to review all responses given in the answers file. This was a repetitive and laborious process, particularly for users dealing with extensive templates.

This PR introduces a new flag --skip-answered to improve the user experience and reduce friction during updates. The new flag allows users to bypass the review of questions already answered in the past. It automatically pulls responses from the answers file and presents only the newly added template questions to the user for their review.

`skip-answered` will skip all answered questions and ask user input only for new inputs if they are present.

Fixes #1178

Co-authored-by: Jairo Llopis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants