From d65b0add2b9710e2bef0bd7f05c0b9def2972bcc Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 07:32:43 +1100 Subject: [PATCH 01/12] check paths --- .github/workflows/ci.yml | 5 +++++ path.py | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 path.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f4f6fe14..7bfe9c098 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,11 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list + - name: Check LaTeX + shell: bash -l {0} + run: | + which pdflatex + python path.py - name: Download "build" folder (cache) uses: dawidd6/action-download-artifact@v2 with: diff --git a/path.py b/path.py new file mode 100644 index 000000000..feb1493ba --- /dev/null +++ b/path.py @@ -0,0 +1,2 @@ +import os +print(os.getenv("PATH")) \ No newline at end of file From 06901d9cdbff7c85205e7b15b02f6ee9c1b2df46 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 07:41:10 +1100 Subject: [PATCH 02/12] check mpl cache dir --- .github/workflows/ci.yml | 2 +- path.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bfe9c098..9ac697899 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: - name: Build HTML shell: bash -l {0} run: | - jb build -W --keep-going lectures --path-output ./ + jb build --keep-going lectures --path-output ./ - name: Save Build as Artifact uses: actions/upload-artifact@v1 with: diff --git a/path.py b/path.py index feb1493ba..e52bd38bd 100644 --- a/path.py +++ b/path.py @@ -1,2 +1,5 @@ import os -print(os.getenv("PATH")) \ No newline at end of file +print(os.getenv("PATH")) + +import matplotlib as mpl +print(mpl.get_cachedir()) \ No newline at end of file From 59f178ce73485cb5b2a3bfce8273aa9290321373 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 07:47:41 +1100 Subject: [PATCH 03/12] use plt.rc --- lectures/five_preferences.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/five_preferences.md b/lectures/five_preferences.md index cd8f13b74..3232014f2 100644 --- a/lectures/five_preferences.md +++ b/lectures/five_preferences.md @@ -76,7 +76,7 @@ from numba import njit %matplotlib inline %config InlineBackend.figure_format='retina' -rc('text', usetex=True) +plt.rc('text', usetex=True) label_size = 20 label_tick_size = 18 From 6e4926364c162e1412dfb0077af09b77dc7b47ea Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 09:43:48 +1100 Subject: [PATCH 04/12] remove tex cache --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ac697899..dc871cd4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,7 @@ jobs: jb build lectures --builder pdflatex --path-output ./ -n --keep-going mkdir -p _build/html/_pdf cp -u _build/latex/*.pdf _build/html/_pdf + rm /home/runner/.cache/matplotlib/tex.cache/* - name: Build Download Notebooks (sphinx-tojupyter) shell: bash -l {0} run: | From b3667a9c5b124673237be8ab2ec7f75c349a7bc6 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 10:02:00 +1100 Subject: [PATCH 05/12] add latex pacakges to fix matplotlib compat --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc871cd4e..2bedf1455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,9 @@ jobs: texlive-fonts-extra \ texlive-xetex \ latexmk \ - xindy + xindy \ + dvipng \ + cm-super - name: Display Conda Environment Versions shell: bash -l {0} run: conda list From 28f20960d54bfb1ef461a7caf56fd7ef77713328 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 10:37:51 +1100 Subject: [PATCH 06/12] remove debug --- .github/workflows/ci.yml | 8 +------- lectures/five_preferences.md | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bedf1455..8c6c9c75a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,11 +34,6 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list - - name: Check LaTeX - shell: bash -l {0} - run: | - which pdflatex - python path.py - name: Download "build" folder (cache) uses: dawidd6/action-download-artifact@v2 with: @@ -53,7 +48,6 @@ jobs: jb build lectures --builder pdflatex --path-output ./ -n --keep-going mkdir -p _build/html/_pdf cp -u _build/latex/*.pdf _build/html/_pdf - rm /home/runner/.cache/matplotlib/tex.cache/* - name: Build Download Notebooks (sphinx-tojupyter) shell: bash -l {0} run: | @@ -64,7 +58,7 @@ jobs: - name: Build HTML shell: bash -l {0} run: | - jb build --keep-going lectures --path-output ./ + jb build -W --keep-going lectures --path-output ./ - name: Save Build as Artifact uses: actions/upload-artifact@v1 with: diff --git a/lectures/five_preferences.md b/lectures/five_preferences.md index 3232014f2..cd8f13b74 100644 --- a/lectures/five_preferences.md +++ b/lectures/five_preferences.md @@ -76,7 +76,7 @@ from numba import njit %matplotlib inline %config InlineBackend.figure_format='retina' -plt.rc('text', usetex=True) +rc('text', usetex=True) label_size = 20 label_tick_size = 18 From e6acd98c8849ff22711c644c2323b14bcd4c8b51 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 10:38:14 +1100 Subject: [PATCH 07/12] remove debug program --- path.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 path.py diff --git a/path.py b/path.py deleted file mode 100644 index e52bd38bd..000000000 --- a/path.py +++ /dev/null @@ -1,5 +0,0 @@ -import os -print(os.getenv("PATH")) - -import matplotlib as mpl -print(mpl.get_cachedir()) \ No newline at end of file From ea0ecc7f6e643b47ac719d15bd6cc6c5d0090a6d Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 10:40:01 +1100 Subject: [PATCH 08/12] update all workflows with LaTeX --- .github/workflows/cache.yml | 3 ++- .github/workflows/execution.yml | 13 +++++++++++++ .github/workflows/publish.yml | 4 +++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 0d93e01db..2086d37c2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -29,7 +29,8 @@ jobs: texlive-xetex \ latexmk \ xindy \ - dvipng + dvipng \ + cm-super - name: Build HTML shell: bash -l {0} run: | diff --git a/.github/workflows/execution.yml b/.github/workflows/execution.yml index 6f4850eea..0ce6157c0 100644 --- a/.github/workflows/execution.yml +++ b/.github/workflows/execution.yml @@ -19,6 +19,19 @@ jobs: with: auto-update-conda: true python-version: ${{ matrix.python-version }} + - name: Install latex dependencies + run: | + sudo apt-get -qq update + sudo apt-get install -y \ + texlive-latex-recommended \ + texlive-latex-extra \ + texlive-fonts-recommended \ + texlive-fonts-extra \ + texlive-xetex \ + latexmk \ + xindy \ + dvipng \ + cm-super - name: Install Anaconda + Dependencies shell: bash -l {0} run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e95449f9e..d12bf3fe3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,7 +29,9 @@ jobs: texlive-fonts-extra \ texlive-xetex \ latexmk \ - xindy + xindy \ + dvipng \ + cm-super - name: Display Conda Environment Versions shell: bash -l {0} run: conda list From 86b232b89602a90f528ef84be57ace185869b25d Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 10:59:07 +1100 Subject: [PATCH 09/12] ADD: matplotlib clean cache for TeX --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c6c9c75a..de5909d5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,9 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list + - name: Clean Matplotlib TeX Cache + shell: bash -l {0} + run: rm /home/runner/.cache/matplotlib/tex.cache/* - name: Download "build" folder (cache) uses: dawidd6/action-download-artifact@v2 with: From ff9f54e33c8d21935215227621a9a3b75d029104 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 11:06:19 +1100 Subject: [PATCH 10/12] CHECK placement for Tex Cache Clean --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de5909d5c..7ca312b18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,9 +34,6 @@ jobs: - name: Display Pip Versions shell: bash -l {0} run: pip list - - name: Clean Matplotlib TeX Cache - shell: bash -l {0} - run: rm /home/runner/.cache/matplotlib/tex.cache/* - name: Download "build" folder (cache) uses: dawidd6/action-download-artifact@v2 with: @@ -58,6 +55,9 @@ jobs: mkdir -p _build/html/_notebooks cp -u _build/jupyter/*.ipynb _build/html/_notebooks # Build HTML (Website) + - name: Clean Matplotlib TeX Cache + shell: bash -l {0} + run: rm /home/runner/.cache/matplotlib/tex.cache/* - name: Build HTML shell: bash -l {0} run: | From ba72b6fc0953ce82faa8d30c8285d987ec835bf5 Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 11:17:00 +1100 Subject: [PATCH 11/12] remove matplotlib cache clear --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ca312b18..8c6c9c75a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,9 +55,6 @@ jobs: mkdir -p _build/html/_notebooks cp -u _build/jupyter/*.ipynb _build/html/_notebooks # Build HTML (Website) - - name: Clean Matplotlib TeX Cache - shell: bash -l {0} - run: rm /home/runner/.cache/matplotlib/tex.cache/* - name: Build HTML shell: bash -l {0} run: | From 1d330e2489df765c8256ddf0b14672d4f7b844df Mon Sep 17 00:00:00 2001 From: mmcky Date: Tue, 16 Nov 2021 11:17:26 +1100 Subject: [PATCH 12/12] add in plt.rc --- lectures/five_preferences.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/five_preferences.md b/lectures/five_preferences.md index cd8f13b74..3232014f2 100644 --- a/lectures/five_preferences.md +++ b/lectures/five_preferences.md @@ -76,7 +76,7 @@ from numba import njit %matplotlib inline %config InlineBackend.figure_format='retina' -rc('text', usetex=True) +plt.rc('text', usetex=True) label_size = 20 label_tick_size = 18