From 5c42e17d1ccfe748a6bdf32fed7164e3211c697d Mon Sep 17 00:00:00 2001 From: Night Date: Sun, 25 Oct 2026 03:07:14 +1100 Subject: [PATCH 1/3] feat: answers file sits at the project root * generated projects keep their Copier answers in .copier-py-answers.yml at the root * replaces the old .copier-generic-project/ folder * the README's copier update command points at the new file --- copier.yml | 2 +- template/README.md.jinja | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/copier.yml b/copier.yml index 86c0c59..46e29cd 100644 --- a/copier.yml +++ b/copier.yml @@ -1,7 +1,7 @@ _min_copier_version: "9.10.0" _subdirectory: template -_answers_file: .copier-generic-project/.copier-py-answers.yml +_answers_file: .copier-py-answers.yml # the project owns these once created _skip_if_exists: diff --git a/template/README.md.jinja b/template/README.md.jinja index 678c197..35c4205 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -61,7 +61,7 @@ $ make format-dry-run # list files that need formatting The project uses [Copier](https://copier.readthedocs.io/en/stable/) to manage its template. When the template is updated, the project can be easily brought up to date by running the following command from the project root: ```bash -$ copier update --defaults --answers-file .copier-answers.yml +$ copier update --defaults --answers-file .copier-py-answers.yml ``` When the `--defaults` option is used, copier update skips all previously answered questions and prompts only for newly introduced ones. From cae983e29f795849e5c583a0f2c27a270069d6cf Mon Sep 17 00:00:00 2001 From: Night Date: Sun, 25 Oct 2026 03:11:57 +1100 Subject: [PATCH 2/3] chore: version v2.1.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 46b105a..1defe53 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.0 +v2.1.0 From fd0be2f7a43675822ba05f00ca301251735d7a2b Mon Sep 17 00:00:00 2001 From: Night Date: Sun, 25 Oct 2026 03:08:17 +1100 Subject: [PATCH 3/3] docs: readme and changelog for feature/root-answers-file --- CHANGELOG.md | 1 + README.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 162f367..17d7f23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,3 +8,4 @@ * feature/run-script: generated projects ship a run.sh for building, formatting with ruff, testing with pytest and building a wheel and sdist, with starter tests and ruff-clean code. * feature/github-ci: generated projects ship the shared GitHub CI, a VERSION file and the shared Renovate settings, which copier update leaves alone. * feature/makefile: generated projects ship a Makefile with build, format, format-dry-run, test and release targets in place of run.sh, with make in the dev container and the shared CI calling make. +* feature/root-answers-file: generated projects keep their Copier answers in `.copier-py-answers.yml` at the root rather than in `.copier-generic-project/`; existing projects move the file once before their next update. diff --git a/README.md b/README.md index d8cc428..fc1c42b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,21 @@ defaults: +### Updating a Project + +Generated projects keep their Copier answers in `.copier-py-answers.yml` at the project root. From there: + +```bash +$ copier update --defaults --answers-file .copier-py-answers.yml +``` + +Projects generated before the answers file moved keep it in `.copier-generic-project/`. Move it once before updating: + +```bash +$ git mv .copier-generic-project/.copier-py-answers.yml .copier-py-answers.yml +``` + + ### Versioning and CI The template's release version lives in `VERSION` as `vX.Y.Z`. Bump it in every change that should be released: