You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01_version_control/my_favorite_neat_little_git_trick_demo.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,19 @@
21
21
- Use `git switch -c <branch-name>` to create a new branch and immediately check it out!
22
22
- Don't get stuck thinking that branches are only used as feature branches or issue branches! You can always create a short-lived temporary branch for something small, like shelving an experimental change.
23
23
- If a temporary branch is still too much overhead for you, you can instantly stash your local changes with `git stash`. Restore your stashed changes later with `git stash pop`.
24
+
- Prefer `git add -p` over `git add [FILE]`. This allows you to specify what you want to add to a commit in a more fine-grained manner
25
+
- A very nice alias for editing any earlier commit, without having to manually rebase:
26
+
27
+
```
28
+
[alias]
29
+
amend = "!f() { \
30
+
COMMIT=$(git rev-parse --short \"$1\") && \
31
+
git commit --fixup \"$COMMIT\" && \
32
+
GIT_SEQUENCE_EDITOR=true git rebase --autosquash --autostash --interactive "$COMMIT^"; \
33
+
}; f"
34
+
```
35
+
36
+
Usage: e.g. `git add -p ...` and then `git amend HEAD~5`. This would add the staged changes to the fifth last commit.
Copy file name to clipboardExpand all lines: 02_virtualization_and_containers/virtualmachines_containers_exercise.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,7 @@ This exercise consists of the following main steps:
83
83
- 2 GB virtual disk
84
84
- 1024 MB of memory
85
85
- 32 MB of video memory
86
+
- These specifications are for a server-only distribution. For a distribution with a Desktop environment (GUI), assign 4 GB of RAM and 8 GB of storage.
86
87
3. Installing a Linux distribution on the virtual machine with
87
88
- user called `USERNAME` (if your GitLab name is `@musterm`, then`musterm`)
88
89
- (host)name of the machine `USERNAMEvm` (e.g., `mustermvm`)
@@ -96,6 +97,8 @@ In the following subsections you will find additional instructions and explanati
96
97
97
98
By default, [download Alpine Linux](https://alpinelinux.org/downloads/). [Ubuntu Server](https://ubuntu.com/download/server) is also fine.
98
99
100
+
**Note:** If you are operating on an **ARM 64-bit architecture**, use **Ubuntu 25.10 (Desktop version)** or a later version, instead.
101
+
99
102
#### 2. Creating the Virtual Machine
100
103
101
104
While the installation image is downloading, you can already prepare the virtual machine.
@@ -152,6 +155,7 @@ Let's install `fastfetch` from the community repositories, instead:
152
155
- Enable the community repositories with `setup-apkrepos -c` and use the default settings
153
156
- Update the cache with `apk update`
154
157
- Install fastfetch with `apk add fastfetch`
158
+
- Run fastfetch with `fastfetch`
155
159
156
160
Continue to step 5.
157
161
@@ -163,6 +167,8 @@ Continue to step 5.
163
167
- Install `neofetch` via `sudo apt update && sudo apt install -y neofetch`. This command will download and install `neofetch` using the package manager [`apt`](https://wiki.debian.org/Apt).
164
168
- Clear the terminal using `clear` (or `Ctrl-L`) and run neofetch via by typing `neofetch` (or `fastfetch`) into the terminal and pressing `Enter`. It will show information about the Linux distribution version, available memory etc.
165
169
170
+
**Note:** If you are running **Ubuntu Desktop on an ARM 64-bit architecture**, you may encounter an error when trying to install `neofetch` (e.g., `E: Unable to locate package`). In this case, you can use `fastfetch` as an alternative, which can be installed via `apt`.
171
+
166
172
#### 5. Upload the Screenshot to SIM GitLab
167
173
168
174
- Take a screenshot via VirtualBox. At the top of the VirtualBox window you find the menu item `View`. There you find the option `Take Screenshot (Host+E)`. Save the screenshot as `screenshot-virtualbox-USERNAME.png`.
@@ -205,7 +211,7 @@ Fork and clone the repository mentioned above. The repository initially contains
205
211
206
212
- We want to start from scratch so initialize a new box using `vagrant init` inside this repository and add the resulting `Vagrantfile` to Git. Then adapt your `Vagrantfile` to incorporate the following settings:
207
213
- Your virtual machine should be based on the [`bento/ubuntu-24.04` image](https://portal.cloud.hashicorp.com/vagrant/discover/bento/ubuntu-24.04). In case you need a different provider (e.g., `libvirt`), feel free to use another box, but state this in your submission.
208
-
- The name of your VM should be `USERNAME-vm`.
214
+
- The name of your VM should be `USERNAME-vm-vagrant`.
209
215
- The VM must request [1024 MB of main memory](https://developer.hashicorp.com/vagrant/docs/providers/virtualbox/configuration).
210
216
- We want a [new shared folder](https://developer.hashicorp.com/vagrant/docs/synced-folders/basic_usage) in our virtual machine. The directory where the `Vagrantfile` resides, i.e. `.`, should be mounted by default as `/mnt/shared/`in your virtual machine.
211
217
- Run your box with `vagrant up` and make sure that everything works out as expected (`vagrant ssh`). If everything is fine, you can `exit` the VM. You do**not** have to stop/destroy the VM for the next step.
Copy file name to clipboardExpand all lines: 03_building_and_packaging/cmake_exercise.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,11 @@ In this exercise, we need to fight. Not everything always works smoothly. This i
4
4
5
5
To get an independent and reproducible environment as common ground, we use and, thus repeat, Docker.
6
6
7
-
Deadline: **Wednesday, November 27th, 2024, 9:00**
7
+
Deadline: **Wednesday, November 26th, 2025, 9:00**
8
8
9
9
## Overview
10
10
11
-
- The goal of the exercise is to open a pull request from a fork of [the CMake exercise repository](https://github.com/Simulation-Software-Engineering/cmake-exercise-wt2425). Please name your pull request `Add building and container recipes` and assign yourself.
11
+
- The goal of the exercise is to open a pull request from a fork of [the CMake exercise repository](https://github.com/Simulation-Software-Engineering/cmake-exercise). Please name your pull request `Add building and container recipes` and assign yourself.
12
12
- Your pull request should add a `Dockerfile` and a `CMakeLists.txt`, besides some minor changes in `main.cpp`, such as commenting in some code parts.
13
13
- From your pull request, it should be possible to create an executable container. After running the container, it should be possible to `cd` into `cmake-exercise` and then run the `build_and_run.sh` script.
14
14
- Use as many of the currently commented-out additional files, which induce additional dependencies.
Copy file name to clipboardExpand all lines: 03_building_and_packaging/intro_slides.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,72 +27,73 @@ slideOptions:
27
27
28
28
---
29
29
30
-
## Learning goals of chapter
30
+
## Learning Goals of Chapter
31
31
32
32
- Explain why software is packaged.
33
-
- Create Python packages, publish on PyPI, and install with pip.
33
+
- Create a distributable package of a Python code, publish on PyPI, and install with pip.
34
34
- Understand the difference between static and dynamic libraries and common ways of installation on Linux.
35
35
- Build C++ software and handle dependencies with Make and CMake.
36
36
- Package C++ software with CPack and create Debian packages.
37
37
- Create Spack packages, e.g., for high-performance computing systems with restricted access rights.
38
38
39
39
---
40
40
41
-
## What is packaging?
41
+
## What is Packaging?
42
42
43
43
- Bare code is often hard to understand for everyone except the developer(s).
44
44
- Packaging is a workflow to convert a code into a standardized distributable software.
45
-
- A code can be standardized in various ways. Some examples are
46
-
-creating a compact form by following a standardization.
47
-
-providing an installation recipe, for example, using CMake / make.
48
-
-bundling code into an app or software with some UI.
49
-
- We discuss **creating a compact form by following a standardization**.
45
+
- A code can be standardized in various ways. For example, by ...
46
+
-... providing an installation recipe, for example, using CMake / make.
47
+
-... bundling it into an app or software with a user interface.
48
+
-... packaging it according to an existing standard.
49
+
- We discuss **packaging a code according to an existing standard**.
50
50
51
51
---
52
52
53
-
## Why should we package code? 1/2
53
+
## Why Package Code? 1/2
54
54
55
-
- A bare code with many files typically has difficulties like
55
+
- A code with many files typically has difficulties like
56
56
- multiple dependencies and requirements of specific versions of dependencies.
57
57
- intricate compilation / installation steps which are hard to get right.
58
58
- missing or limited starting information / documentation, which means a high entry barrier.
59
59
60
60
---
61
61
62
-
## Why should we package code? 2/2
62
+
## Why Package Code? 2/2
63
63
64
64
- Create a package to
65
-
- benefit from a package index or package manager which is familiar for a broad audience.
65
+
- benefit from a package index or package manager which is familiar to a broad audience.
66
66
- benefit from automated handling of dependencies of package managers.
67
67
- have ease of distribution and maintenance due to standardization.
68
68
- increase overall usability and sustainability of your code.
69
69
70
70
---
71
71
72
-
## How to package code?
72
+
## How to Package Code?
73
73
74
74
- First step is finding the right standard for your code.
75
75
- There are several options:
76
-
-One of the many Linux package managers: apt, dpkg, yum, RPM and many more ...
77
-
-[CMake](https://cmake.org/) <span>: building / installation / packaging tool mostly for C, C++ projects<!-- .element: class="fragment" data-fragment-index="1" --></span>
78
-
-[Spack](https://spack.io/) <span>: a package management tool mostly for supercomputing centers<!-- .element: class="fragment" data-fragment-index="1" --></span>
79
-
-[Conan](https://conan.io/) <span>: open-source package manager for C and C++ development<!-- .element: class="fragment" data-fragment-index="1" --></span>
80
-
-[PyPI](https://pypi.org/) and [pip](https://pypi.org/project/pip/)
76
+
- Linux package managers: apt, dpkg, yum, RPM, etc.
77
+
-[CMake](https://cmake.org/)
78
+
-[Spack](https://spack.io/)
79
+
-[Conan](https://conan.io/)
80
+
-[pip](https://pypi.org/project/pip/)
81
81
-[Conda](https://docs.conda.io/en/latest/)
82
+
- and many more ...
82
83
83
84
---
84
85
85
-
## Why do we look at packaging a Python code?
86
+
## Why Packaging a Python Code?
86
87
87
88
- Python is easy to understand and widely used in research software.
88
-
-A well established packaging workflow already exists in the Python community.
89
-
-Various examples of packaged codes already exist: [NumPy](https://pypi.org/project/numpy/), [SciPy](https://pypi.org/project/scipy/), [PyTorch](https://pypi.org/project/torch/) and more ...
89
+
-Well established package managers and packaging tools already exist in the Python community.
90
+
-Many famous examples: [NumPy](https://pypi.org/project/numpy/), [SciPy](https://pypi.org/project/scipy/), [PyTorch](https://pypi.org/project/torch/).
90
91
91
92
---
92
93
93
-
## Key takeaways
94
+
## Key Takeaways
94
95
95
96
- Packaging or creating build recipe of a code is a standardized process.
96
97
- Many options in packaging / building tools.
97
98
- Most of these tools / methods are customized for use cases.
98
-
- In this lecture we will concentrate on packaging of Python code.
99
+
- In this lecture, we concentrate on packaging of Python code.
0 commit comments