-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
203 lines (175 loc) · 5.14 KB
/
copier.yaml
File metadata and controls
203 lines (175 loc) · 5.14 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
_min_copier_version: '9'
_preserve_symlinks: true
_skip_if_exists:
- CHANGELOG.md
_subdirectory: template
_message_after_copy: |
{{ _copier_conf.dst_path }} is ready! Next steps:
1. Create GitHub repository:
https://github.com/new?owner={{ github_user }}&name={{ project_name }}
2. Initialize git and environment:
uv run poe init
3. Push:
{%- if project_visibility == 'private' %}
git remote add origin <repo-url>
{%- endif %}
git push -u origin main
{%- if project_visibility == 'public' %}
For GitHub repository configuration and additional features setup,
see copier-python's Completing Setup documentation at
https://smkent.github.io/copier-python/project-setup/
{%- if enable_docs %}
OR run the documentation site locally:
uv run poe docs
Then, see One Time Setup at: http://localhost:8000/{{ project_name }}/setup/
{%- endif %}
{%- endif %}
_message_after_update: |
Template update applied. Before committing:
git diff # review all changes
uv run poe lint # verify code quality
uv run poe test # verify tests pass
project_name:
type: str
qmark: 📝
help: Project (repository) name
default: '{{ _folder_name }}'
validator: |
{%- if not project_name -%}
Required
{%- elif project_name | lower | regex_replace('^([a-z0-9]|[a-z0-9][a-z0-9._-]*[a-z0-9])$','') != '' -%}
Python package distribution name must only contain letters, numbers, or . - _
{%- endif -%}
project_slug:
type: str
qmark: 🐍
default: "{{ project_name | title | lower | regex_replace('[^a-za-z0-9]','_') | regex_replace('_{2,}', '_') | trim('_') }}"
help: Python module import name (slug)
validator: |
{%- if not project_slug -%}
Required
{%- elif project_slug | lower | regex_replace('^[a-z_][a-z0-9_]*$','') != '' -%}
Python package import name must only contain letters, numbers, or underscores
{%- endif -%}
project_description:
type: str
qmark: 💬
help: One-line project summary
validator: '{% if not project_description %}Required{% endif %}'
project_type:
type: str
qmark: 🏗️
help: Project type
default: library
choices:
- application
- library
project_visibility:
type: str
qmark: 🔒
help: Project visibility
default: public
choices:
- public
- private
python_version_minimum:
type: str
qmark: 🐍
help: Minimum Python version
default: '3.10'
choices:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- '3.14'
python_version_maximum:
type: str
qmark: 🐍
help: Maximum Python version
default: No maximum
choices: |
- 'No maximum'
{%- set min_minor = python_version_minimum.split(".")[1] | int -%}
{%- for minor in range(min_minor, 15) %}
- '3.{{ minor }}'
{%- endfor %}
enable_coverage:
type: bool
qmark: 📊
help: Enable coverage.io reports?
default: "{{ project_visibility == 'public' }}"
when: "{{ project_visibility == 'public' }}"
enable_pypi:
type: bool
qmark: 🚀
help: Enable package publishing to PyPI?
default: "{{ project_visibility == 'public' }}"
when: "{{ project_visibility == 'public' }}"
enable_container:
type: bool
qmark: 📦
help: Enable Docker container{% if project_visibility == 'public' %} build and publishing to ghcr.io{% endif %}?
default: "{{ project_type == 'application' }}"
enable_docs:
type: bool
qmark: 📕
help: Enable documentation site (Zensical{% if project_visibility == 'public' %} with deployment to GitHub Pages{% endif %})?
default: yes
user_name:
type: str
qmark: 🧑
help: Author's full name
validator: '{% if not user_name %}Required{% endif %}'
user_email:
type: str
qmark: ✉️
help: Author's email address
validator: '{% if not user_email %}Required{% endif %}'
github_user:
type: str
qmark: 👾
help: GitHub user or organization name
when: "{{ project_visibility == 'public' }}"
validator: '{% if not github_user %}Required{% endif %}'
copyright_holder:
type: str
qmark: ©️
help: Copyright holder's full name
default: '{{ user_name }}'
copyright_holder_email:
type: str
qmark: ✉️
help: Copyright holder's email address
default: '{{ user_email }}'
copyright_year:
type: str
qmark: 📅
help: The copyright year (e.g. 2026)
validator: |
{%- if not copyright_year -%}
Required
{%- elif copyright_year | regex_replace('^[0-9]{4}$','') != '' -%}
Invalid year
{%- endif -%}
copyright_license:
type: str
qmark: ⚖️
help: Project license
default: "{% if project_type == 'library' %}L{% endif %}GPL-3.0"
choices:
Apache License 2.0: Apache-2.0
BSD 3-Clause "New" or "Revised" License: BSD-3-Clause
Creative Commons Attribution 4.0 International: CC-BY-4.0
Creative Commons Attribution Share Alike 4.0 International: CC-BY-SA-4.0
Creative Commons Zero v1.0 Universal: CC0-1.0
GNU Affero General Public License v3.0: AGPL-3.0
GNU General Public License v3.0 only: GPL-3.0
GNU Lesser General Public License v3.0 only: LGPL-3.0
ISC License: ISC
MIT License: MIT
template_attribution:
type: bool
qmark: 🪧
help: Add copier-python attribution to README.md?
default: no