Skip to content

Add the .copier-answers.yml file#34

Open
h-chmeruk wants to merge 4 commits intomainfrom
add-copier_answers-file
Open

Add the .copier-answers.yml file#34
h-chmeruk wants to merge 4 commits intomainfrom
add-copier_answers-file

Conversation

@h-chmeruk
Copy link
Contributor

Which issue(s) are closed by this pull request?

Closes #33

Changes proposed in this pull request:

  • Added the {{ _copier_conf.answers_file }}.jinja file, which generates the Copier answers file (default name is .copier-answers.yml) used to store user answers to questions during project creation and updates.
  • Updated the test_copier.py file to test the correct creation of the .copier-answers.yml file.

@h-chmeruk h-chmeruk requested a review from ahms5 February 5, 2026 08:50
@h-chmeruk h-chmeruk added the enhancement New feature or request label Feb 5, 2026
@h-chmeruk h-chmeruk added this to the v0.1.0 milestone Feb 5, 2026
Comment on lines 3 to 5
valid_python_versions=valid_python_versions,
pypi_license_classifiers_list=pypi_license_classifiers_list,
pypi_license_classifier=pypi_license_classifier) | to_nice_yaml -}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for adding this is that the parameters with the “when”-attribute are not displayed to users AND are not stored in the .copier-answers.yml file. I would suggest adding them manually to the .copier-answers.yml file, as we may need them for future updates to the projects or for general maintenance.
This implementation should be valid and was taken from the Copier documentation.

Copy link
Member

Choose a reason for hiding this comment

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

do we really need this parameters to reproduce the full build? especially the valid_python_versions parameter will change every year and can break build.
It is even desired, that if valid_python_versions is changed, the packages automatically add the new python version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a good point. I think you are right, and maybe we don't need them at all, since these are parameters that are always created from other parameters or from their default values. But now at least we know how we could store them if we wanted to.

@ahms5 ahms5 requested review from a team and hoyer-a February 6, 2026 14:06
@ahms5 ahms5 moved this from Backlog to Require review in Weekly Planning Feb 6, 2026
@h-chmeruk h-chmeruk force-pushed the add-copier_answers-file branch from 84f56d3 to 88e07c5 Compare February 13, 2026 10:42
Copy link
Member

@ahms5 ahms5 left a comment

Choose a reason for hiding this comment

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

Nice

@github-project-automation github-project-automation bot moved this from Require review to Reviewer Approved in Weekly Planning Feb 17, 2026
@f-brinkmann f-brinkmann moved this from Reviewer Approved to Require review in Weekly Planning Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Require review

Development

Successfully merging this pull request may close these issues.

Add .copier-answers.yml file to the template

2 participants

Comments