-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopier.yml
More file actions
81 lines (69 loc) · 2.12 KB
/
Copy pathcopier.yml
File metadata and controls
81 lines (69 loc) · 2.12 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
_min_copier_version: "9.0.0"
_subdirectory: template
_templates_suffix: .jinja
_answers_file: .copier-answers.yml
_exclude:
- "*.pyc"
- "__pycache__"
- ".git"
_tasks:
- "git init"
- "git checkout -b main"
# Questions
author_name:
type: str
help: Author's full name
default: "Joe Doe"
author_email:
type: str
help: Author's email address
default: "joe@example.com"
github_username:
type: str
help: GitHub username or organization
default: "{{ author_name | lower | replace(' ', '') }}"
project_name:
type: str
help: Human-readable project name
default: "{{ author_name }}'s new project"
project_slug:
type: str
help: "Python package name (used for imports, directory name, etc.)"
# Allowlist sanitisation: lowercase, collapse every run of non-alphanumeric
# characters (spaces, hyphens, dots, apostrophes, …) into a single
# underscore, then trim leading/trailing underscores. A blocklist of
# individual replaces would leak characters such as the apostrophe in the
# default project_name ("…'s new project").
default: "{{ project_name | lower | regex_replace('[^a-z0-9]+', '_') | trim('_') }}"
# Reject anything that is not a valid Python package / import name, whether it
# comes from the default above or is typed by the user.
validator: >-
{% if not (project_slug | regex_search('^[a-z_][a-z0-9_]*$')) %}
project_slug must be a valid Python package name: lowercase letters, digits
and underscores only, and it may not start with a digit.
{% endif %}
project_short_description:
type: str
help: A short description of the project
default: "{{ project_name }} is a Python project."
version:
type: str
help: Initial version number
default: "0.1.0"
license:
type: str
help: Project license
choices:
- MIT
- Apache-2.0
- GPL-3.0-only
- GPL-3.0-or-later
- LicenseRef-Proprietary
default: MIT
include_hexagonal:
type: bool
help: >-
Scaffold a hexagonal (ports-and-adapters) architecture? Adds domain/services/
adapters layers with an example slice, plus import-linter contracts that
enforce the layer boundaries.
default: true