-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathcopier.yaml
More file actions
124 lines (121 loc) · 3.94 KB
/
copier.yaml
File metadata and controls
124 lines (121 loc) · 3.94 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
_message_before_copy: |
===============================================================
Welcome to the napari plugin template!
===============================================================
This template will help you create a new napari plugin with all
the necessary structure of a Python package.
For detailed information about each prompt:
https://github.com/napari/napari-plugin-template/blob/main/PROMPTS.md
plugin_name:
default: "{{ _copier_conf.dst_path | basename if _copier_conf is defined else 'my-napari-plugin' }}"
help: The name of your plugin, used to name the package and repository
type: str
validator: >-
{% if not (plugin_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
plugin_name must be lowercase, no spaces, and may contain hyphens.
{% endif %}
display_name:
default: "{{ plugin_name|lower|replace('napari-', '')|title|replace('-', ' ') }}"
help: Display name for your plugin in the napari GUI
type: str
validator: >-
{% if not (display_name | regex_search('(.|\s)*\S(.|\s)*')) %}
display_name must not be empty
{% endif %}
module_name:
default: "{{ plugin_name|lower|replace('-', '_') }}"
help: Plugin module name, usually the same as the name of the plugin package, but lowercase and with underscores
type: str
validator: >-
{% if not (module_name | regex_search("^[a-z][_a-z0-9]+$")) %}
module_name must be lowercase, and may contain underscores
{% endif %}
short_description:
placeholder: A simple plugin to use {{ display_name }} within napari
help: Short description of what your plugin does
type: str
validator: >-
{% if not (short_description | regex_search('(.|\s)*\S(.|\s)*')) %}
short_description must not be empty
{% endif %}
email:
placeholder: yourname@example.com
help: Email address
type: str
full_name:
placeholder: Napari Developer
help: Developer name
type: str
github_username_or_organization:
placeholder: githubuser
help: Github user or organisation name
type: str
github_repository_url:
default: provide later
help: Github repository URL
type: str
choices:
- provide later
- https://github.com/{{github_username_or_organization}}/{{plugin_name}}
include_reader_plugin:
default: true
help: Include reader plugin?
type: bool
include_writer_plugin:
default: true
help: Include writer plugin?
type: bool
include_sample_data_plugin:
default: true
help: Include sample data plugin?
type: bool
include_widget_plugin:
default: true
help: Include widget plugin?
type: bool
install_precommit:
default: true
help: Install pre-commit? (Code formatting checks)
type: bool
install_dependabot:
default: true
help: Install dependabot? (Automatic security updates of dependency versions)
type: bool
license:
default: BSD-3
help: Which licence do you want your plugin code to have?
type: str
choices:
- BSD-3
- MIT
- Mozilla Public License 2.0
- Apache Software License 2.0
- GNU LGPL v3.0
- GNU GPL v3.0
# copier configuration options
_subdirectory: template
_jinja_extensions:
- jinja2_time.TimeExtension
_exclude:
- "copier.yaml"
- "copier.yml"
- "~*"
- "*.py[co]"
- "__pycache__"
- ".git"
- ".DS_Store"
- ".svn"
- "*licenses*"
- "_tasks.py"
_tasks:
- [
"{{ _copier_python }}", # which python
"{{ _copier_conf.src_path }}{{ _copier_conf.sep }}_tasks.py", # task script
# keyword arguments for python script
"--plugin_name={{ plugin_name }}",
"--module_name={{ module_name }}",
"--project_directory={{ _copier_conf.dst_path }}",
"--install_precommit={{ install_precommit }}",
"--github_repository_url={{ github_repository_url }}",
"--github_username_or_organization={{ github_username_or_organization }}",
]