-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate-config.yaml
More file actions
148 lines (136 loc) · 4.98 KB
/
template-config.yaml
File metadata and controls
148 lines (136 loc) · 4.98 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# 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: python-project-template
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 = "python-project-template"'
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/python-project-template"
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
# Version: set to 0.1.YYYYMMDD using today's date (agent action, not text substitution)
README.md:
- old: "nullhack"
new: "{github_username}"
count: many
- old: "python-project-template"
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
Dockerfile:
- old: "# Simplified Dockerfile for python-project-template"
new: "# Simplified Dockerfile for {project_name}"
count: 1
- old: "CMD python -m app || exit 1"
new: "CMD python -m {package_name} || exit 1"
count: 1
- old: 'CMD ["python", "-m", "app"]'
new: 'CMD ["python", "-m", "{package_name}"]'
count: 1
- old: 'LABEL maintainer="eol"'
new: 'LABEL maintainer="{author_name}"'
count: 1
- old: '"Python template with some awesome tools to quickstart any Python project"'
new: '"{project_description}"'
count: 1
- old: "https://github.com/nullhack/python-project-template"
new: "https://github.com/{github_username}/{project_name}"
count: 1
docker-compose.yml:
- old: "# Docker Compose for python-project-template"
new: "# Docker Compose for {project_name}"
count: 1
- old: "./app:/app/app"
new: "./{package_name}:/app/{package_name}"
count: 1
- old: "python -m app"
new: "python -m {package_name}"
count: 1
- old: "./app:/app/app:ro"
new: "./{package_name}:/app/{package_name}:ro"
count: 1
.dockerignore:
- old: "# Docker ignore file for python-project-template"
new: "# Docker ignore file for {project_name}"
count: 1
docs/index.html:
- 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/app_test.py:
- old: "from app.__main__ import"
new: "from {package_name}.__main__ import"
count: 1
template-config.yaml:
- old: "github_username: nullhack"
new: "github_username: {github_username}"
count: 1
- old: "project_name: python-project-template"
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