-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yml
More file actions
223 lines (197 loc) · 4.79 KB
/
copier.yml
File metadata and controls
223 lines (197 loc) · 4.79 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
_envops:
trim_blocks: true
_subdirectory: "template"
project_name:
help: "Project name"
type: "str"
placeholder: "Lorem Ipsum"
validator: >
{%- if not project_name -%}
You must provide a project name.
{%- endif -%}
project_slug:
when: false
default: "{{ project_name | lower | replace(' ', '-') | replace('_', '-') }}"
project_type:
help: "Project type"
type: "str"
choices:
- "application"
- "library"
- "bare"
build_system:
when: "{{ project_type == 'library' }}"
help: "Build system"
type: "str"
choices:
- "uv"
- "hatchling"
- "maturin"
default: "uv"
project_description:
help: "Project description"
type: "str"
placeholder: "Lorem ipsum dolor sit amet."
validator: >
{%- if not project_description -%}
You must provide a project description.
{%- elif project_description[-1] not in ".!?…" -%}
The project description must end with a punctuation mark.
{%- endif -%}
user_name:
help: "Your full name"
type: "str"
placeholder: "John Doe"
validator: >
{%- if not user_name -%}
You must provide your full name.
{%- endif -%}
user_email:
help: "Your email"
type: "str"
placeholder: "john@doe.tld"
validator: >
{%- if not user_email | regex_search('^[^\s@]+@[^\s@]+\.[^\s@]+$') -%}
You must provide a valid email address.
{%- endif -%}
license:
help: "Project license"
type: "str"
choices:
- "MIT"
- "Proprietary"
default: "Proprietary"
copyright_holder:
help: "Name of the person or entity holding the copyright"
type: "str"
default: "{{ user_name }}"
validator: >
{%- if not copyright_holder -%}
You must provide a copyright holder.
{%- endif -%}
copyright_year:
help: "Copyright year"
type: "int"
default: 2026
validator: >
{%- if not 2020 <= copyright_year <= 2100 -%}
You must provide a valid year between 2020 and 2100.
{%- endif -%}
package_name:
when: "{{ project_type != 'bare' }}"
help: "Python package name e.g. on PyPI (dashes are recommended over underscores)"
type: "str"
default: "{{ project_slug }}"
validator: >
{%- if not package_name | regex_search('^[a-z][a-z0-9]+([-_][a-z0-9]+)*$') -%}
You must provide a valid Python package name.
{%- endif -%}
module_name:
when: false
default: "{{ package_name | replace('-', '_') }}"
script_name:
when: "{{ project_type == 'application' }}"
help: "Python script name"
type: "str"
default: "{{ package_name }}"
validator: >
{%- if project_type == 'application' and not script_name -%}
You must provide a name for the Python script.
{%- endif -%}
python_version:
help: "Minimum Python version"
type: "str"
default: "3.13"
validator: >
{%- if not python_version | regex_search('^3\\.\\d{1,2}$') -%}
The Python version must be in the format "3.x".
{%- endif -%}
python_version_info:
when: false
type: "json"
default: "[{{ python_version.split('.')[0] | int }}, {{ python_version.split('.')[1] | int }}]"
type_checker:
help: "Type checker"
type: "str"
choices:
- "mypy"
- "ty"
default: "mypy"
test_runner:
help: "Test runner"
type: "str"
choices:
- "pytest"
- "none"
default: >
{%- if project_type == 'bare' -%}
none
{%- else -%}
pytest
{%- endif -%}
doc_generator:
when: "{{ project_type != 'bare' }}"
help: "Documentation generator"
type: "str"
choices:
- "sphinx"
- "none"
default: >
{%- if project_type == 'library' -%}
sphinx
{%- else -%}
none
{%- endif -%}
vulnerability_scanner:
help: "Vulnerability scanner"
type: "str"
choices:
- "pip-audit"
- "pysentry"
default: "pip-audit"
forge:
help: "Code hosting platform for the project"
type: "str"
choices:
- "none"
- "github"
github_user:
when: "{{ forge == 'github' }}"
help: "GitHub account (username or organization)"
type: "str"
placeholder: "jdoe"
validator: >
{%- if not github_user -%}
You must provide a GitHub account.
{%- endif -%}
github_repo:
when: "{{ forge == 'github' }}"
help: "Name of the GitHub repository"
type: "str"
default: >
{%- if project_type == 'library' -%}
python-{{ project_slug }}
{%- else -%}
{{ project_slug }}
{%- endif -%}
validator: >
{%- if not github_repo -%}
You must provide a repository name.
{%- endif -%}
repo_url:
when: false
default: >
{%- if forge == 'github' -%}
https://github.com/{{ github_user }}/{{ github_repo }}
{%- endif -%}
github_pages:
when: "{{ forge == 'github' and doc_generator != 'none' }}"
help: "Enable GitHub Pages"
type: "bool"
default: "{{ forge == 'github' and doc_generator != 'none' }}"
pages_url:
when: false
default: >
{%- if github_pages -%}
https://{{ github_user }}.github.io/{{ github_repo }}
{%- endif -%}