Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0
v2.1.0
2 changes: 1 addition & 1 deletion copier.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion template/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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.