1
+ # This is the quick exit option for the template. It defaults to
2
+ # basic package setup (and we will add basic tests and docs)
3
+ template_mode :
4
+ type : str
5
+ help : |
6
+ "Welcome to the pyOpenSci package template.
7
+ Please select the type of template that you want to create today."
8
+ choices :
9
+ " Yes, but with a minimal setup (package, tests and docs; typing, linting not included). " : " minimal"
10
+ " I want to use the default settings but I want it setup for me. " : " full"
11
+ " I want it all but I want to fully customize all elements of the template. " : " custom" # changed from no to to custom
12
+
13
+ default : " minimal"
14
+
15
+ # ############## Basic Information ###################
16
+
1
17
copyright_holder :
2
18
type : str
3
19
help : " Who is the copyright holder, for example, yourself or your organization? Used in the license file and project description."
4
20
5
21
author_name :
6
22
type : str
7
- help : " Who is the author of the package to be ? Used in the package description."
23
+ help : " Who is the author of the package? Used in the package description."
8
24
default : " {{ copyright_holder }}"
9
25
10
26
author_email :
@@ -13,35 +29,48 @@ author_email:
13
29
14
30
project_name :
15
31
type : str
16
- help : " What is the name of the project? Used as the title in the README.md and other places."
32
+ help : " What is the name of the project? Used as the README.md title, in the Docs and other places."
17
33
18
34
package_description :
19
35
type : str
20
36
multiline : true
21
37
help : " Please provide a short description for the package."
22
38
39
+ year :
40
+ when : " {{ template_mode == 'custom' }}"
41
+ type : str
42
+ help : " What is the starting year of the project? Used in copyright statements."
43
+ default : " {{ '%Y' | strftime }}"
44
+
45
+ license :
46
+ when : " {{ template_mode == 'custom' }}"
47
+ type : str
48
+ help : |
49
+ Which license do you want to use? Includes a LICENSE file in the repository root.
50
+ For more information, see:
51
+ - https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html
52
+ - https://opensource.org/licenses
53
+ choices :
54
+ " Permissive - MIT " : " MIT"
55
+ " Permissive - BSD-3-Clause " : " BSD-3-Clause"
56
+ " Permissive - Apache-2.0 " : " Apache-2.0"
57
+ " Copyleft - GPL-3.0 " : " GPL-3.0-only"
58
+ " Copyleft - EUPL-1.2 " : " EUPL-1.2"
59
+ " Intermediate - MPL-2.0 " : " MPL-2.0"
60
+ default : MIT
61
+
62
+ # ############## All things related to vcs & git ###################
63
+
23
64
use_git :
24
- when : " {{ use_default == 'no ' }}"
65
+ when : " {{ template_mode == 'custom ' }}"
25
66
type : bool
26
67
default : " yes"
27
68
help : " Do you want to use git version control with a development platform, like GitHub or GitLab?"
28
69
29
-
30
- # This is the quick exit option for the template. It defaults to
31
- # basic package setup (and we will add basic tests and docs)
32
- use_default :
33
- type : str
34
- help : " Do you want to answer one more question, and skip the rest, using the default values?"
35
- choices :
36
- " No, I want to fully customize the template. " : " no"
37
- " Yes, with all the bells and whistles. " : " full"
38
- " Yes, but with a minimal setup (package, tests and docs only). " : " minimal"
39
- default : " minimal"
40
-
41
70
dev_platform :
42
- when : " {{ use_default == 'no ' and use_git }}"
71
+ when : " {{ template_mode == 'custom ' and use_git }}"
43
72
type : str
44
- help : " Which development platform are you planning to use? Used to generate certain documentation and hyperlinks ."
73
+ help : " Which development platform are you planning to use? Used in documentation links ."
45
74
choices :
46
75
- " GitHub"
47
76
- " GitLab"
@@ -52,103 +81,89 @@ username:
52
81
type : str
53
82
help : " Provide you or your organization's {{ dev_platform }} username. Used to generate certain documentation and hyperlinks."
54
83
55
-
56
- documentation :
57
- when : " {{ use_default == 'no' }}"
84
+ dev_platform_url :
58
85
type : str
59
- help : " Do you want to include documentation for your project and which framework do you want to use?"
60
- choices :
61
- " Sphinx (https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html) " : sphinx
62
- " mkdocs-material (https://squidfunk.github.io/mkdocs-material) " : mkdocs
63
- " No, I don't need documentation for my project. " : " no"
64
- default : " {% if use_default != 'no' %}sphinx{% endif %}"
86
+ when : false
87
+ default : " https://{{ dev_platform|lower }}.com"
65
88
66
- use_rtd :
67
- when : " {{ use_default == 'no' }}"
68
- type : bool
69
- default : " {% if use_default != 'minimal' %}yes{% else %}no{% endif %}"
70
- help : " Do you want to read the docs to publish your documentation?"
89
+ # ############## Things related to packaging ###################
71
90
72
91
project_slug :
73
- when : " {{ use_default == 'no ' }}"
92
+ when : " {{ template_mode == 'custom ' }}"
74
93
type : str
75
94
help : " What is the project slug? Used in hyperlinks."
76
95
default : " {{ project_name|lower|replace(' ', '-') }}"
77
96
78
97
package_name :
79
- when : " {{ use_default == 'no ' }}"
98
+ when : " {{ template_mode == 'custom ' }}"
80
99
type : str
81
100
help : " What is the Python package name? Used as the name of the package and the top-level import."
82
101
default : " {{ project_slug|replace('-', '_') }}"
83
102
84
103
use_vcs_version :
85
- when : " {{ use_default == 'no ' }}"
104
+ when : " {{ template_mode == 'custom ' }}"
86
105
type : bool
87
- default : " {% if use_default != 'minimal' %}yes{% else %}no{% endif %}"
106
+ default : " {% if template_mode != 'minimal' %}yes{% else %}no{% endif %}"
88
107
help : " Do you want to use dynamic versioning of your package or static? Dynamic means that versions use your version control system (VCS), such as git tags, for creating versions."
89
108
90
- dev_platform_url :
91
- type : str
92
- when : false
93
- default : " https://{{ dev_platform|lower }}.com"
94
-
95
109
python_package_name :
96
110
type : str
97
111
when : false
98
112
default : " {{ project_slug|lower|replace('-', '_') if project_slug else project_name|lower|replace('-', '_') }}"
99
113
114
+ # ############## Things related to docs ###################
115
+
116
+ documentation :
117
+ when : " {{ template_mode == 'custom' }}"
118
+ type : str
119
+ help : " Do you want to include documentation for your project and which framework do you want to use?"
120
+ choices :
121
+ " Sphinx (https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html) " : sphinx
122
+ " mkdocs-material (https://squidfunk.github.io/mkdocs-material) " : mkdocs
123
+ " No, I don't need documentation for my project. " : " no"
124
+ default : " {% if template_mode != 'no' %}sphinx{% endif %}"
125
+
126
+ use_rtd :
127
+ when : " {{ template_mode == 'custom' }}"
128
+ type : bool
129
+ default : " {% if template_mode != 'minimal' %}yes{% else %}no{% endif %}"
130
+ help : " Do you want to Read the Docs to publish your documentation?"
131
+
132
+ # ############### Packaging tools and settings ###################
133
+
100
134
use_hatch_envs :
101
- when : " {{ use_default == 'no ' }}"
135
+ when : " {{ template_mode == 'custom ' }}"
102
136
type : bool
103
137
default : " yes"
104
- help : " Do you want to use hatch environments for running isolated commands like linting, building docs, or testing?"
138
+ help : " Do you want to use hatch environments for running isolated commands like linting, building docs, and testing?"
139
+
140
+ # ############### Linting, style, typing and format thangs ###################
105
141
106
142
use_lint :
107
- when : " {{ use_default == 'no ' }}"
143
+ when : " {{ template_mode == 'custom ' }}"
108
144
type : bool
109
- default : " {% if use_default != 'minimal' %}yes{% else %}no{% endif %}"
145
+ default : " {% if template_mode != 'minimal' %}yes{% else %}no{% endif %}"
110
146
help : " Do you want to lint your code and check file formatting?"
111
147
112
148
use_precommit :
113
- when : " {{ use_default == 'no ' }}"
149
+ when : " {{ template_mode == 'custom ' }}"
114
150
type : bool
115
- default : " {% if use_default != 'minimal' %}yes{% else %}no{% endif %}"
151
+ default : " {% if template_mode != 'minimal' %}yes{% else %}no{% endif %}"
116
152
help : " Do you want to pre-commit hooks to format your code on save?"
117
153
118
154
use_types :
119
- when : " {{ use_default == 'no ' }}"
155
+ when : " {{ template_mode == 'custom ' }}"
120
156
type : bool
121
- default : " {% if use_default != 'minimal' %}yes{% else %}no{% endif %}"
157
+ default : " {% if template_mode != 'minimal' %}yes{% else %}no{% endif %}"
122
158
help : " Do you want to use typing annotations and type check your code?"
123
159
124
- # Default to a basic test suite
160
+ # ############## All things related to testing ###################
161
+
125
162
use_test :
126
- when : " {{ use_default == 'no ' }}"
163
+ when : " {{ template_mode == 'custom ' }}"
127
164
type : bool
128
165
default : " yes"
129
166
help : " Do you want to test your code? We strongly recommend that you add tests to your package."
130
167
131
- license :
132
- when : " {{ use_default == 'no' }}"
133
- type : str
134
- help : |
135
- Which license do you want to use? Includes a LICENSE file in the repository root.
136
- For more information, see:
137
- - https://www.pyopensci.org/python-package-guide/documentation/repository-files/license-files.html
138
- - https://opensource.org/licenses
139
- choices :
140
- " Permissive - MIT " : " MIT"
141
- " Permissive - BSD-3-Clause " : " BSD-3-Clause"
142
- " Permissive - Apache-2.0 " : " Apache-2.0"
143
- " Copyleft - GPL-3.0 " : " GPL-3.0-only"
144
- " Copyleft - EUPL-1.2 " : " EUPL-1.2"
145
- " Intermediate - MPL-2.0 " : " MPL-2.0"
146
- default : MIT
147
-
148
- year :
149
- when : " {{ use_default == 'no' }}"
150
- type : str
151
- help : " What is the starting year of the project? Used in copyright statements."
152
- default : " {{ '%Y' | strftime }}"
153
168
154
169
_subdirectory : " template"
0 commit comments