-
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) · 3.89 KB
/
copier.yml
File metadata and controls
152 lines (133 loc) · 3.89 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
_min_copier_version: 9.5.0
_subdirectory: project_name
user_name:
type: str
help: Your full name. It is used in the copyright notice and PyPI metadata.
validator: >-
{% if not user_name %}
You must provide a name.
{% endif %}
user_email:
type: str
help: Your email address. It is used in PyPI metadata.
validator: >-
{% if not (user_email | regex_search('^[^@]+@[^@]+\.[^@]+$')) %}
Not a valid email.
{% endif %}
github_user:
type: str
help: Your GitHub username (or organization).
default: >-
{{ user_email.split('@')[0]}}
validator: >-
{% if not (github_user | regex_search('^[a-zA-Z0-9\-]+$')) %}
Can only contain alphanumeric characters and dashes.
{% endif %}
project_name:
type: str
help: The repo name. Probably equal to the destination dirname
default: >-
{{ _folder_name }}
validator: >-
{% if not (project_name | regex_search('^[A-Za-z][A-Za-z0-9\-]+$')) %}
Must start with a letter, followed one or more letters, digits or dashes.
{% endif %}
package_name:
type: str
help: The package name. Must be a valid identifier.
default: >-
{{ project_name | lower | replace("-", "_") }}
validator: >-
{% if not (package_name | regex_search('^[a-z][a-z0-9_]+$')) %}
Must start with a letter, followed one or more letters, digits or underscores
all lowercase.
{% endif %}
package_description:
type: str
help: A one-line summary of what the package does.
placeholder: Why fit in when you were born to stand out?
validator: >-
{% if package_description | length > 80 %}
Must be up to 80 characters long
{% endif %}
{% if package_description[-1] != '.' %}
Must end with a period
{% endif %}
license:
type: str
help: Choose a license, see https://choosealicense.com/ for help
default: MIT
choices:
Proprietary - see https://choosealicense.com/no-permission/: Proprietary
AGPL-3.0-or-later - Copyleft: AGPL-3.0-or-later
GPL-3.0-or-later - Copyleft: GPL-3.0-or-later
LGPL-3.0-or-later - Copyleft: LGPL-3.0-or-later
MPL-2.0 - Copyleft: MPL-2.0
Apache-2.0 - Permissive: Apache-2.0
MIT - Permissive: MIT
BSL-1.0 - Permissive: BSL-1.0
Unlicense - Permissive: Unlicense
year:
type: int
help: The current year, for the copyright clause
default: "{{ '%Y' | strftime }}"
validator: >-
{% if year <= 0 %}Must be positive{% endif %}
{% if year <= 999 %}Must be 4 digits{% endif %}
{% if year > 9999 %}Must be 4 digits{% endif %}
python_min:
type: int
help: Minimal minor version of Python, i.e '14' for 3.14
default: 10
validator: >-
{% if python_min < 8 %}Must be >= 8{% endif %}
python_max:
type: int
default: 14
when: false
get_package_version_from_vcs:
type: bool
help: Use the version control system for versioning?
default: true
cli_framework:
type: str
help: Which CLI framework to use?
default: cyclopts
choices:
No CLI: none
Typer: typer
Cyclopts: cyclopts
has_cli:
type: bool
default: "{{ false if cli_framework == 'none' else true }}"
when: false
jupyter_files:
type: str
help: Allow jupyter notebooks in the repo?
default: forbid
choices:
Don't commit notebooks, silently ignore them: ignore
Don't commit notebooks, fail in pre-commit: forbid
Allow notebooks, strip outputs: strip_outputs
Allow notebooks: allow
contains_jupyter_files:
type: bool
default: "{{ jupyter_files in ['strip_outputs', 'allow'] }}"
when: false
format_tool:
type: str
help: The python formatter to use
default: black
choices: [black, ruff]
in_pypi:
type: bool
help: Did you upload the package to PyPI?
default: false
in_rtd:
type: bool
help: Add 'Read the Docs' integration?
default: false
in_codecov:
type: bool
help: Add Codecov badge to the readme?
default: true