-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopier.yaml
159 lines (132 loc) · 4.51 KB
/
copier.yaml
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
# === Include other yaml files (optional) ===
# see https://copier.readthedocs.io/en/stable/configuring/#include-other-yaml-files
# === Questions to ask the user when generating a project from this template. ===
# see https://copier.readthedocs.io/en/stable/configuring/#advanced-prompt-formatting
project_name:
type: str
help: What is your project name?
default: my-awesome-schema
project_slug:
type: str
help: A slug of the name. Must be a valid Python package name.
default: "{% from pathjoin('includes', 'slugify.jinja') import slugify %}{{ slugify(project_name) }}"
# regex_search is part of a jinja extension loaded by default.
# It is case insensitive by default. We need to set ignorecase=False to make it case sensitive.
validator: >-
{% if not (project_slug | regex_search('^[a-z][_a-z0-9\-]+$', ignorecase=False)) %}
project_slug must start with a lowercase letter, followed by lowercase letters, digits, dashes or underscores.
{% endif %}
email:
help: Email address
type: str
default: [email protected]
full_name:
help: Developer full name
type: str
default: My Name
github_org:
help: Github user or organisation name
type: str
default: my-org
project_description:
help: A short description of the project
type: str
default: This is the project description.
license:
help: Which license do you want for your project?
type: str
choices:
- BSD-3
- MIT
- Mozilla Public License 2.0
- Apache Software License 2.0
- GNU LGPL v3.0
- GNU GPL v3.0
default: MIT
copyright_year:
help: The year of the first release
type: str
default: "{% now 'utc', '%Y' %}"
author:
help: The author of the schema
type: str
default: "{{ full_name }} <{{ email }}>"
when: false # Make it a computed value. Neither ask for it nor store it.
main_schema_class:
type: str
default: "Person"
create_python_classes:
help: Create Python classes for the schema?
type: str
choices:
- "Yes"
- "No"
default: "Yes"
github_token_for_pypi_deployment:
help: Github token for PyPI deployment
type: str
default: "PYPI_PASSWORD"
when: false # Don't ask, don't store.
use_schemasheets:
help: Use Google Sheets for schema definitions?
type: str
choices:
- "Yes"
- "No"
default: "No"
google_sheet_id:
placeholder: 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ
help: Google Sheet ID
type: str
when: "{{ use_schemasheets == 'Yes' }}"
google_sheet_tabs:
help: Google Sheet tabs
type: str
default: "personinfo enums"
when: "{{ use_schemasheets == 'Yes' }}"
google_sheet_module:
help: Google Sheet module
type: str
default: "{% from pathjoin('includes', 'slugify.jinja') import slugify %}{{ slugify(google_sheet_tabs) }}"
when: false
# === copier configuration options ===
# see https://copier.readthedocs.io/en/stable/configuring/#available-settings
_subdirectory: template
_min_copier_version: "9.4.0"
_jinja_extensions:
- jinja2_time.TimeExtension
_exclude:
# files or dirs in template/ that should not be copied to the project
- "copier.yaml"
- "copier.yml"
- "~*"
- "*.py[co]"
- "__pycache__"
- ".git"
_skip_if_exists:
# files or dirs that should not be overwritten if they already exist in the project
- LICENSE
- README.md
- project/*
- src/docs/files/about.md
- src/{{project_slug}}/data/*
- src/{{project_slug}}/datamodel/*
- src/{{project_slug}}/schema/*
- tests/test_data.py
_message_after_copy: |
** PROJECT CREATION COMPLETE **
Next step (if you have not previously initialized your project)
run "just setup" in the root of your project directory.
# _tasks:
# Commands to execute after generating or updating a project from the template.
# - "git init"
# - "rm {{ name_of_the_project }}/README.md"
# Arrays are executed without shell, saving you the work of escaping arguments
# - [invoke, "--search-root={{ _copier_conf.src_path }}", after-copy]
# Your script can be run by the same Python environment used to run Copier
# - ["{{ _copier_python }}", task.py]
# OS-specific task (supported values are "linux", "macos", "windows" and `None`)
# - command: rm {{ name_of_the_project }}/README.md
# when: "{{ _copier_conf.os in ['linux', 'macos'] }}"
# - command: Remove-Item {{ name_of_the_project }}\\README.md
# when: "{{ _copier_conf.os == 'windows' }}"