Skip to content

Commit efc1c05

Browse files
committed
update
1 parent 3625838 commit efc1c05

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

copier.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
_templates_suffix: .jinja
22
_envops:
33
autoescape: false
4+
45
_jinja_extensions:
56
- copier_templates_extensions.TemplateExtensionLoader
67
- extensions.py:GitDefaultsExtension
78
- extensions.py:PythonVersionExtension
9+
- extensions.py:CurrentYearExtension
10+
811
_subdirectory: "template"
912

1013
_templates:
1114
- path: LICENSE.jinja
1215
when: "{{ license != 'None' }}"
16+
- path: .github/workflows/tests.yml.jinja
17+
when: "{{ 'tests' in github_actions }}"
18+
- path: .github/workflows/lint.yml.jinja
19+
when: "{{ 'lint' in github_actions }}"
20+
- path: .github/workflows/publish.yml.jinja
21+
when: "{{ 'publish' in github_actions }}"
22+
1323
package_name:
1424
type: str
1525
help: Python package name (must be a valid identifier)
@@ -119,15 +129,19 @@ copyright_license:
119129
Open Software License 3.0: OSL-3.0
120130
PostgreSQL License: PostgreSQL
121131

132+
github_actions:
133+
type: str
134+
help: Which GitHub Actions to include? (multiple selection allowed)
135+
multiselect: true
136+
choices:
137+
Tests: tests
138+
Lint: lint
139+
Publish to PyPI: publish
140+
default: [tests, lint]
141+
122142
readme_badges:
123143
type: bool
124144
help: Add badges to the README?
125145
default: true
126-
127-
publish_gh_action:
128-
type: bool
129-
help: Add a GitHub action for publishing to PyPi?
130-
default: true
131-
132146
_tasks:
133147
- '{% if copyright_license == ''None'' %}python -c "import os; os.remove(''LICENSE'') if os.path.exists(''LICENSE'') else None"{% endif %}'

template/README.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
{%- if readme_badges %}
44

5+
{%- if 'tests' in github_actions %}
56
[![Tests]({{ repository_url }}/actions/workflows/tests.yml/badge.svg)]({{ repository_url }}/actions/workflows/tests.yml)
7+
{%- endif %}
68
[![PyPI version](https://badge.fury.io/py/{{ repo_name }}.svg)](https://badge.fury.io/py/{{ repo_name }})
79
![Supported versions](https://img.shields.io/badge/python-{{ python_min_version }}+-blue.svg)
810
[![Downloads](https://static.pepy.tech/badge/{{ repo_name }})](https://pepy.tech/project/{{ repo_name }})

0 commit comments

Comments
 (0)