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
1414 Next steps:
1515
@@ -40,38 +40,20 @@ _message_after_copy: |
4040 $ just list-todos
4141
4242# 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 %}
43+ is_seedcase_project :
44+ type : bool
45+ help : " Is this package part of the Seedcase Project?"
46+ default : true
5147
52- github_user :
48+ github_repo :
5349 type : str
54- default : " {{ package_github_repo.split('/')[0] if package_github_repo else '' }}"
50+ default : " {{ _copier_conf.dst_path | realpath | basename }}"
5551 when : false
5652
57- package_name :
53+ github_user :
5854 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-
66- package_name_snake_case :
67- 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' }}"
55+ help : " What is the name of the GitHub user or organisation where the repository will be or is stored?"
56+ default : " {{ 'seedcase-project' if is_seedcase_project else '' }}"
7557
7658hosting_provider :
7759 type : str
@@ -83,7 +65,7 @@ hosting_provider:
8365homepage :
8466 type : str
8567 help : " What is the homepage of your project?"
86- default : " {{ 'https://%s.seedcase-project.org' % package_name if is_seedcase_project else '' }}"
68+ default : " {{ 'https://%s.seedcase-project.org' % github_repo if is_seedcase_project else '' }}"
8769
8870author_given_name :
8971 type : str
@@ -110,6 +92,16 @@ github_board_number:
11092 The board number must be an integer.
11193 {% endif %}
11294
95+ github_repo_snake_case :
96+ type : str
97+ default : " {{github_repo | replace('-', '_') | replace('.', '_')}}"
98+ when : false
99+
100+ github_repo_spec :
101+ type : str
102+ default : " {{ github_user }}/{{ github_repo }}"
103+ when : false
104+
113105copyright_year :
114106 type : str
115107 default : " {{ copyright_year | default('%Y' | strftime) }}"
0 commit comments