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
{{ message }}
Repository navigation
Commit 1825796
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: 01_version_control/git_exercise.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,25 @@ Deadline: **Wednesday, October 28, 2026, 9:00**
9
9
- Add a branch protection rule for the `main` branch of the repository:
10
10
- Require a pull request before merging
11
11
- Require linear history
12
-
- Finally, everybody forks the repository into their own namespace.
12
+
- Finally, both of you should fork the repository into your own namespace.
13
13
14
14
## Idea of the Exercise
15
15
16
16
- There are three separate exercises. Each one consists of an individual Python file `exerciseX.py`. The exercises build upon each other, work from one to three. Each exercise is described in the comments at the top of the respective Python file.
17
17
- Each exercise has two tasks: A and B. Distribute the two tasks and **work on them in parallel**.
18
18
- For each task, create a new branch with an appropriate name (e.g., `ex-1-task-A`) and use appropriate commit messages (not `Solve task A`, but `Fix missing copy in Vector construction` or similar).
19
-
- When ready, push the new branch via `git push -u <remote> <branchname>` to your own remote and open a pull request to the `main` branch upstream (i.e. use the feature branch workflow, but with feature branches on forks).
20
-
- Assign your partner as reviewer. Review, fix problems, and eventually merge. For the best learning experience, use a different order of steps in every exercise.
19
+
- When ready, push the new branch via `git push -u <remote> <branchname>` to your own remote and open a pull request to the `main` branch upstream (i.e., use the feature branch workflow, but with feature branches on forks).
20
+
- Assign your partner as reviewer. Review, fix any problems, and eventually merge. For the best learning experience, use a different order of steps in every exercise.
21
21
-**Goal of the exercises**: Create a linear history with readable commit messages.
22
22
23
23
## Pytest and Python
24
24
25
25
- In each task, you typically need to make one of already existing tests pass. We use `pytest` here (you will learn more about `pytest` after Christmas):
26
-
- Install from [PyPI](https://pypi.org/project/pytest/): `pip install --user pytest`.
26
+
- Make a Python virtual environment: `python -m venv venv` and activate it: `source venv/bin/activate`.
27
+
- Install `pytest` from [PyPI](https://pypi.org/project/pytest/): `pip install pytest`.
27
28
- Run all tests of a file with `python3 -m pytest exerciseX.py`.
28
-
- Run a specific test with `python3 -m pytest exerciseX.py -k TESTNAME`.
29
-
- Ask if you are stuck with Python issues (quick search on Google often helps as well). This exercise is about Git, not Python.
29
+
- Run a specific test with `python3 -m pytest exerciseX.py -k TESTNAME` (e.g., `-k test_vector_index_access`).
30
+
- Ask if you are stuck with Python issues! This exercise is about Git, not Python.
0 commit comments