-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopier.yml
More file actions
123 lines (104 loc) · 3.86 KB
/
Copy pathcopier.yml
File metadata and controls
123 lines (104 loc) · 3.86 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
_subdirectory: template
_min_copier_version: "9.0.0"
# Trim block-tag newlines so conditionals don't leave stray blank lines in
# rendered text/markdown (keeps mdformat happy on a fresh scaffold).
_envops:
trim_blocks: true
lstrip_blocks: true
keep_trailing_newline: true
_message_after_copy: |
Project "{{ project_name }}" scaffolded.
Next steps:
cd {{ project_name }}
uv sync
uv run pre-commit install
git init && git add -A && git commit -m "Initial commit"
project_name:
type: str
help: Project / repo name in kebab-case, e.g. "my-tool"
project_description:
type: str
help: One-line description of the project
project_kind:
type: str
help: An installable library, or a standalone app you run via `uv run`?
choices:
"Application (not packaged; run via `uv run`)": app
"Library (packaged with hatchling, publishable to PyPI)": library
default: app
publish_to_pypi:
type: bool
help: Publish to PyPI on tag? (adds publish.yml + RELEASING.md via trusted publishing)
# Apps are never published; libraries usually are, but some are packaged only
# for local install (e.g. an eval), so it's asked separately.
default: "{{ project_kind == 'library' }}"
when: "{{ project_kind == 'library' }}"
python_version:
type: str
help: Primary Python version (used for .python-version, CI, and the requires-python floor)
default: "3.12"
use_coverage_gate:
type: bool
# Coverage is always measured and reported; this only controls whether a
# drop below `coverage_floor` fails the build.
help: Also FAIL the build when coverage drops below a floor?
default: false
use_frontend:
type: bool
# Adds Biome (lint + format, one Rust binary — the TS analogue of ruff) to
# the pre-commit stack, and a second CI job calling the shared node-ci
# workflow for type-check and build. Lint/format ride pre-commit rather than
# node-ci so a hybrid repo doesn't pay for a second Node job to get them.
help: Does this project have a TypeScript/JavaScript frontend?
default: false
frontend_dir:
type: str
help: Directory holding package.json (use "." if the frontend is the whole repo)
default: frontend
when: "{{ use_frontend }}"
use_typos:
type: bool
# The typos hook defaults to --write-changes, so it edits files rather than
# reporting. On a corpus heavy with domain vocabulary, proper nouns or
# generated data it mostly produces false positives, and the allow-list
# needed to keep it quiet grows without end. Off is the right answer for
# those projects; on remains the default for ordinary ones.
help: Run the typos spell-checker? (say no for medical/legal/scientific vocabulary, or lots of generated data)
default: true
use_template_update:
type: bool
# Adds a scheduled workflow that runs `copier update` and opens a PR when the
# template's scaffolded files change. Worth declining for a repo that wants
# template changes pulled on its own schedule rather than weekly — a vendored
# snapshot, a project in a release freeze, or one whose local edits diverge
# far enough that every update conflicts. Declining doesn't block updates:
# `.copier-answers.yml` is written either way, so `uvx copier update` still
# works by hand.
help: Open a PR automatically when the template changes? (weekly `copier update`)
default: true
coverage_floor:
type: int
help: Minimum coverage percentage
default: 60
when: "{{ use_coverage_gate }}"
github_owner:
type: str
default: MattFisher
author_name:
type: str
default: Matt Fisher
author_email:
type: str
default: m@ttfisher.com
license:
type: str
help: License for the project
choices:
"MIT (permissive open source; writes a LICENSE file)": MIT
"Proprietary (all rights reserved; no LICENSE file)": Proprietary
default: MIT
# Derived, not prompted.
package_name:
type: str
default: "{{ project_name | replace('-', '_') }}"
when: false