Skip to content

Commit 9567d9d

Browse files
committed
Tweak hands-on.md
1 parent 61a2a30 commit 9567d9d

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

docs/contributing/hands-on.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ nav_order: 1
77
1. TOC
88
{:toc}
99

10+
## What is a hands-on?
11+
12+
[Lessons accompanying Git-Mastery App](https://nus-cs2103-ay2526s1.github.io/website/se-book-adapted/git-trail/index.html) contains hands-on practicals for students to get 'hands-on' experience of the Git concepts covered by the lesson. Some of those hands-on practicals need to set up a 'sandbox' containing the required folders, files, repos before the student can do the practical. Git-Mastery app can set up that sandbox for students so that they can get to the 'practical' part more easily (we refer to this as 'downloading' the hands-on), without having to set up the sandbox manually. For example, a student can run `gitmastery download <hands-on name>` (e.g., `gitmastery download hp-init-repo`) to set up the sandbox for a specific hands-on practical.
13+
14+
Some examples of how Git-Mastery app helps to create the sandbox for a hands-on practical can be seen in [this Git Tour](https://nus-cs2103-ay2526s1.github.io/website/book/gitAndGithub/trail/recordingFolderHistory/index.html) (see T1L3, T1L4).
15+
1016
## Before contributing
1117

12-
If you are proposing a new hands-on (i.e., not implementing an [already approved hands-on proposal](https://github.com/git-mastery/exercises/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22hands-on%20discussion%22%20label%3A%22help%20wanted%22)) make sure that you have done the following:
18+
New contributors are recommended to start by implementing an [already approved hands-on proposal]((https://github.com/git-mastery/exercises/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22hands-on%20discussion%22%20label%3A%22help%20wanted%22)).
19+
20+
If you are proposing a new hands-on instead, make sure that you have done the following:
1321

1422
- [ ] Create an [hands-on discussion](https://github.com/git-mastery/exercises/issues/new?template=hands_on_discussion.yaml)
1523
- [ ] Obtain approval on the hands-on
1624
- [ ] File a [remote repository request](https://github.com/git-mastery/exercises/issues/new?template=request_exercise_repository.yaml)
1725

18-
## Create a new hands-on
26+
## Implementing a hands-on
1927

20-
Use the provided `new.sh` script to generate the scaffolding for a new exercise:
28+
First, run the provided `new.sh` script to generate the scaffolding for a new hands-on sandbox:
2129

2230
```bash
2331
./new.sh
@@ -37,17 +45,16 @@ Then, the script will prompt you for:
3745

3846
Refer to the [hands-on structure document](/developers/docs/architecture/hands-on-structure) for more information about the folder structure generated.
3947

40-
## Download setup
4148

42-
Hands-on downloads are all single-file stored in `hands_on/`. The `<hands on name>.py` contains the instructions to setup the local repository.
49+
Each hands-on is implemented as a single file `hands_on/<hands-on name>.py`, containing the instructions to set up the hands-on sandbox .
4350

4451
{: .reference }
4552

46-
For more information about how Git-Mastery downloads hands-on, refer to the [Download Workflow](/developers/docs/architecture/download-workflow)
53+
For more information about how Git-Mastery downloads a hands-on, refer to the [Download Workflow](/developers/docs/architecture/download-workflow)
4754

4855
{: .note }
4956

50-
> `exercises` comes with a set of utility functions in the `exercise_utils` module that are made available during the download flow. They provide simple wrappers around common functionality such as `exercise_utils.cli.run_command` to invoke any command and `exercise_utils.file.create_or_update_file` to create or update a given file.
57+
> `exercises` repo comes with a set of utility functions in the `exercise_utils` module that are made available during the download flow. They provide simple wrappers around common functionality such as `exercise_utils.cli.run_command` to invoke any command and `exercise_utils.file.create_or_update_file` to create or update a given file.
5158
>
5259
> For the full list of utility functions, refer [here](/developers/docs/tooling/exercise-utils).
5360
@@ -57,26 +64,26 @@ These are some references for download setups for other exercises:
5764
- [add-files](https://raw.githubusercontent.com/git-mastery/exercises/refs/heads/main/hands_on/add_files.py)
5865
- [stage-modified](https://raw.githubusercontent.com/git-mastery/exercises/refs/heads/main/hands_on/stage_modified.py)
5966

60-
### Download conventions
67+
### Conventions
6168

62-
1. Any operations should use OS agnostic options (e.g. opting to use `shutil.rmtree` over `run_command(["rm"])`)
63-
2. For any commands that require `gh` (Github CLI), make sure that the `__requires_github__` variable in the download setup is set to `True` so that the app will automatically check that the student has correctly setup Github CLI
69+
1. Any operations should use OS-agnostic options (e.g. opting to use `shutil.rmtree` over `run_command(["rm"])`)
70+
2. For any commands that require `gh` (GitHub CLI), make sure that the `__requires_github__` variable in the download setup is set to `True` so that the app will automatically check that the student has correctly setup Github CLI
6471

6572
### Testing downloads
6673

6774
To test that your download script works, we have provided a script to simulate the download process in this repository for you to verify.
6875

6976
```bash
70-
./test-download.sh <your hands-on name>
77+
./test-download.sh <hands-on name>
7178
```
7279

73-
You can find the downloaded repository under the `test-downloads/` folder.
80+
You can find the sandbox created by the script under the `test-downloads/` folder. Check it manually to verify it is as expected.
7481

7582
## Submitting the hands-on for review
7683

7784
Create a pull request from your fork using the provided pull request template.
7885

79-
Fill in all of the details necessary.
86+
Fill in all the details necessary.
8087

8188
## Example
8289

0 commit comments

Comments
 (0)