-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
293 lines (255 loc) · 7.21 KB
/
copier.yaml
File metadata and controls
293 lines (255 loc) · 7.21 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
_subdirectory: template
_jinja_extensions:
- copier_templates_extensions.TemplateExtensionLoader
- extensions.py:GitExtension
- extensions.py:CurrentYearExtension
- extensions.py:UserUIDGUIDExtension
_tasks:
- "git init"
- "mkdir scripts"
- "mise trust"
- "make setup-dev"
- >-
for i in $(seq 1 5); do
git add -A &&
pre-commit run -a && break ||
if [ $i -eq 5 ]; then echo 'pre-commit hooks did not converge after 5 attempts — run "pre-commit run -a" manually to debug'; exit 0; fi;
done
- >-
{% if repository_provider == 'github' %}
echo '' &&
echo '========================================================' &&
echo ' ACTION REQUIRED: Set up the following repo secrets' &&
echo '========================================================' &&
echo '' &&
echo ' - GIPHY_API_KEY : needed for PR thank-you comments' &&
{% if dependency_updater == 'renovate' and renovate_auth_method == 'pat' %}
echo ' - RENOVATE_TOKEN : needed for self-hosted Renovate' &&
{% elif dependency_updater == 'renovate' and renovate_auth_method == 'github_app' %}
echo ' - RENOVATE_APP_ID : needed for self-hosted Renovate' &&
echo ' - RENOVATE_APP_PRIVATE_KEY: needed for self-hosted Renovate' &&
{% endif %}
echo '' &&
echo ' Run "gh secret set <SECRET_NAME>" or see README.md' &&
echo ' for full setup instructions.' &&
echo ''
{% else %}
true
{% endif %}
project_name:
type: str
help: What is your project name?
default: "{{ _folder_name }}"
validator: >-
{% if not (project_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
Project name must start with a letter, followed by one or more letters,
digits or dashes all lowercase.
{% endif %}
project_slug:
type: str
default: "{{ project_name.replace('-', '_') }}"
when: false
project_description:
type: str
help: Your project description
project_keywords:
default: "python,{{ project_name | lower }}"
type: str
help: "Provide a list of comma-separated keywords to be using in the Python package overview:"
author_fullname:
type: str
help: Your full name
default: "{{ 'Bassem Karoui' | git_user_name }}"
author_email:
type: str
help: Your email
default: "{{ 'bassem.karoui1@gmail.com' | git_user_email }}"
repository_provider:
type: str
help: Your repository provider
default: github
choices:
- github
- other
author_github_handle:
when: "{{ repository_provider == 'github' }}"
type: str
help: Your Github handle
default: "{{ author_fullname | lower | replace(' ', '')}}"
homepage:
when: "{{ repository_provider == 'github' }}"
type: str
help: "The project Homepage"
default: >-
{% if repository_provider == 'github' -%}
https://{{ author_github_handle }}.github.io/{{ project_name }}
{%- endif %}
repository:
when: "{{ repository_provider == 'github' }}"
type: str
help: "The project Repository"
default: >-
{% if repository_provider == 'github' -%}
https://github.com/{{ author_github_handle }}/{{ project_name }}
{%- endif %}
documentation:
when: "{{ repository_provider == 'github' }}"
type: str
help: "The project Documentation"
default: >-
{% if repository_provider == 'github' -%}
https://{{ author_github_handle }}.github.io/{{ project_name }}
{%- endif %}
dependency_updater:
type: str
when: "{{ repository_provider == 'github' }}"
help: Which dependency update tool do you want to use?
default: renovate
choices:
- none
- dependabot
- renovate
renovate_auth_method:
type: str
when: "{{ repository_provider == 'github' and dependency_updater == 'renovate' }}"
help: Which authentication method do you want to use for self-hosted Renovate?
default: pat
choices:
- pat
- github_app
copyright_license:
type: str
help: Choose the project's license (e.g. "MIT", "GPL-3.0").
default: MIT License
choices:
- No License
- Apache Software License
- BSD 3-clause License
- Boost Software License 1.0 (BSL-1.0)
- GNU General Public License v3 (GPLv3)
- ISC License
- MIT License
- The Unlicense (Unlicense)
copyright_holder:
type: str
help: Name or organization holding the copyright
default: "{{ author_fullname }}"
when: "{{ copyright_license != 'No License' }}"
copyright_year:
when: false
type: str
default: "{{ current_year }}"
python_version:
type: str
help: "Choose the default Python version for development, documentation generation, and package build:"
default: "3.12"
choices:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
min_python_version:
type: str
help: "Choose the minimum Python version the project should support:"
default: "3.10"
choices: |
{%- if python_version|float >= 3.10 %}
- "3.10"
{%- endif %}
{% if python_version|float >= 3.11 %}
- "3.11"
{%- endif %}
{% if python_version|float >= 3.12 %}
- "3.12"
{%- endif %}
{% if python_version|float >= 3.13 %}
- "3.13"
{%- endif %}
py_versions:
default: ["3.10", "3.11", "3.12", "3.13"]
when: false
with_typer_cli:
type: bool
help: Does your project need a Typer CLI?
default: false
cli_name:
type: str
when: "{{ with_typer_cli }}"
help: Set the CLI's name
default: "{{ project_name }}"
validator: >-
{% if not (cli_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
The CLI's name must start with a letter, followed by one or more letters,
digits or dashes all lowercase.
{% endif %}
with_strict_typing:
type: bool
help: Do you want to use strict typing?
default: false
with_settings:
type: bool
help: Do you want Pydantic Settings for typed configuration management?
default: true
with_doppler:
type: bool
help: Do you want Doppler integration for secrets management?
default: false
doppler_project:
type: str
when: "{{ with_doppler }}"
help: "Your Doppler project name:"
default: "{{ project_name }}"
tox:
type: bool
default: true
help: Do you want to use Tox?
pytest_xdist:
type: bool
default: false
help: Do you want to use pytest-xdist?
coverage_threshold:
type: int
default: 100
help: "Set the threshold for test coverage, ranging from 0 to 100:"
validator: "{% if not 0 <= coverage_threshold <= 100 %}Test Coverage threshold should be between 0 and 100{% endif %}"
with_conventional_commits:
type: bool
help: >-
Do you want to follow the Conventional Commits standard (https://www.conventionalcommits.org)
for your commit messages?
default: true
cz_gitmoji:
type: bool
help: Do you want to use emojis for your commits?
default: true
when: "{{ with_conventional_commits }}"
gpg_sign_tags:
type: bool
default: "{{ false | are_tags_gpg_signed }}"
when: false
publish_to_pypi:
type: bool
default: false
help: Do you want to publish a release to PyPI?
dockerfile:
type: bool
default: true
help: Do you need a Dockerfile?
privileged_container:
type: bool
when: "{{ dockerfile }}"
default: false
help: Do you want your container to have root access?
uid:
type: int
when: false
default: "{{ uid }}"
gid:
type: int
when: false
default: "{{ gid }}"
gpus:
type: bool
when: "{{ dockerfile }}"
help: Do you need GPU capabilities for you containers?
default: false