@@ -4,30 +4,31 @@ title: "Guide"
44
55## Using
66
7- This template uses [ Copier] ( https://copier.readthedocs.io/ ) to create a folder
8- with relevant files for a rostools-structured workshop. We use
9- [ uv] ( https://docs.astral.sh/uv ) to run the commands, so you'll need to install
10- that first. After that, creating a new workshop project folder can be done with:
7+ This template uses [ Copier] ( https://copier.readthedocs.io/ ) to create a
8+ folder with relevant files for a rostools-structured workshop. We use
9+ [ uv] ( https://docs.astral.sh/uv ) to run the commands, so you'll need to
10+ install that first. After that, creating a new workshop project folder
11+ can be done with:
1112
12- ``` bash
13+ ``` bash
1314uvx copier copy gh:{{< meta gh.org > }}/{{< meta gh.repo > }} WORKSHOP-NAME
1415```
1516
16- Where ` WORKSHOP-NAME ` is the name of the folder you want to create. This will
17- copy the template files into that folder, and you can then edit them as needed.
18- When you use it, it will ask you a series of questions to correctly set up the
19- workshop folder.
17+ Where ` WORKSHOP-NAME ` is the name of the folder you want to create. This
18+ will copy the template files into that folder, and you can then edit
19+ them as needed. When you use it, it will ask you a series of questions
20+ to correctly set up the workshop folder.
2021
2122This guide provides an overview of how to use this template for creating
22- a new workshop repository. It includes instructions for using the template and
23- post-creation tasks.
23+ a new workshop repository. It includes instructions for using the
24+ template and post-creation tasks.
2425
2526## Installing
2627
2728In order to use this template, you need to install a few programs:
2829
29- - [ Python] ( https://www.python.org/ ) : Required by the template tool itself
30- (copier).
30+ - [ Python] ( https://www.python.org/ ) : Required by the template tool
31+ itself (copier).
3132- [ Git] ( https://git-scm.com/ ) : For version control and setting up Git
3233 to track the newly created data package.
3334- [ copier] ( https://copier.readthedocs.io/en/stable/#quick-start ) : The
@@ -50,11 +51,12 @@ pipx install copier uv rust-just
5051
5152## Creating a new workshop repository
5253
53- You can use this template to create a new workshop repository with a standard
54- set of files and folders, as well as all the features and configurations
55- to make it easier to build and develop your workshop more smoothly and
56- effectively. First, open a Terminal and move into the directory where
57- you want to create the new workshop repository. Then run the following command:
54+ You can use this template to create a new workshop repository with a
55+ standard set of files and folders, as well as all the features and
56+ configurations to make it easier to build and develop your workshop more
57+ smoothly and effectively. First, open a Terminal and move into the
58+ directory where you want to create the new workshop repository. Then run
59+ the following command:
5860
5961``` bash
6062# Copy into the current directory, which is the "."
@@ -73,42 +75,43 @@ option.
7375
7476## Applying the template to an existing workshop repository
7577
76- If you want to use this template on an existing workshop repository, you can
77- use the ` copy ` command of ` copier ` just like above to apply the template
78- to the existing workshop repository. This will add all the template's files and
79- configurations to the existing workshop repository.
78+ If you want to use this template on an existing workshop repository, you
79+ can use the ` copy ` command of ` copier ` just like above to apply the
80+ template to the existing workshop repository. This will add all the
81+ template's files and configurations to the existing workshop repository.
8082
8183``` bash
8284uvx copier copy --trust gh:{{< meta gh.org > }}/{{< meta gh.repo > }} .
8385```
8486
8587It will go through a series of prompts, as in the case of creating a new
86- workshop repository, including asking if you want to overwrite existing files.
88+ workshop repository, including asking if you want to overwrite existing
89+ files.
8790
8891::: callout-note
89- To use the ` copy ` command, the workshop repository needs to be tracked by Git
90- and in a clean state (no changes).
92+ To use the ` copy ` command, the workshop repository needs to be tracked
93+ by Git and in a clean state (no changes).
9194:::
9295
9396## Applying the latest template changes
9497
95- There are two ways to update an existing workshop repository with the latest
96- changes from the template: ` update ` and ` recopy ` .
98+ There are two ways to update an existing workshop repository with the
99+ latest changes from the template: ` update ` and ` recopy ` .
97100
98101Use ` update ` to apply template updates to your project without
99102overwriting local changes. ` update ` will compare the version of the
100103template you used when you first copied the template with the current
101104version of the template, and then apply the changes that are different.
102105This also means it won't overwrite any changes you made to files in your
103- current workshop repository, for example, if you deleted a file that was in the
104- template, it won't be copied back.
106+ current workshop repository, for example, if you deleted a file that was
107+ in the template, it won't be copied back.
105108
106109Use ` recopy ` if you want to reapply the template from scratch, which
107110will overwrite any changes you made to the files that were copied from
108- the template. This is useful if you want to reset the workshop repository to
109- the state of the template. For example, if you deleted a file but want
110- it back from the template or are simply curious to see if there are any
111- new changes that you might want to use.
111+ the template. This is useful if you want to reset the workshop
112+ repository to the state of the template. For example, if you deleted a
113+ file but want it back from the template or are simply curious to see if
114+ there are any new changes that you might want to use.
112115
113116In both cases, the commands are very similar and also use many of the
114117same options as the ` copy ` command. If you want to use the same answers
@@ -122,16 +125,23 @@ uvx copier update --trust --defaults
122125uvx copier recopy --trust --defaults
123126```
124127
125- As with the ` copy ` command, the workshop repository needs to be tracked by Git
126- and must be in a clean state (no changes) for the ` update ` and ` recopy `
127- commands to work.
128+ As with the ` copy ` command, the workshop repository needs to be tracked
129+ by Git and must be in a clean state (no changes) for the ` update ` and
130+ ` recopy ` commands to work.
128131
129132## Post-creation setup
130133
131- These steps are mainly for us in rostools to set up the
132- repository with the settings we use, but you can follow them if you want
133- to set up your workshop in a similar way. They are also included in
134- a message after you've copied the template.
134+ ::: callout-important
135+ These setup steps are for rostools workshops and are included here so
136+ that we don't forget what to do when making a workshop from this
137+ template. They don't really make sense for others to follow and are
138+ maybe a bit vague in how to do them. Try at your own risk! :zany:
139+ :::
140+
141+ These steps are mainly for us in rostools to set up the repository with
142+ the settings we use, but you can follow them if you want to set up your
143+ workshop in a similar way. They are also included in a message after
144+ you've copied the template.
135145
136146After copying the template, while in the directory of the new workshop
137147repository, run the following:
@@ -141,9 +151,9 @@ just install-precommit
141151```
142152
143153This sets up the pre-commit hooks to run standard checks on your
144- repository whenever you commit files to the history.
145- Next, install [ ` spaid ` ] ( https://github.com/seedcase-project/spaid ) and
146- use the following commands to run the next setup steps:
154+ repository whenever you commit files to the history. Next, install
155+ [ ` spaid ` ] ( https://github.com/seedcase-project/spaid ) and use the
156+ following commands to run the next setup steps:
147157
148158``` bash
149159spaid_gh_create_repo_from_local -h
@@ -157,7 +167,8 @@ GitHub workflows require installing GitHub Apps, for greater security
157167purposes and easier administration when managing multiple repositories.
158168The [ security
159169section] ( https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens )
160- in the Seedcase Project's [ Guidebook] ( https://guidebook.seedcase-project.org/ ) provides
170+ in the Seedcase Project's
171+ [ Guidebook] ( https://guidebook.seedcase-project.org/ ) provides
161172instructions on how to set up GitHub Apps, secrets, and variables.
162173Ideally the secrets and variables should be set up in the organization
163174settings. The specific workflows in this template that require this
@@ -173,7 +184,7 @@ additional setup are:
173184 GitHub App, along with the ` ADD_TO_BOARD_TOKEN ` secret and the
174185 ` ADD_TO_BOARD_APP_ID ` variable of the GitHub Apps' ID.
175186
176- Since the workshop websites are hosted on [ Netlify ] ( https://www.netlify.com/ ) ,
177- you will also need to connect the GitHub repository to Netlify as well as adding
178- a ` NETLIFY_AUTH_TOKEN ` secret to the GitHub repository (or ideally at the
179- organization level).
187+ Since the workshop websites are hosted on
188+ [ Netlify ] ( https://www.netlify.com/ ) , you will also need to connect the
189+ GitHub repository to Netlify as well as adding a ` NETLIFY_AUTH_TOKEN `
190+ secret to the GitHub repository (or ideally at the organization level).
0 commit comments