-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
119 lines (92 loc) · 3.39 KB
/
copier.yaml
File metadata and controls
119 lines (92 loc) · 3.39 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
_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 "{{ github_repo }}" has been created successfully!
See the [guide](https://template-python-package.seedcase-project.org/docs/guide) for more detail
on the next steps. Briefly:
1. Change directory to the project root:
``` bash
cd {{ _copier_conf.dst_path | realpath }}
```
2. Install the pre-commit hooks, add (called "update" here) the Quarto extension,
and build the README:
``` bash
just install-precommit update-quarto-theme build-readme
```
3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these setup steps:
``` bash
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:
``` bash
just list-todos
```
# Questions:
is_seedcase_project:
type: bool
help: "Is this package part of the Seedcase Project?"
default: true
github_user:
type: str
help: "What is the name of the GitHub user or organisation where the repository will be or is stored?"
default: "{{ 'seedcase-project' if is_seedcase_project else '' }}"
github_repo:
type: str
help: "What is the name of the GitHub repository where the website will be or is stored? We strongly recommend using the default given."
default: "{{ _folder_name }}"
hosting_provider:
type: str
help: "What hosting provider will you use for the documentation website?"
choices:
- netlify
- gh-pages
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 %}
# Configurations not asked
github_repo_snake_case:
type: str
default: "{{github_repo | replace('-', '_') | replace('.', '_')}}"
when: false
github_repo_spec:
type: str
default: "{{ github_user }}/{{ github_repo }}"
when: false
copyright_year:
type: str
default: "{{ copyright_year | default('%Y' | strftime) }}"
when: false
homepage:
type: str
default: "https://{{ github_repo }}.{{ github_user }}.org"
when: false