You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This template provides a standardized Python project structure with sensible defaults, tailored to use in Python projects. It streamlines project setup and encourages best practices from the start.
4
15
5
-
# Prerequisites
16
+
</div>
17
+
18
+
---
19
+
20
+
## 📋 Prerequisites
6
21
7
22
The following tools must be installed:
8
-
- Python 3.9 or newer
23
+
- Python 3.10 or newer
9
24
- uv or pipx (if you want to install Copier in an isolated environment, accessible everywhere)
10
25
- copier
11
26
12
-
## Usage
27
+
## 🚀 Usage
13
28
14
29
1.**Install Copier** (if not already):
15
30
```bash
@@ -48,13 +63,13 @@ The following tools must be installed:
48
63
git commit -m "feat: Bootstrap repository from template"
49
64
```
50
65
51
-
### Answers Files Explained
66
+
### 📦 Answers Files Explained
52
67
| File | Purpose |
53
68
|------|---------|
54
69
|`.copier-answers.yml`| Auto-maintained answers file for future updates (never edit manually). Now explicitly generated because the template includes `.copier-answers.yml.jinja`. |
55
70
|`samples/config-basic.yml`| Example data file passed with `--data-file` (excluded from rendered projects). |
56
71
57
-
### Internal Template Artifacts Not Copied
72
+
### ⚙️ Internal Template Artifacts Not Copied
58
73
The template excludes helper folders (`samples/`, `my_tests/`) from generated projects via `_exclude` in `copier.yaml`. This keeps consumer projects clean.
59
74
60
75
To create a new variant template from existing data file configuration:
For advanced configuration (tasks, migrations, multiple templates) see the Copier docs sections: tasks, migrations, applying multiple templates.
65
80
66
-
## Customization
81
+
## ✏️ Customization
67
82
68
83
You can edit the template files (`*.jinja`) to fit your team's standards. See [Copier documentation](https://copier.readthedocs.io/en/stable/) for advanced templating and options.
69
84
70
-
## Testing the Template
85
+
## 🧪 Testing the Template
71
86
72
87
This template includes comprehensive validation tests to ensure generated projects meet expected standards.
73
88
74
-
### Running Tests
89
+
### ▶️ Running Tests
75
90
76
91
```bash
77
92
# Run all validation tests
78
93
make test
79
94
```
80
95
81
-
### Test Performance
96
+
### ⚡ Test Performance
82
97
83
98
Tests use session-scoped fixtures for optimal performance:
84
99
-**Session-scoped fixtures:** Generated projects created once per test session, reused across all test modules
85
100
-**Module-scoped wrappers:** Clean test API with ~50% faster execution vs module scope alone
86
101
-**All tests read-only:** No mutations to generated projects ensures fixture reuse is safe
87
102
88
-
### Test Files
103
+
### 📁 Test Files
89
104
90
105
Test files are located in `my_tests/` folder.
91
106
@@ -97,6 +112,6 @@ Test files are located in `my_tests/` folder.
97
112
98
113
See `my_tests/conftest.py` for fixture definitions.
0 commit comments