@@ -9,23 +9,31 @@ _tasks:
99# Message to show after generating or regenerating the project successfully
1010_message_after_copy : |
1111
12- Your project "{{ package_name }}" has been created successfully!
12+ Your project "{{ github_repo }}" has been created successfully!
1313
14- Next steps:
14+ See the [guide](https://template-python-package.seedcase-project.org/docs/guide) for more detail
15+ on the next steps. Briefly:
1516
1617 1. Change directory to the project root:
1718
18- $ cd {{ _copier_conf.dst_path }}
19+ ``` bash
20+ cd {{ _copier_conf.dst_path | realpath }}
21+ ```
1922
20- 2. Install the pre-commit hooks:
23+ 2. Install the pre-commit hooks, add (called "update" here) the Quarto extension,
24+ and build the README:
2125
22- $ just install-precommit
26+ ``` bash
27+ just install-precommit update-quarto-theme build-readme
28+ ```
2329
24- 3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these commands to upload and configure your project on GitHub :
30+ 3. Install [`spaid`](https://github.com/seedcase-project/spaid) and run these setup steps :
2531
26- $ spaid_gh_create_repo_from_local -h
27- $ spaid_gh_set_repo_settings -h
28- $ spaid_gh_ruleset_basic_protect_main -h
32+ ``` bash
33+ spaid_gh_create_repo_from_local -h
34+ spaid_gh_set_repo_settings -h
35+ spaid_gh_ruleset_basic_protect_main -h
36+ ```
2937
3038 4. Configure GitHub following this
3139 [guide](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens):
@@ -37,46 +45,37 @@ _message_after_copy: |
3745
3846 5. List and complete all TODO items in the repository:
3947
40- $ just list-todos
48+ ``` bash
49+ just list-todos
50+ ```
4151
4252# Questions:
43- package_github_repo :
44- type : str
45- help : " What is or will be the GitHub repository spec for the project?"
46- placeholder : " user/repo"
47- validator : |
48- {% if package_github_repo and not (package_github_repo | regex_search('^[\w.-]+\/[\w.-]+$')) %}
49- Must be in the format `user/repo` and contain only alphanumeric characters and `_`, `-`, or `.`.
50- {% endif %}
53+ is_seedcase_project :
54+ type : bool
55+ help : " Is this package part of the Seedcase Project?"
56+ default : true
5157
52- github_user :
58+ github_repo :
5359 type : str
54- default : " {{ package_github_repo.split('/')[0] if package_github_repo else '' }}"
60+ default : " {{ _copier_conf.dst_path | realpath | basename }}"
5561 when : false
5662
57- package_name :
63+ github_user :
5864 type : str
59- help : " What is the name of the package?"
60- default : " {{ _copier_conf.dst_path | basename }}"
61- validator : |
62- {% if package_name and not (package_name | regex_search('^[\w.-]+$')) %}
63- Must contain only alphanumeric characters and `_`, `-`, or `.`.
64- {% endif %}
65+ help : " What is the name of the GitHub user or organisation where the repository will be or is stored?"
66+ default : " {{ 'seedcase-project' if is_seedcase_project else '' }}"
6567
66- package_name_snake_case :
68+ hosting_provider :
6769 type : str
68- default : " {{package_name | replace('-', '_') | replace('.', '_')}}"
69- when : false
70-
71- is_seedcase_project :
72- type : bool
73- help : " Is this package part of the Seedcase Project?"
74- default : " {{ github_user == 'seedcase-project' }}"
70+ help : " What hosting provider will you use for the documentation website?"
71+ choices :
72+ - netlify
73+ - gh-pages
7574
7675homepage :
7776 type : str
7877 help : " What is the homepage of your project?"
79- default : " {{ 'https://%s.seedcase-project.org' % package_name if is_seedcase_project else '' }}"
78+ default : " {{ 'https://%s.seedcase-project.org' % github_repo if is_seedcase_project else '' }}"
8079
8180author_given_name :
8281 type : str
@@ -103,6 +102,16 @@ github_board_number:
103102 The board number must be an integer.
104103 {% endif %}
105104
105+ github_repo_snake_case :
106+ type : str
107+ default : " {{github_repo | replace('-', '_') | replace('.', '_')}}"
108+ when : false
109+
110+ github_repo_spec :
111+ type : str
112+ default : " {{ github_user }}/{{ github_repo }}"
113+ when : false
114+
106115copyright_year :
107116 type : str
108117 default : " {{ copyright_year | default('%Y' | strftime) }}"
0 commit comments