From 399d6f34e970251f00e4e401d10b9a266602e20b Mon Sep 17 00:00:00 2001
From: mcla <mcla@dtu.dk>
Date: Mon, 19 Jun 2023 15:45:51 +0200
Subject: [PATCH] cache

---
 .gitlab-ci.yml       | 36 +++++++++++++++++++++++-------------
 pg_cs/weeks/week1.md |  2 +-
 pg_cs/weeks/week2.md |  2 +-
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b71b40e..a71bfa9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,19 +1,25 @@
-image: python:latest
+image: python:3.9-slim-bullseye
 
-# variables:
-#   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+# Change pip's cache directory to be inside the project directory since we can
+# only cache local items.
+variables:
+  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
 
-# cache:
-#   paths:
-#     - .cache/pip
-#     - venv/
+# Pip's cache doesn't store the python packages
+# https://pip.pypa.io/en/stable/topics/caching/
+#
+# If you want to also cache the installed packages, you have to install
+# them in a virtualenv and cache it as well.
+cache:
+  paths:
+    - .cache/pip
+    - venv/
 
-# before_script:
-#   - python -V
-# lav venv miljø med venv, ikke virtualenv
-#  - pip install virtualenv
-#  - virtualenv venv
-#  - source venv/bin/activate
+before_script:
+  - python --version ; pip --version  # For debugging
+  - pip install virtualenv
+  - virtualenv venv
+  - source venv/bin/activate
 
 pages:
   script:
@@ -24,5 +30,9 @@ pages:
     paths:
       - public
     expire_in: 4 weeks
+  tags:
+    - runner1
   only:
     - main
+
+# DO deploy
diff --git a/pg_cs/weeks/week1.md b/pg_cs/weeks/week1.md
index 7c7f692..c74b9e2 100644
--- a/pg_cs/weeks/week1.md
+++ b/pg_cs/weeks/week1.md
@@ -3,7 +3,7 @@
 Today we shall explore the algebraic rules of real numbers already known from high school. We will recap on the relevant rules and then look at how they unfold on the larger set of complex numbers. How is problem solving carried out when switching from a solely real to a complex context?
 
 <div>
-<iframe src="https://panopto.dtu.dk/Panopto/Pages/Embed.aspx?id=3b8edf2f-6c34-4f10-bea6-af9e00c4bae5&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&start=0&interactivity=none" height="405" width="720" style="border: 1px solid #464646;" allowfullscreen allow="autoplay"></iframe>
+<iframe src="https://panopto.dtu.dk/Panopto/Pages/Embed.aspx?id=e84b6235-30be-44dd-b388-af9d011333f4&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&start=0&interactivity=none" height="405" width="720" style="border: 1px solid #464646;" allowfullscreen allow="autoplay"></iframe>
 </div>  
 
 Properties of real numbers and of complex numbers. The hierarchy of the arithmetic rules. Brackets. Fractions. The square theorems. The Pythagorian Theorem. The quadratic formula. Absolute values. Number sets and their symbols.  
diff --git a/pg_cs/weeks/week2.md b/pg_cs/weeks/week2.md
index 89d9fca..dd5f49c 100644
--- a/pg_cs/weeks/week2.md
+++ b/pg_cs/weeks/week2.md
@@ -3,7 +3,7 @@
 The first semester of Advanced Engineering Mathematics 1 is a coherent course in **linear algebra** and **linear differential equations**. Complex numbers and elementary complex functions are an important part of the  basis for this theory. Therefore the first few weeks of the course are dedicated to the study of complex numbers. Today we will introduce the complex numbers as a new set of numbers belonging to the well-known family of number sets and we will work out how to write a complex number in its so-called *rectangular form*.
 
 <div>
-<iframe src="https://panopto.dtu.dk/Panopto/Pages/Embed.aspx?id=3193233b-9d27-4668-91b3-afa3009419a1&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&start=0&interactivity=none" height="405" width="720" style="border: 1px solid #464646;" allowfullscreen allow="autoplay"></iframe>
+<iframe src="https://panopto.dtu.dk/Panopto/Pages/Embed.aspx?id=e84b6235-30be-44dd-b388-af9d011333f4&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&start=0&interactivity=none" height="405" width="720" style="border: 1px solid #464646;" allowfullscreen allow="autoplay"></iframe>
 </div>  
 
 First and foremost it is important to practise computations with complex numbers to become familiar with them so they won't be dreaded when they show up in future mathematical topics.
-- 
GitLab