Skip to content

Commit 8c20c35

Browse files
authored
Restructuring: new folder structure which is more accessible (Simulation-Software-Engineering#67)
* New folder structure * Add draft for new README in 00_organization * Tabular format for chapter README * Restructuring building_and_packaging chapter * Correct README in building_and_packaging * Rectifying table in building_and_packaging * overview --> README for version control chapter * Renaming vm containers exercise file * Remvoing demos from README and making separate files * Updating PDF creation workflow depending on new file names * Moving git basics in a files _demo.md * Updating markdown creation list * Updating main README * Further corrections to files * Removing packaging keyword from all file names * Separating git trick demo * Splitting git and containers demo into smaller parts * Modifying links in the timetable * Add GitHub action to check links * Remove cron job schedule fron check-links action * Removing build/ directory from CMake example * Removing debian from file name * Consistency in intro file names * Remove code added unintentionally * Remove CMakeLists.txt from exercise * Adding documentation chapter to new structure * Changing to linkchecker GitHub action from SSE/homepage repo * Modifying linkchecker action so that it finds all markdown files in the repo * Adding more options to awesome_bot command in linkchecker Action
1 parent 97ae2f3 commit 8c20c35

File tree

89 files changed

+775
-888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+775
-888
lines changed

.github/workflows/create-pdfs-from-markdown.yml

+2-10
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ jobs:
2626
name: slides
2727
path: slides
2828
retention-days: 7
29-
- name: Compile PDFs (texts)
30-
run: |
31-
./scripts/create-pdf-from-markdown.sh text
32-
- uses: actions/upload-artifact@master
33-
with:
34-
name: texts
35-
path: texts
36-
retention-days: 7
3729
- name: Compile PDFs (quizzes)
3830
run: |
3931
./scripts/create-pdf-from-markdown.sh quiz
@@ -50,9 +42,9 @@ jobs:
5042
name: texts
5143
path: texts
5244
retention-days: 7
53-
- name: Compile PDFs (notes)
45+
- name: Compile PDFs (demos)
5446
run: |
55-
./scripts/create-pdf-from-markdown.sh notes
47+
./scripts/create-pdf-from-markdown.sh demo
5648
- uses: actions/upload-artifact@master
5749
with:
5850
name: texts

.github/workflows/linkchecker.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Link checker
2+
3+
on:
4+
push:
5+
branches: [ '*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Ruby 2.6
17+
uses: actions/setup-ruby@v1
18+
with:
19+
ruby-version: 2.6.x
20+
- name: Check links
21+
#FIXME Need to allow duplicates (same links on the same page)
22+
run: |
23+
gem install awesome_bot
24+
awesome_bot --white-list https://gitlab-sim.informatik.uni-stuttgart.de/ --allow-ssl --allow-redirect --allow-dupe $(find . -iname "*.md" -type f)

00_organization/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Organization and Introduction to Research Software Engineering
2+
3+
Learning goals:
4+
5+
- Lecture, lab organization, and the challenge
6+
- What is research software engineering and what is special about it?
7+
- Why do we need research software engineering?
8+
9+
| Duration | Content |
10+
| --- | --- |
11+
| 20 minutes | [`challenge_intro_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/00_organization/challenge_intro_slides.md) |
12+
| 40 minutes | [`course_intro_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/00_organization/course_intro_slides.md) |
13+
| 10 minutes | [`organizational_remarks_week3_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/00_organization/organizational_remarks_week3_slides.md) |
14+
| 5 minutes | [`organizational_remarks_week7_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/00_organization/organizational_remarks_week7_slides.md) |
15+
| 15 minutes | [`rse_basics.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/organization/material/rse_basics_slides.md) |

01_version_control/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Git -- the standard version control system
2+
3+
Learning goals:
4+
5+
- Refresh and organize students' existing knowledge on git (learn how to learn more).
6+
- Students can explain difference between merge and rebase and when to use what.
7+
- How to use git workflows to organize research software development in a team.
8+
- Get to know a few useful GitHub/GitLab standards and a few helpful tools.
9+
10+
| Duration | Content |
11+
| --- | --- |
12+
| 75 minutes | [`cheat_sheet_exercise.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/cheat_sheet_exercise.md) |
13+
| 30 minutes | [`git_quiz.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/git_quiz.md) |
14+
| 40 minutes | [`git_basics_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/git_basics_demo.md)
15+
| 30-45 minutes| [`my_favorite_neat_little_git_trick_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/my_favorite_neat_little_git_trick_demo.md) |
16+
| 15 minutes | [`intro_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/intro_slides.md) |
17+
| 25 minutes | [`merge_rebase_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/merge_rebase_slides.md) |
18+
| 10 minutes | [`standards_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/standards_slides.md) |
19+
| 20 minutes | [`workflow_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/01_version_control/workflow_slides.md) |

01_version_control/git_basics_demo.md

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Git Demo
2+
3+
## Recap of Git basics
4+
5+
- Expert level poll on git: ask students to estimate their level.
6+
- Beginner: I have hardly ever used Git
7+
- User: pull, commit, push, status, diff
8+
- Developer: fork, branch, merge, checkout
9+
- Maintainer: rebase, squash, cherry-pick, bisect
10+
- Owner: submodules
11+
12+
![git overview picture from py-rse](https://merely-useful.tech/py-rse/figures/git-cmdline/git-remote.png)
13+
14+
- `git --help`, `git commit --help`
15+
- incomplete statement `git comm`
16+
17+
- There is a difference between Git and hosting services ([*forges*](https://en.wikipedia.org/wiki/Forge_(software)))
18+
- [GitHub](https://github.com/)
19+
- [GitLab](https://about.gitlab.com/), open-source, hosted e.g. at [IPVS](https://gitlab-sim.informatik.uni-stuttgart.de)
20+
- [Bitbucket](https://bitbucket.org/product/)
21+
- [SourceForge](https://sourceforge.net/)
22+
- many more
23+
- often, more than just hosting, also DevOps
24+
25+
- Give outlook on remainder of Git chapter: *How I work with Git*, quiz, advanced topics (workflows, rebase, standards), *my neat little Git trick*
26+
27+
## How I work with Git
28+
29+
Starting remarks:
30+
31+
- There is not *the one solution* how to do things with Git. I simply show what I typically use.
32+
- Don't use a client if you don't understand the command line `git`
33+
34+
- (1) Look at GitHub
35+
- [preCICE repository](https://github.com/precice/precice)
36+
- default branch `develop`
37+
- fork -> my fork
38+
39+
- (2) Working directory:
40+
- ZSH shell shows git branches
41+
- `git remote -v` (I have upstream, myfork, ...)
42+
- mention difference between ssh and https (also see GitHub)
43+
- get newest changes `git pull upstream develop`
44+
- `git log` -> I use special format, see `~/.gitconfig`,
45+
- check log on GitHub; explain short hash
46+
- `git branch`
47+
- `git branch add-demo-feature`
48+
- `git checkout add-demo-feature`
49+
50+
- (3) First commit
51+
- `git status` -> always tells you what you can do
52+
- `vi src/action/Action.hpp` -> add `#include "MagicHeader.hpp"`
53+
- `git diff`, `git diff src/com/Action.hpp`, `git diff --color-words`
54+
- `git status`, `git add`, `git status`
55+
- `git commit` -> "Include MagicHeader in Action.hpp"
56+
- `git status`, `git log`, `git log -p`, `git show`
57+
58+
- (4) Change or revert things
59+
- I forgot to add sth: `git reset --soft HEAD~1`, `git status`
60+
- `git diff`, `git diff HEAD` because already staged
61+
- `git log`
62+
- `git commit`
63+
- actually all that is nonsense: `git reset --hard HEAD~1`
64+
- modify again, all nonsense before committing: `git checkout src/action/Action.hpp`
65+
66+
- (5) Stash
67+
- while working on unfinished feature, I need to change / test this other thing quickly, too lazy for commits / branches
68+
- `git stash`
69+
- `git stash pop`
70+
71+
- (6) Create PR
72+
- create commit again
73+
- preview what will be in PR: `git diff develop..add-demo-feature`
74+
- `git push -u myfork add-demo-feature` -> copy link
75+
- explain PR template
76+
- explain target branch
77+
- explain "Allow edits by maintainers"
78+
- cancel
79+
- my fork -> branches -> delete
80+
81+
- (7) Check out someone else's work
82+
- have a look at an existing PR, look at all tabs, show suggestion feature
83+
- but sometimes we want to really build and try sth out ...
84+
- `git remote -v`
85+
- `git remote add alex [email protected]:ajaust/precice.git` if I don't have remote already (or somebody else)
86+
- `git fetch alex`
87+
- `git checkout -t alex/[branch-name]`
88+
- I could now also push to `ajaust`'s remote
89+
90+
## Further reading
91+
92+
### Quick things
93+
94+
- [Video: Git in 15 minutes: basics, branching, no remote](https://www.youtube.com/watch?v=USjZcfj8yxE)
95+
- [The GitHub Blog: Commits are snapshots, not diffs](https://github.blog/2020-12-17-commits-are-snapshots-not-diffs/)
96+
- Chapters [6](https://merely-useful.tech/py-rse/git-cmdline.html) and [7](https://merely-useful.tech/py-rse/git-advanced.html) of Research Software Engineering with Python
97+
- [Podcast All Things Git: History of VC](https://www.allthingsgit.com/episodes/the_history_of_vc_with_eric_sink.html)
98+
- [git purr](https://girliemac.com/blog/2017/12/26/git-purr/)
99+
100+
### References
101+
102+
- [Official documentation](http://git-scm.com/doc)
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# My favorite neat little Git trick
2+
3+
- Students present in 3-5 mins their favorite *neat little Git trick* (a tool, a command, a configuration, a GitHub thing, ...).
4+
- Preparation should not take longer than 15 mins, should be a demo.
5+
- Lecturers also prepare some.
6+
7+
Collected examples:
8+
9+
- Click on line number on GitHub and then `blame` to study history of file
10+
- `git reflog` to resurrect accidentally deleted branches
11+
- GitHub uses [gitignore templates](https://github.com/github/gitignore) if you create a `.gitignore` file from GitHub
12+
- [GitExplorer](https://gitexplorer.com/): a nice way to generate important git command
13+
- Shortcut `t` to search project files on GitHub
14+
- Shortcut `ctrl` + `k` to never use mouse on GitHub again
15+
- `git effort` (from `git-extras`repository): Show effort statistics on file(s) in repository
16+
- `git commit -m "Title of commit" -d "Description of commit` to specify a commit message and description without going to vim
17+
- Use [aheadfork](https://github.com/mbomb007/aheadfork) to find GitHub forks that are ahead
18+
- Use [permanent links](https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet#linking-to-code) on GitHub to refer to and display code snippets in issues
19+
- Coding in the cloud with GitHub [Codespaces](https://github.com/features/codespaces) and VS Code: type `.` in a repository to jump into the editor
20+
- One can create empty commits, i.e. a commit without any changes, using the `--allow-empty` options. This can be useful for debugging, for example. The full command could look like this: `git commit --allow-empty -m 'This commit is empty'`
21+
- You can generate a list of contributors sorted by the number of contributions using `git shortlog --summary --numbered --email.
22+
- If you have some contributors with several different email addresse and/or configured names, you can merge them via aliases in a file called [`.mailmap`](https://git-scm.com/docs/gitmailmap) that should reside in the root of the repository.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Virtualization and Containers
2+
3+
Learning goals:
4+
5+
- What is the difference between virtualization and containers?
6+
- When to use virtual machines and when containers.
7+
- How to work with virtual machines (VirtualBox) and how to manage these with Vagrant.
8+
- Building containers with Docker and Singularity.
9+
- Understand pros and cons of different container technologies.
10+
- Student can set up their own containers tailored to their requirements.
11+
12+
| Duration | Content |
13+
| --- | --- |
14+
| 10 minutes | [`containers_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/container_slides.md), [`containers_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/container_demo.md) |
15+
| 10 minutes | [`containers_homework_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/containers_homework_slides.md) |
16+
| 65 minutes | [`docker_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/docker_slides.md), [`docker_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/docker_demo.md) |
17+
| 5 minutes | [`intro_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/intro_slides.md) |
18+
| 20 minutes | [`singularity_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/singularity_slides.md), [`singularity_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/singularity_demo.md) |
19+
| 25 minutes | [`vagrant_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/vagrant_slides.md) |
20+
| 40 minutes | [`virtualbox_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/virtualbox_slides.md), [`virtualbox_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/virtualbox_demo.md) |
21+
| 10 minutes | [`virtualmachines_slides.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/virtualmachines_slides.md), [`virtualmachines_demo.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/virtualmachines_demo.md) |
22+
| 90 minutes | [`virtualmachines_containers_exercise.md`](https://github.com/Simulation-Software-Engineering/Lecture-Material/blob/main/02_virtualization_and_containers/virtualmachines_containers_exercise.md) |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Containers Demo
2+
3+
## Introduction to Containers
4+
5+
- What are the differences between VMs and containers?
6+
- Containers
7+
- Low(er) overhead than virtual machines.
8+
- Container operates in "fenced off" part of the operating system (`cgroups`).
9+
- Container runs kernel of the host OS -> Does **not** run its own OS in.
10+
- Operating system (OS) needs to be compatible with underlying OS. Cannot run different OS than host. (TODO: Verify this)
11+
- **Note**: Windows 10 can run Linux containers! (Due to Windows Subsystem for Linux?!)
12+
- A process for which (and its childs) special rules apply.
13+
- Shortly recap what we have learned about containers.
14+
- Fenced-off, relies on capabilities of OS etc.
15+
- LXD/LXC and its container registry [Linux containers](https://linuxcontainers.org/)
16+
- Short and incomplete overview over container technologies: Docker, Singularity, lxc/lxd, podman...
17+
18+
## Concluding Remarks and Discussion about Learning Goals
19+
20+
- Virtual machines are a good abstraction layer that are very flexible. They can run different OS, can be moved etc. VirtualBox is a popular VM solution (hypervisor.)
21+
- There are tools like Vagrant to manage them more conveniently than with the GUI or CLI.
22+
- Containers are a light weight alternative to VMs. They are basically "special" processes that run more or less isolated. Therefore, they do not need to bring everything (kernel, libraries...) themselves, but rely on the functionalities of the Host. Example: Containers "run" on the same kernel as the Host. Cannot mix OSes (easily).
23+
- Docker is popular for container framework encapsulating environments and applications. We will use it also more for testing (CI/CD, DevOps). This will come in future lectures.
24+
- Singularity is a bit more "niche", but important in the computing/simulation business as it focuses on self-contained applications that can easily run on different platforms instead of isolation compared to Docker.
25+
- For the exercise you should ideally have Docker, VirtualBox, Vagrant (maybe Singularity installed).
26+
- Show slides from the intro with learning goals again.
27+
- Can you answer the questions now?
28+
29+
## Further Reading
30+
31+
### References
32+
33+
- [Docker documentation](https://docs.docker.com/)
34+
- [Singularity documentation](https://sylabs.io/docs/)
35+
36+
### Virtualization tools
37+
38+
- [VirtualBox](https://www.virtualbox.org/)
39+
- [VirtualBox Manual](https://www.virtualbox.org/manual/UserManual.html)
40+
- [Overview of different disk formats](https://www.parallels.com/blogs/ras/vdi-vs-vhd-vs-vmdk/)
41+
- [Ubuntu 18.04 virtual machine setup](https://codebots.com/docs/ubuntu-18-04-virtual-machine-setup)
42+
- [Vagrant](https://www.vagrantup.com/)
43+
44+
### Containers
45+
46+
- [Docker](https://www.docker.com/)
47+
- [Docker Hub](https://hub.docker.com/)
48+
- [Singularity](https://sylabs.io/)
49+
- [Sarus](https://user.cscs.ch/tools/containers/sarus/)
50+
- [lxc/lxd](https://linuxcontainers.org/)
51+
- [podman](https://podman.io/)
52+
- [Linux containers](https://linuxcontainers.org/)
53+
- Singularity paper: [Singularity: Scientific containers for mobility of compute](https://doi.org/10.1371/journal.pone.0177459)
54+
55+
### Other
56+
57+
- ["Should I use Vagrant or Docker for creating an isolated environment?"](https://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-for-creating-an-isolated-environment)
58+
- [Malicious Docker Hub Container Images Used for Cryptocurrency Mining](https://www.trendmicro.com/vinfo/fr/security/news/virtualization-and-cloud/malicious-docker-hub-container-images-cryptocurrency-mining)
59+
- ["How To Make Package Managers Cry"](https://archive.fosdem.org/2018/schedule/event/how_to_make_package_managers_cry/)
60+
- [Open Container Initiative (OCI)](https://opencontainers.org/)

0 commit comments

Comments
 (0)