-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copier.yml
124 lines (106 loc) · 3.22 KB
/
copier.yml
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
---
# questions
author_name:
type: str
help: "Full name of the Author"
placeholder: "John Doe"
author_email:
type: str
help: "E-mail of the Author"
placeholder: "[email protected]"
github_username:
type: str
help: "GitHub Username"
project_name:
type: str
help: "Project Name (human readable version)"
placeholder: "Python Package"
project_slug:
type: str
help: "Project slug (used for GitHub, PyPI, etc.)"
default: "{{ project_name.lower().replace(' ', '-') }}"
package_name:
type: str
help: "The name of the main Python package (should be a valid Python identifier)"
default: "{{ project_slug.replace('-', '_') }}"
project_short_description:
type: str
help: "A short description of the project"
placeholder: "A super helpful small Python package."
software_license:
type: str
help: Your project's license?
default: MIT License
choices:
- Apache License 2.0
- Eclipse Public License 2.0
- GNU General Public License v3.0
- GNU Lesser General Public License v3.0
- ISC License
- MIT License
- Mozilla Public License 2.0
# GitHub Sponsors - question
github_sponsors:
type: bool
help: "Use GitHub Sponsors?"
default: true
# Ko-fi sponsor - question
kofi_funding:
type: bool
help: "Use Ko-fi?"
default: true
# Ko-fi username - input
kofi_username:
type: str
help: "Ko-fi username"
when: "{{ kofi_funding == true }}"
# Tweet on release - question
tweet_on_release:
type: bool
help: "Sending tweets on release?"
default: true
# Twitter username - input
twitter_username:
type: str
help: "Twitter username (without @)"
when: "{{ tweet_on_release == true }}"
# Poetry install - question
run_poetry_install:
type: bool
help: "Run poetry install after {{ package_name }} generation?"
default: true
# Initial commit - question
initial_commit:
type: bool
help: "Create an initial commit with the generated {{ package_name }}?"
when: "{{ run_poetry_install == true }}"
default: false
# Pre-commit hooks - question
setup_pre_commit:
type: bool
help: "Setup pre-commit hooks (requires pre-commit)?"
when: "{{ run_poetry_install == true }}"
default: false
# =====================================
# | Copier settings for this template |
# =====================================
_min_copier_version: "9.1.0"
# The template root is found here
_subdirectory: template
_templates_suffix: .j2
_message_after_copy: Your package "{{ package_name }}" has been created successfully!
_tasks:
# Remove Github Sponsor line from FUNDING.yml
- "{% if not github_sponsors %}sed -i '' '/github:/d' .github/FUNDING.yml{% endif %}"
# Remove Ko-fi line from FUNDING.yml
- "{% if not kofi_funding %}sed -i '' '/ko_fi:/d' .github/FUNDING.yml{% endif %}"
# Remove FUNDING.yml if neither GitHub Sponsor nor Ko-fi is chosen
- "{% if not github_sponsors and not kofi_funding %}rm -f .github/FUNDING.yml{% endif %}"
# Run poetry install
- "{% if run_poetry_install %}poetry install{% endif %}"
# Initial commit
- "{% if initial_commit %}git init{% endif %}"
- "{% if initial_commit %}git add .{% endif %}"
- "{% if initial_commit %}git commit -m 'project - initial commit'{% endif %}"
# Setup pre-commit
- "{% if setup_pre_commit %}pre-commit install{% endif %}"