-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yml
More file actions
152 lines (133 loc) · 4.2 KB
/
copier.yml
File metadata and controls
152 lines (133 loc) · 4.2 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
# CONFIGURATION --------------------------
_min_copier_version: "9"
_subdirectory: template
_templates_suffix: jinja
_jinja_extensions:
- copier_templates_extensions.TemplateExtensionLoader
- extensions.py:TemplateDefaultExtension
_message_before_copy: |
Thanks for generating a project with the numpy template.
You will be asked a series of questions to generate a
tailored project for you.
_message_after_copy: |
Your project "{{ project_name }}" has been created successfully!
_message_before_update: |
Thanks for updating your project using the numpy template.
You will be asked a series of questions whose answers are
pre-populated with previously entered values. Feel free to
change them as needed.
_message_after_update: |
Your project "{{ project_name }}" has been updated successfully!
In case there are any conflicts, please resolve them.
# POST COPY TASKS (only on init)-------------------------
_tasks:
- command:
- 'powershell'
- '-command'
- >
$tempFilePath = [System.IO.Path]::GetTempFileName() + ".py";
Invoke-WebRequest -Uri https://raw.githubusercontent.com/eckelsjd/copier-numpy/{{ _copier_conf.vcs_ref_hash }}/setup_github.py -OutFile $tempFilePath;
{{ python_manager }} run {% if python_manager == 'uv' %}--no-project{% endif %} python $tempFilePath;
Remove-Item $tempFilePath;
when: "{{ _copier_conf.os == 'windows' and init_github and _copier_operation == 'copy' and (python_manager | manager_exists) }}"
- command: >
export temp_file=$(mktemp).py;
curl -sSL https://raw.githubusercontent.com/eckelsjd/copier-numpy/{{ _copier_conf.vcs_ref_hash }}/setup_github.py --output "$temp_file";
{{ python_manager }} {% if python_manager == 'uv' %}--no-project{% endif %} run python "$temp_file";
rm "$temp_file";
when: "{{ _copier_conf.os in ['linux', 'macos'] and init_github and _copier_operation == 'copy' and (python_manager | manager_exists) }}"
# PROMPT ---------------------------------
project_name:
type: str
help: "Enter your project name:"
default: "{{ _folder_name }}"
project_description:
type: str
help: "Enter a project description:"
python_manager:
type: str
help: "Which Python project manager do you prefer?"
default: uv
choices:
- uv
- pdm
user_name:
type: str
help: "Enter your full name:"
default: "{{ git_user_name }}"
user_email:
type: str
help: "Enter your email:"
default: "{{ git_user_email }}"
repository_namespace:
type: str
help: "Enter your repository namespace (e.g. your username/org on GitHub):"
default: "{{ github_user }}"
is_distributable:
type: bool
help: "Is this a Python library?"
default: false
distribution_name:
type: str
help: "Your Python package distribution name (for `pip install NAME`):"
default: "{{ project_name | slugify }}"
when: "{{ is_distributable }}"
import_name:
type: str
help: "Your Python package import name (for `import NAME`):"
default: "{{ project_name | slugify('_') }}"
when: "{{ is_distributable }}"
copyright_license:
type: str
help: "Choose a license:"
default: "MIT"
choices:
- AFL-3.0
- Apache-2.0
- Artistic-2.0
- BSD-2-Clause
- BSD-3-Clause
- BSD-4-Clause
- BSL-1.0
- CC-BY-4.0
- WTFPL
- ECL-2.0
- EPL-2.0
- EUPL-1.1
- AGPL-3.0
- GPL-2.0
- GPL-3.0
- LGPL-2.1
- LGPL-3.0
- ISC
- LPPL-1.3c
- MS-PL
- MIT
- OSL-3.0
- Unlicense
- Zlib
requires_python:
type: str
help: "Enter a specifier string for supported Python versions:"
default: ">=3.11"
python_version: # Pretty version string variable (e.g. 3.11+)
type: str
default: "{{ requires_python | format_python_version }}"
when: false
include_docs:
type: bool
help: "Do you want to include documentation for your project?"
default: false
init_github:
type: bool
help: "Do you want to include git version control and connect with GitHub?"
default: true
include_cicd:
type: bool
help: "Do you want to include GitHub actions (i.e. CI/CD workflows)?"
default: false
when: "{{ init_github }}"
install_jupyter:
type: bool
help: "Do you want to install JupyterLab in your project?"
default: false