Implementation of exercises for the DTU Python Support Team.
Go to file
Sofus Albert Høgsbro Rose 6d72287d07
feat: Working exercise implementation.
Small things may be missing, but this is the gist of it.
All runs in rootless container images (who think internally that they
are root).
2023-08-24 13:48:06 +02:00
exer_1/exer_1_2 feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00
exer_2 feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00
exer_3 feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00
exer_6 feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00
README.md feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00
run.sh feat: Working exercise implementation. 2023-08-24 13:48:06 +02:00

README.md

DTU Python Support Exercises

Implements the exercises at https://pythonsupport.dtu.dk/internal/exercises.html.

You'll need:

  • bash: To run the .sh script.
  • podman: To run the exercises in rootless containers.
  • python3, python3-pip, python3-future: To pass Exercise 4 (too lazy to containerize pip show).

Running the Exercises

Each exercise will run the corresponding run.sh in a rootless container, with bash -x (so you can see what they're doing exactly).

To run them all, run:

for exer in { exer_1_2 exer_2 exer_3 exer_4 exer_5 exer_6 exer_7 exer_8 }; do
	./run.sh $exer
done

Each exercise will exit into a bash shell within the container, so you can play around.

NOTE: Exercise 3 should fail, as numpy==1.23 is not compatible with Python 3.11.

NOTE: Exercise 4 will fail if system-level pip and future isn't installed.

Reuse

These run.sh files can be used as templates for the described end-to-end installation procedure. Note the MIT license.

Running with Non-Debian Image

This may be useful for testing / as a baseline for testing installation procedures on any OS.

In run.sh, simply replace

IMAGE="docker.io/debian:bookworm-slim"

with the Docker image of the OS you wish to test.