From 98d409e54d36b6e63d5caae6426d4ec350614ce7 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 14 May 2026 21:40:30 +0200 Subject: [PATCH 1/5] Add GitHub Actions workflow for rendering slides --- .github/workflows/render.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/render.yml diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml new file mode 100644 index 0000000..0d79310 --- /dev/null +++ b/.github/workflows/render.yml @@ -0,0 +1,36 @@ +name: render + +defaults: + run: + shell: bash -ex {0} + +on: + push: + branches: [ main ] + paths-ignore: + - README.md + pull_request: + branches: [ main ] + paths-ignore: + - README.md + +jobs: + render: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: "3.13" + - name: Install Python deps + shell: bash + run: | + python -m pip install nbformat nbclient pyyaml + - uses: quarto-dev/quarto-actions/setup@v2 + - run: slides.ipynb --execute --to revealjs From 5a54ac91ad46cb0ecac1a09e7950b1ed15c29512 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 14 May 2026 21:44:37 +0200 Subject: [PATCH 2/5] fix cmd --- .github/workflows/render.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index 0d79310..b16854c 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -33,4 +33,4 @@ jobs: run: | python -m pip install nbformat nbclient pyyaml - uses: quarto-dev/quarto-actions/setup@v2 - - run: slides.ipynb --execute --to revealjs + - run: quarto render slides.ipynb --execute --to revealjs From 64caffc010a144096439f055b7ee20eb6bbac4d2 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 14 May 2026 21:46:12 +0200 Subject: [PATCH 3/5] Add ipykernel to Python dependencies installation --- .github/workflows/render.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index b16854c..2d58e23 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -31,6 +31,6 @@ jobs: - name: Install Python deps shell: bash run: | - python -m pip install nbformat nbclient pyyaml + python -m pip install nbformat nbclient pyyaml ipykernel - uses: quarto-dev/quarto-actions/setup@v2 - run: quarto render slides.ipynb --execute --to revealjs From 2a2ee000fd23aa32f618424d6ba9b7be1eb5fe6a Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 14 May 2026 22:22:54 +0200 Subject: [PATCH 4/5] Add matplotlib installation cell to slides Added a code cell to install matplotlib dependencies. --- slides.ipynb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/slides.ipynb b/slides.ipynb index 9aa4f4f..2311089 100644 --- a/slides.ipynb +++ b/slides.ipynb @@ -20,6 +20,18 @@ "---" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "8b6ce59b082dd54c", + "metadata": {}, + "outputs": [], + "source": [ + "# | include: false\n", + "# install dependencies for the code in this document (add packages here if importing something new)\n", + "!pip install --quiet matplotlib" + ] + }, { "cell_type": "code", "execution_count": 1, From beb7c160d7fcc5866c13141596533d2cec3d98c4 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Thu, 14 May 2026 22:33:59 +0200 Subject: [PATCH 5/5] Add environment variable for Windows runners --- .github/workflows/render.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/render.yml b/.github/workflows/render.yml index 2d58e23..d93fca4 100644 --- a/.github/workflows/render.yml +++ b/.github/workflows/render.yml @@ -33,4 +33,7 @@ jobs: run: | python -m pip install nbformat nbclient pyyaml ipykernel - uses: quarto-dev/quarto-actions/setup@v2 + - if: runner.os == 'Windows' + shell: bash + run: echo "QUARTO_PYTHON=python" >> $GITHUB_ENV - run: quarto render slides.ipynb --execute --to revealjs