Validates Copier templates instantiated with various presets.
Project description
📋 A generic validator for Copier templates. Instantiates templates with various preset answer files (variants) and runs configurable validation commands against the generated projects.
Key Features
Configurable validation commands: Define validation commands in a TOML configuration file. The tool is agnostic about what gets validated.
Configurable answers directory: Specify where variant answer files live. No hardcoded convention imposed.
Placeholder interpolation: Use {template_directory}, {project_directory}, {temporary_directory}, and {variant} in command args and working directories.
Copier Python API: Uses copier.run_copy directly instead of shelling out to a subprocess.
Configuration hierarchy: CLI arguments, per-project config, and per-user config (via emcd-appcore) with clear precedence.
Structured error handling: Domain-specific exceptions with Markdown rendering for terminal display.
Installation 📦
Method: Install Executable Script
Install via the uv tool command:
uv tool install copiertv
or, run directly with uvx:
uvx copiertv
Or, install via pipx:
pipx install copiertv
Method: Install Python Package
Install via uv pip command:
uv pip install copiertv
Or, install via pip:
pip install copiertv
Usage
Survey Variants
List available template variants (reads answers directory from configuration):
copiertv survey
Validate a Variant
Validate a template variant:
copiertv validate default
Preserve the generated project for inspection:
copiertv validate --preserve default
Configuration File
Create .auxiliary/configuration/copiertv/general.toml in your template repository:
[answers] directory = "data/copier" [[commands]] args = ["hatch", "env", "prune"] [[commands]] args = ["hatch", "--env", "develop", "run", "make-all"] [options] preserve = false unsafe = false
Commands support placeholder interpolation for paths:
[[commands]]
args = ["make", "check", "--source", "{project_directory}"]
cwd = "{template_directory}"
Available placeholders: {template_directory}, {project_directory}, {temporary_directory}, {variant}.
Contribution 🤝
Contribution to this project is welcome! However, it must follow the code of conduct for the project.
Please file bug reports and feature requests in the issue tracker or submit pull requests to improve the source code or documentation.
For development guidance and standards, please see the development guide.
Additional Indicia
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file copiertv-1.0a0.tar.gz.
File metadata
- Download URL: copiertv-1.0a0.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
311d6d02c4d6e67c20285542910007f92588c587c1a1a82122be57626e010eb6
|
|
| MD5 |
bf71ef80fcb879ab379467c94b044e9b
|
|
| BLAKE2b-256 |
ae343d1af8fd732bc97de4b4b837028cc91004285cdb38b4e433122fafa54f32
|
Provenance
The following attestation bundles were made for copiertv-1.0a0.tar.gz:
Publisher:
releaser.yaml on emcd/copier-template-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
copiertv-1.0a0.tar.gz -
Subject digest:
311d6d02c4d6e67c20285542910007f92588c587c1a1a82122be57626e010eb6 - Sigstore transparency entry: 1810987192
- Sigstore integration time:
-
Permalink:
emcd/copier-template-validator@f35614aaab457ea4bb5f6a227631ddc64febe81c -
Branch / Tag:
refs/tags/v1.0a0 - Owner: https://github.com/emcd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
releaser.yaml@f35614aaab457ea4bb5f6a227631ddc64febe81c -
Trigger Event:
push
-
Statement type:
File details
Details for the file copiertv-1.0a0-py3-none-any.whl.
File metadata
- Download URL: copiertv-1.0a0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcdce177d931897a9767102abe12c2e40fa89f23aa5e9bbd554e394d74fc3131
|
|
| MD5 |
efe22fbc67ee318490456d7335404567
|
|
| BLAKE2b-256 |
fcaad3bf2a6146e87e9814dd70f2d7ca927face8d0056631c5e95f17328c8b49
|
Provenance
The following attestation bundles were made for copiertv-1.0a0-py3-none-any.whl:
Publisher:
releaser.yaml on emcd/copier-template-validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
copiertv-1.0a0-py3-none-any.whl -
Subject digest:
fcdce177d931897a9767102abe12c2e40fa89f23aa5e9bbd554e394d74fc3131 - Sigstore transparency entry: 1810987196
- Sigstore integration time:
-
Permalink:
emcd/copier-template-validator@f35614aaab457ea4bb5f6a227631ddc64febe81c -
Branch / Tag:
refs/tags/v1.0a0 - Owner: https://github.com/emcd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
releaser.yaml@f35614aaab457ea4bb5f6a227631ddc64febe81c -
Trigger Event:
push
-
Statement type: