-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
100 lines (76 loc) · 2.88 KB
/
copier.yaml
File metadata and controls
100 lines (76 loc) · 2.88 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
_subdirectory: template
# Post-copy commands:
_tasks:
# Only run these commands when copying the template
- command: "git init -b main; uv add --dev pre-commit commitizen ruff typos; uv add polars seedcase-sprout seedcase-flower"
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-data-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:
``` bash
just install-precommit
```
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:
github_user:
type: str
help: "What is the name of the GitHub user or organisation where the repository will be or is stored?"
github_repo:
type: str
help: "What is the name of the GitHub repository where the data package will be or is stored? We strongly recommend using the default given."
default: "{{ _folder_name }}"
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 number of the GitHub project board 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 %}
cc0_license:
type: bool
default: true
help: "Do you want to use the CC0 license for the data in this data package?"
# Configurations not asked
github_repo_spec:
type: str
default: "{{ github_user }}/{{ github_repo }}"
when: false
copyright_year:
type: str
default: "{{ copyright_year | default('%Y' | strftime) }}"
when: false