Contributing¶
Development Setup¶
Clone the repository and install dependencies:
Running Tests¶
The template includes a test suite that generates a project from the template and verifies it:
To run linting and type checks:
Auto-fix lint and format issues:
Building the Documentation¶
This serves the docs locally at http://127.0.0.1:8000/.
Modifying the Template¶
Template files live in the template/ directory. Copier uses Jinja2 for templating.
Key files:
copier.yml— Template prompts and configurationextensions.py— Custom Jinja2 extensions (slugify, git config, etc.)template/— The generated project skeleton
Conditional files¶
Files or directories can be conditionally included using Jinja2 expressions in the filename:
template/{% if include_docs %}mkdocs.yml{% endif %}.jinja
template/{% if include_docker %}Dockerfile{% endif %}.jinja
Testing your changes¶
After modifying the template, run the test suite to make sure generated projects are still valid:
You can also generate a test project manually: