Skip to content

Commit 5f16d16

Browse files
authored
chore(patch-release): support project keywords in template (#891)
1 parent 84168d1 commit 5f16d16

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

copier.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ project_description:
2626
default: Project brief description.
2727
help: "Provide a concise description to be used in the Python package overview and the introductory paragraph in the README and documentation's index page:"
2828
type: str
29+
project_keywords:
30+
default: "{{ project_name|lower }}"
31+
type: str
32+
help: "Provide a list of comma-separated keywords to be using in the Python package overview:"
2933
development_status:
3034
default: Alpha
3135
choices:

includes/copier-answers-sample.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ copyright_holder: Serious Scaffold
44
copyright_license: MIT License
55
copyright_year: 2022-2024
66
coverage_threshold: 100
7-
default_py: '3.12'
7+
default_py: "3.12"
88
development_status: Alpha
9-
max_py: '3.13'
10-
min_py: '3.9'
9+
max_py: "3.13"
10+
min_py: "3.9"
1111
module_name: ss_python
1212
organization_name: Serious Scaffold
1313
package_name: ss-python
1414
platforms:
1515
- macos
1616
- linux
1717
- windows
18-
project_description:
19-
A Python Project Template for Long-Term Maintainability.
18+
project_description: A Python Project Template for Long-Term Maintainability.
19+
project_keywords: copier-template, project-template, long-term-maintainability
2020
project_name: Serious Scaffold Python
2121
repo_name: ss-python
2222
repo_namespace: serious-scaffold

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description = "A Python Project Template for Long-Term Maintainability."
1111
readme = "README.md"
1212
keywords = [
1313
"copier-template",
14-
"full-development-lifecycle",
14+
"long-term-maintainability",
1515
"project-template",
1616
"serious-scaffold",
1717
]

template/pyproject.toml.jinja

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name = "{{ package_name }}"
1313
description = "{{ project_description }}"
1414
readme = "README.md"
1515
keywords = [
16-
"copier-template",
17-
"full-development-lifecycle",
18-
"project-template",
19-
"serious-scaffold",
16+
{% set keywords = (project_keywords.split(",") | map("trim") | list) + ["serious-scaffold"] %}
17+
{% for keyword in keywords | sort %}
18+
"{{ keyword }}",
19+
{% endfor %}
2020
]
2121
{% if copyright_license == "Apache Software License" %}
2222
license = { text = "Apache-2.0" }

0 commit comments

Comments
 (0)