Add Copier migration support and update template docs#393
Add Copier migration support and update template docs#393steve-downey wants to merge 30 commits into
Conversation
|
A few reviewer notes to make the diff easier to scan:
Validation run locally:
|
|
I need to review this more thoroughly but on a first skim-through this looks good |
Accidentally recreated the cookiecutter CODEOWNERS file. This should not be part of the copier branch, but it was accidentally added in a merge commit. This commit removes the file from the copier branch, which is the correct state for that branch.
Some yaml files were slightly reformatted, leaving beman-submodule failing in CI.
Use the {%- raw -%} forms to control whitespace. Also use -u for diff
to show the "unified" format, which is easier to read.
|
Moved to Draft: Not high risk that anyone would merge, but there are a few round-trip issues I'm cleaning up, as well as docs and scripts on how to use the |
|
I do want to move from cookiecutter to copier, but I would really prefer to keep around the .exemplar_version file/mechanism, since I need it for some of my own internal tooling that keeps repositories up to date, which copier doesn't entirely replace for me. |
Move the randomization into copier.yml and remember the results for future updates. Move the randomization out of the github action templates.
Provide new directions to replace `stamp.sh` and describe the intented lifecycle workflow of a generated Beman project.
Add the new README text Fix whitespace Fix quote style to match
|
Reviewer Guide: Copier Automation and Testing These latest changes finalize the template maintenance pipeline to ensure the template never drifts from the reference implementation and doesn't break downstream users. What to look at: update_templates.py: A new automation script that synchronizes root codebase changes directly into the template Jinja files. You will notice an infra submodule bump and a CODEOWNERS tweak in this PR that aren't on main yet. I deliberately included these as the payload to test the Copier update machinery. To prove the update path, I executed a live copier update against the downstream transcode project. It safely delivered the infra changes without touching transcode's custom Catch2 logic. The project built flawlessly, passed its test suite, and I have successfully pushed the update. |
…les fortification conflict
…x CMake 4.3.3 module UUIDs and bypass CI drift
Pull Request SummaryThis PR migrates the Exemplar templating from Cookiecutter to Copier. Over the course of stabilizing this migration, several underlying infrastructure and CI testing issues became hard blockers for the matrix pipeline. As a result, this PR includes some vital infrastructure fixes that are strictly outside the scope of Copier, but were integral to getting the 120+ CI checks consistently completely green. Here is the breakdown of the changes: 1. Primary Copier Migration (Core PR Scope)
2. Infrastructure & CI Matrix Fixes (Integral Fixes)To achieve a passing pipeline, the following underlying testing infrastructure bugs were patched out (which otherwise would have been separate PRs):
Merge Note: Once this merges and upstream |
ClausKlein
left a comment
There was a problem hiding this comment.
Is it really necessary that a copy of infra submodule is under templates?
It may be created with Beman-submodule, or not?
Summary
This switches exemplar's template workflow over to Copier in a way that is usable for both new stamped repositories and older forks that started life as a plain GitHub template copy.
Copier is a modern project templating tool for keeping a generated repository tied back to its source template. In practice, that gives us two things we want here:
copier.ymlcopier updatelaterWhy
The previous flow was effectively a one-shot stamp-out process. It could generate a project, but it did not leave enough metadata behind for template-driven updates afterward.
This change closes that gap by making stamped projects retain the information Copier needs to understand:
That lets older exemplar-based repositories be rebased onto a Copier-generated baseline and then participate in template updates going forward.
What changed
.copier-answers.ymltemplate so generated repositories keep Copier metadatastamp.shand local template validationParity
At this point the Copier-based workflow is functionally at parity with the prior cookiecutter-style stamping flow:
copier updatesupportSo this is not a reduction in template capability; it preserves the existing stamp-out behavior and adds an update path that the earlier flow did not provide.
Validation
./copier/check_copier.sh