forked from ika-rwth-aachen/ros2-pkg-create
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopier.yml
189 lines (157 loc) · 4.25 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
_subdirectory: "templates/{{ template }}"
_envops:
lstrip_blocks: true
trim_blocks: true
_jinja_extensions:
- jinja2_strcase.StrcaseExtension
template:
help: Template
type: str
default: cpp_pkg
choices: [cpp_pkg, msgs_pkg, python_pkg, ci]
package_name:
help: Package name
type: str
placeholder: "{{ template }}"
validator: "{% if not package_name %}Package name is required{% endif %}"
when: "{{ 'pkg' in template }}"
description:
help: Description
type: str
default: TODO
when: "{{ 'pkg' in template }}"
maintainer:
help: Maintainer
type: str
default: "{% if user_name_git %}{{ user_name_git }}{% else %}Todo{% endif %}"
when: "{{ 'pkg' in template }}"
maintainer_email:
help: Maintainer email
type: str
default: "{% if user_email_git %}{{ user_email_git }}{% else %}{{ maintainer | lower | replace(' ', '.') }}@TODO.com{% endif %}"
when: "{{ 'pkg' in template }}"
author:
help: Author
type: str
default: "{{ maintainer }}"
when: "{{ 'pkg' in template }}"
author_email:
help: Author email
type: str
default: "{% if maintainer == author %}{{ maintainer_email }}{% else %}{{ author | lower | replace(' ', '.') }}@TODO.com{% endif %}"
when: "{{ 'pkg' in template }}"
license:
help: License
type: str
default: TODO
choices: [TODO, Apache-2.0, BSL-1.0, BSD-2.0, BSD-2-Clause, BSD-3-Clause, GPL-3.0-only, LGPL-2.1-only, LGPL-3.0-only, MIT, MIT-0]
when: "{{ 'pkg' in template }}"
node_name:
help: Node name
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: str
default: "{{ package_name }}"
node_class_name:
help: Class name of node
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: str
default: "{{ node_name | to_camel }}"
is_component:
help: Make it a component?
when: "{{ template == 'cpp_pkg' }}"
type: bool
default: false
is_lifecycle:
help: Make it a lifecycle node?
when: "{{ template == 'cpp_pkg' }}"
type: bool
default: false
has_launch_file:
help: Add a launch file?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
launch_file_type:
help: Type of launch file
when: "{{ (template == 'cpp_pkg' or template == 'python_pkg') and has_launch_file }}"
type: str
default: py
choices: [py, xml, yml]
has_params:
help: Add parameter loading?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
has_subscriber:
help: Add a subscriber?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
has_publisher:
help: Add a publisher?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
has_service_server:
help: Add a service server?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
has_action_server:
help: Add an action server?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
has_timer:
help: Add a timer callback?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
type: bool
default: false
auto_shutdown:
help: Automatically shutdown the node after launch (useful in CI/CD)?
when: "{{ template == 'cpp_pkg' or template == 'python_pkg' }}"
when: false
type: bool
default: false
interface_types:
help: Interfaces types
when: "{{ template == 'msgs_pkg' }}"
type: str
default: [msg, srv, action]
choices:
Message: msg
Service: srv
Action: action
multiselect: true
msg_name:
help: Message name
when: "{{ template == 'msgs_pkg' and 'msg' in interface_types }}"
type: str
default: Message
srv_name:
help: Service name
when: "{{ template == 'msgs_pkg' and 'srv' in interface_types }}"
type: str
default: Service
action_name:
help: Action name
when: "{{ template == 'msgs_pkg' and 'action' in interface_types }}"
type: str
default: Action
ci_type:
help: CI type
type: str
default: github
choices: [github, gitlab]
when: "{{ 'ci' in template }}"
add_pre_commit:
help: Add pre-commit hooks?
default: false
type: bool
when: "{{ 'ci' in template }}"
ros_distro:
help: ROS distro
type: str
default: "{{ ros_distro }}"
choices: [galactic, foxy, humble, jazzy, rolling]
when: "{{ not ros_distro }}"