-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
116 lines (89 loc) · 3.5 KB
/
copier.yaml
File metadata and controls
116 lines (89 loc) · 3.5 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
_subdirectory: template
# Post-copy commands:
_tasks:
# Add dev dependencies
- command: "git init -b main; uv add --dev pre-commit ruff typos pytest bandit commitizen genbadge jupyter pytest-cov quartodoc types-tabulate mypy vulture"
when: "{{ _copier_operation == 'copy' }}"
# Message to show after generating or regenerating the project successfully
_message_after_copy: |
Your project "{{ package_name }}" has been created successfully!
Next steps:
1. Change directory to the project root:
$ cd {{ _copier_conf.dst_path }}
2. Install the pre-commit hooks:
$ just install-precommit
3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these commands to upload and configure your project on GitHub:
$ spaid_gh_create_repo_from_local -h
$ spaid_gh_set_repo_settings -h
$ spaid_gh_ruleset_basic_protect_main -h
4. Configure GitHub following this
[guide](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens):
- Install the [auto-release-token](https://github.com/apps/auto-release-token)
and [add-to-board-token](https://github.com/apps/add-to-board-token) GitHub Apps
- Create an `UPDATE_VERSION_TOKEN` and `ADD_TO_BOARD_TOKEN` secret for the GitHub Apps
- Create an `UPDATE_VERSION_APP_ID` and `ADD_TO_BOARD_APP_ID` variable of the GitHub Apps' IDs
5. List and complete all TODO items in the repository:
$ just list-todos
# Questions:
package_github_repo:
type: str
help: "What is or will be the GitHub repository spec for the project?"
placeholder: "user/repo"
validator: |
{% if package_github_repo and not (package_github_repo | regex_search('^[\w.-]+\/[\w.-]+$')) %}
Must be in the format `user/repo` and contain only alphanumeric characters and `_`, `-`, or `.`.
{% endif %}
github_user:
type: str
default: "{{ package_github_repo.split('/')[0] if package_github_repo else '' }}"
when: false
package_name:
type: str
help: "What is the name of the package?"
default: "{{ _copier_conf.dst_path | basename }}"
validator: |
{% if package_name and not (package_name | regex_search('^[\w.-]+$')) %}
Must contain only alphanumeric characters and `_`, `-`, or `.`.
{% endif %}
package_name_snake_case:
type: str
default: "{{package_name | replace('-', '_') | replace('.', '_')}}"
when: false
is_seedcase_project:
type: bool
help: "Is this package part of the Seedcase Project?"
default: "{{ github_user == 'seedcase-project' }}"
hosting_provider:
type: str
help: "What hosting provider will you use for the documentation website?"
choices:
- netlify
- gh-pages
homepage:
type: str
help: "What is the homepage of your project?"
default: "{{ 'https://%s.seedcase-project.org' % package_name if is_seedcase_project else '' }}"
author_given_name:
type: str
help: "What is your first/given name?"
author_family_name:
type: str
help: "What is your last/family name?"
author_email:
type: str
help: "What is your email address?"
review_team:
type: str
help: What GitHub team is responsible for reviewing pull requests?
default: "{{ '@%s/developers' % github_user if github_user else '' }}"
github_board_number:
type: str
help: "What is the GitHub project board number to add issues and PRs to?"
validator: |
{% if github_board_number and not github_board_number.isdigit() %}
The board number must be an integer.
{% endif %}
copyright_year:
type: str
default: "{{ copyright_year | default('%Y' | strftime) }}"
when: false