Skip to content

Commit

Permalink
Update contributing guides
Browse files Browse the repository at this point in the history
Add section about slides. Add information on doing commits (inspired
from Operating Systems).

Signed-off-by: Razvan Deaconescu <[email protected]>
  • Loading branch information
razvand committed Dec 25, 2023
1 parent c43e11a commit 02c40d5
Showing 1 changed file with 55 additions and 3 deletions.
58 changes: 55 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Some good first steps and best practices when using Git are explained here:

* the Git Immersion tutorial: <https://gitimmersion.com/>
* the Atlassian tutorial: <https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud>
* this blog post on the ROSEdu Techblog: <https://techblog.rosedu.org/git-good-practices.html>
* this blog post on the `ROSEdu Techblog`: <https://techblog.rosedu.org/git-good-practices.html>

## Language

Expand All @@ -34,6 +34,19 @@ Use phrases like "find the flag", "run this command", "download the tool".
Use [draw.io](https://app.diagrams.net/) to create diagrams.
If using external images / diagram, make sure they use a CC BY-SA license and give credits (mention author and / or add link to the image source).

## Slides

Slides are to be written in Markdown, using [`reveal-md`](https://github.com/webpro/reveal-md), itself based on [`reveal-js`](https://revealjs.com/).
Use `reveal-md` and `reveal-js` specifics to split information in slides.
Aim to make slides attractive, sleek and simple to follow.

Images and diagrams would ideally be animated on slides.
Aim to use `reveal.js` features to animate drawing of diagrams.

If `reveal.js` drawing is difficult, use [draw.io](https://app.diagrams.net/) to create diagrams.
Ideally you would "animate" those diagrams by creating multiple incremental versions of the diagram and adding each to a slide;
when browsing slides pieces of these diagrams will "appear" and complete the final image, rendering an animation-like effect.

## Issues

When opening an issue, please clearly state the problem.
Expand All @@ -58,8 +71,47 @@ If there are multiple commits belonging to a given change, please squash the com

Also make sure one pull request covers only **one** topic.

### Commits

Before making a commit, configure your name and email locally using:

```bash
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
```

Then make sure the email you've just configured corresponds to the one you have [set on GitHub](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account).

After this, make your changes, `git add` them and then commit them using `git commit -s`.
Always sign your commits using the `-s` / `--signoff` arguments to `git commit`.
This will add the following line at the end of the commit message:

```text
Signed-off-by: Your Name <[email protected]>
```

Notice that the details above are the name and email that you configured earlier.

Now the `git commit` command will open your default editor and ask you to write a commit message.
Prefix each commit message title with the chapter it belongs to: `software-stack`, `data`, `compute`, `io`, `app-interact` and the component: `lecture` / `lab`.
An example of a prefix is `compute/lab:`.
Following the prefix, write a short and expressive title on the first line.
Use commit messages with verbs at imperative mood: "Add README", "Update contents", "Introduce feature".
Prefix each commit message with the chapter it belongs to: `software-stack`, `data`, `compute`, `io`, `app-interact`.

Leave an empty line, then add a relevant description of the changes made in that commit.
This description should include why that change is needed (fixes a bug, improves something that was inefficient, etc.).
Wrap the lines of this description to 75 characters.
How a good commit message should look like: <https://cbea.ms/git-commit/>
Below is an example of a good commit message:

```text
data/lab: Fix Makefile `CFLAGS` error
`CFLAGS` was incorrectly set to optimise the code to the `-O3` level. This
caused the function `vulnerable_func()` to be inlined into the caller
`main()`, making it impossible to overwrite `main()`'s return address with
that of `vulnerable_func()`. This commit fixes the issue by forcing the
compiler to not optimise the code by replacing `-O3` with `-O0` in `CFLAGS`
The use of `-s` / `--signoff` when creating a commit is optional, but strongly recommended.
Signed-off-by: Your Name <[email protected]>
```

0 comments on commit 02c40d5

Please sign in to comment.