-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate-config.yaml
More file actions
113 lines (104 loc) · 3.89 KB
/
template-config.yaml
File metadata and controls
113 lines (104 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Template configuration — single source of truth for project setup.
# Read by the setup-project agent. The "defaults" section reflects the current
# template values. The "substitutions" section maps every literal string in every
# template file to its replacement pattern, using {variable} tokens.
#
# After running @setup-project the defaults section is updated with the values
# the user provided.
#
# Parameter descriptions:
# github_username — GitHub handle used in URLs and git remote
# project_name — kebab-case repository name (e.g. my-awesome-project)
# package_name — snake_case Python package directory (e.g. my_awesome_project)
# project_description — one sentence describing what the project does
# author_name — author's full name
# author_email — author's email address
defaults:
github_username: nullhack
project_name: temple8
package_name: app
project_description: "Python template with some awesome tools to quickstart any Python project"
author_name: eol
author_email: nullhack@users.noreply.github.com
# Substitution map — every file the setup agent must edit.
# Each entry has:
# old: literal string currently in the file
# new: replacement string with {variable} tokens
# count: expected number of replacements (for agent verification)
substitutions:
pyproject.toml:
- old: 'name = "temple8"'
new: 'name = "{project_name}"'
count: 1
- old: '"Python template with some awesome tools to quickstart any Python project"'
new: '"{project_description}"'
count: 1
- old: '{ name = "eol", email = "nullhack@users.noreply.github.com" }'
new: '{{ name = "{author_name}", email = "{author_email}" }}'
count: 2
- old: "https://github.com/nullhack/temple8"
new: "https://github.com/{github_username}/{project_name}"
count: 2
- old: 'packages = ["app"]'
new: 'packages = ["{package_name}"]'
count: 1
- old: "python -m app"
new: "python -m {package_name}"
count: 1
- old: "--cov=app"
new: "--cov={package_name}"
count: 2
- old: "pdoc ./app"
new: "pdoc ./{package_name}"
count: 2
- old: 'version = "8.0.0"'
new: 'version = "0.1.0"'
count: 1
# Version: set to 0.1.0 in pyproject.toml (pure semver, no date — see [[software-craft/versioning]])
README.md:
- old: "nullhack"
new: "{github_username}"
count: many
- old: "temple8"
new: "{project_name}"
count: many
- old: "eol"
new: "{author_name}"
count: 1
note: "only the author credit line — do not replace occurrences in other contexts"
.github/workflows/ci.yml:
- old: "import app"
new: "import {package_name}"
count: 2
- old: 'href="api/app.html"'
new: 'href="api/{package_name}.html"'
count: 1
LICENSE:
- old: "Copyright (c) 2026, eol"
new: "Copyright (c) 2026, {author_name}"
count: 1
tests/unit/main_test.py:
- old: "from app.__main__ import"
new: "from {package_name}.__main__ import"
count: 1
CHANGELOG.md:
note: "Overwrite entire file from .templates/CHANGELOG.md.template, replacing {project_name} and {YYYYMMDD} tokens. No find-replace substitutions — the template replaces all content."
template-config.yaml:
- old: "github_username: nullhack"
new: "github_username: {github_username}"
count: 1
- old: "project_name: temple8"
new: "project_name: {project_name}"
count: 1
- old: "package_name: app"
new: "package_name: {package_name}"
count: 1
- old: '"Python template with some awesome tools to quickstart any Python project"'
new: '"{project_description}"'
count: 1
- old: "author_name: eol"
new: "author_name: {author_name}"
count: 1
- old: "author_email: nullhack@users.noreply.github.com"
new: "author_email: {author_email}"
count: 1