-
Notifications
You must be signed in to change notification settings - Fork 2
/
copier.yml
155 lines (135 loc) · 4.57 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
# Project Details
package_name:
type: str
help: |
Name of the python import package.
Must be a valid python identifier, i.e. my_package
validator: >-
{% if not (package_name | regex_search('^[a-zA-Z][a-zA-Z_0-9]+$')) %}
{{package_name}} is not a valid python package name
{% endif %}
description:
type: str
help: A short description of your project
placeholder: One line description of your module
git_platform:
type: str
help: Git platform hosting the repository
choices:
- github.com
github_org:
type: str
help: |
GitHub organisation that will contain this repo.
Set to your GitHub username to make a personal repo, or DiamondLightSource
if you have permissions to make it in the DiamondLightSource organisation.
when: "{{ git_platform == 'github.com' }}"
default: DiamondLightSource
repo_name:
type: str
help: |
Name of the repository.
Generally the package name with underscores replaced by dashes.
default: "{{ package_name | replace('_', '-') }}"
validator: >-
{% if not (repo_name | regex_search('^[a-zA-Z][a-zA-Z_\\.\\-0-9]+$')) %}
{{ repo_name }} is not a valid repo name
{% endif %}
distribution_name:
type: str
help: |
Name of the python distribution package that will be created.
This is what people will `pip install`.
Generally the same as the repo name unless there is a name clash on PyPI.
default: "{{ repo_name }}"
author_name:
type: str
help: Your full name
placeholder: FirstName LastName
author_email:
type: str
help: Your email address
placeholder: email@diamond.ac.uk
# Catalog info
component_owner:
type: str
when: "{{ github_org == 'DiamondLightSource' }}"
help: |
The unique name of the person or group who owns this component in
the Developer Portal Software Catalogue.
This will normally be group:default/<your_group>. For a full list of groups visit
https://dev-portal.diamond.ac.uk/catalog?filters%5Bkind%5D=group&filters%5Buser%5D=all
and hover over each group link to see its group ID, e.g.
https://dev-portal.diamond.ac.uk/catalog/default/group/accelerator-controls
would go here as group:default/accelerator-controls.
component_type:
type: str
when: "{{ github_org == 'DiamondLightSource' }}"
help: |
Type of the component in the Developer Portal Software Catalogue.
Most likely service, library or application (without quotes).
choices:
- library
- service
- user-interface
- website
default: library
component_lifecycle:
type: str
when: "{{ github_org == 'DiamondLightSource' }}"
help: |
Project's current lifecycle stage, to be displayed in the Developer
Portal Software Catalogue.
choices:
- experimental
- production
- deprecated
default: experimental
# Template Options
docker:
type: bool
help: |
Would you like to publish your project in a Docker container?
You should select this if you are making a service.
docs_type:
type: str
help: |
How would you like to document your project?
You can start with just a README and change your answer to add a sphinx project later.
choices:
- README
- sphinx
type_checker:
type: str
help: |
What type checker would you like to use?
Pyright is recommended for new projects, but it is stricter,
so you might need to select mypy for existing projects.
choices:
- pyright
- mypy
pypi:
type: bool
help: Would you like the wheel and source distribution to be automatically uploaded to PyPI when a release is made?
# Internal variables
repo_url:
type: str
default: "https://github.com/{{github_org}}/{{repo_name}}"
when: false
docs_url:
type: str
default: "https://{{github_org | lower}}.github.io/{{repo_name}}"
when: false
sphinx:
type: bool
default: "{{ docs_type == 'sphinx' }}"
when: false
_subdirectory: "template"
_tasks:
- "git init --initial-branch=main"
_migrations:
- version: 2.0.0
before:
- echo This update will require you to login to pypi.org and make changes before you can make a new release to PyPI. If you do not have time to do this now, press CTRL+C to abort this update.
after:
- echo Visit https://diamondlightsource.github.io/python-copier-template/main/how-to/pypi.html to find out how to set up PyPI trusted publishing