Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.62 KB

File metadata and controls

45 lines (32 loc) · 1.62 KB

Migrating from Cookiecutter

This repository switched from Cookiecutter to Copier for new projects. Copier records template answers and the source revision in .github/.copier-answers.yaml, which allows generated projects to receive future template updates.

New projects

Generate new projects with Copier:

uv tool run copier copy gh:juftin/cookiecutter-python my-project

Commit the generated .github/.copier-answers.yaml file with the rest of the project. It is required for Copier to discover the template and retain the answers used to create the project.

After the project is committed to Git, start from a clean worktree and apply later template releases with:

copier update --answers-file .github/.copier-answers.yaml

Review any conflicts before committing the update.

Existing Cookiecutter projects

Projects generated by Cookiecutter remain valid standalone projects, but they cannot be updated with Copier. Cookiecutter did not create the metadata that identifies a template revision and records the generation answers.

Do not create .github/.copier-answers.yaml manually in an existing project. Instead, generate a new Copier project in a temporary directory, compare it with the existing project, and port the changes you want to adopt. This keeps the project's application code and local customizations under your control.

Template releases

The first Copier release establishes the baseline for Copier-managed projects. It does not retroactively migrate Cookiecutter projects. Future changes to the template can use Copier's update workflow for projects created from that release or later.