From 25480d151026166b3f9a74bc8251989571337790 Mon Sep 17 00:00:00 2001 From: HuangFuSL Date: Sun, 17 Sep 2023 17:05:11 +0800 Subject: [PATCH 1/3] Fix: `test_code_block.py` not found --- .github/workflows/test.yml | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b231e717..5974906fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,34 +43,17 @@ jobs: github.base_ref == 'main' ) || contains(github.event.pull_request.labels.*.name, 'ci') == true + container: + image: ghcr.io/huangfusl/blog-env:build + options: --user root steps: - name: Checkout Main uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python 3 - uses: actions/setup-python@v4 - id: python - with: - python-version: '3.x' - cache: 'pip' - - - uses: actions/cache@v3 - id: cache - with: - path: ~/.local - key: ${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt') }} - - - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r requirements.txt --user --no-warn-script-location - name: Test run: - python3 ./ci/test_code_block.py + # Exec doctest on all md files exclude pyguide.md + python3 -m doctest $(find . -name '*.md' -not -name 'pyguide.md') -v -o ELLIPSIS -o IGNORE_EXCEPTION_DETAIL test: name: Test documentation From 6c9ddcb204c1a669352acfa2a6870df66b463a86 Mon Sep 17 00:00:00 2001 From: HuangFuSL Date: Sun, 17 Sep 2023 17:06:41 +0800 Subject: [PATCH 2/3] Fix: deploy failure --- docs/makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/makefile b/docs/makefile index 06afae6f4..a85a01662 100644 --- a/docs/makefile +++ b/docs/makefile @@ -2,6 +2,7 @@ _BUILD: python3 -m mkdocs build -d build --dirty _DEPLOY: + rm -rf build/.git python3 -m mkdocs gh-deploy -d build --message "Update on $(shell date "+%Y-%m-%d %H:%M:%S")" --dirty _CONVERT: From 5552fe9de0172589757463b311e1ca9d184b9f43 Mon Sep 17 00:00:00 2001 From: HuangFuSL Date: Sun, 17 Sep 2023 17:07:11 +0800 Subject: [PATCH 3/3] Update: trigger recompile latex --- docs/coding/leetcode/img/368-1.tex | 2 +- docs/coding/leetcode/img/403-1.tex | 2 +- docs/latex/basics/img/fonts-1.tex | 2 +- docs/latex/math/img/stack-1.tex | 2 +- docs/latex/tables/img/tabular-1.tex | 2 +- docs/latex/tables/img/tabular-2-1.tex | 2 +- docs/latex/tables/img/tabular-2.tex | 2 +- docs/latex/tables/img/tabular-3.tex | 2 +- docs/latex/tables/img/tabular-4.tex | 2 +- docs/latex/tables/img/tabular-5.tex | 2 +- docs/latex/tikz/img/pgfplots-1.tex | 2 +- docs/latex/tikz/img/pgfplots-2.tex | 2 +- docs/latex/tikz/img/pgfplots-3.tex | 2 +- docs/math/convex-optimization/imgs/first-order-convex.tex | 2 +- docs/math/convex-optimization/imgs/simple-duality-1.tex | 2 +- docs/math/convex-optimization/imgs/strict-separation.tex | 2 +- docs/math/empirical-methods/imgs/casual-inference-1.tex | 2 +- docs/math/empirical-methods/imgs/casual-inference-2.tex | 2 +- docs/math/operating-research/img/1.tex | 2 +- docs/math/operating-research/img/2-1.tex | 2 +- docs/math/operating-research/img/2.tex | 2 +- docs/math/operating-research/img/3.tex | 2 +- docs/math/operating-research/img/4-1.tex | 2 +- .../one-for-one-policy-backorder.tex | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/coding/leetcode/img/368-1.tex b/docs/coding/leetcode/img/368-1.tex index 67c88003c..0725cbf6e 100644 --- a/docs/coding/leetcode/img/368-1.tex +++ b/docs/coding/leetcode/img/368-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \begin{document} \begin{tikzpicture} diff --git a/docs/coding/leetcode/img/403-1.tex b/docs/coding/leetcode/img/403-1.tex index de98d4f1a..ddab5b1b0 100644 --- a/docs/coding/leetcode/img/403-1.tex +++ b/docs/coding/leetcode/img/403-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \begin{document} \usetikzlibrary{calc} diff --git a/docs/latex/basics/img/fonts-1.tex b/docs/latex/basics/img/fonts-1.tex index 39385992a..1604a2d1e 100644 --- a/docs/latex/basics/img/fonts-1.tex +++ b/docs/latex/basics/img/fonts-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \begin{document} \centering diff --git a/docs/latex/math/img/stack-1.tex b/docs/latex/math/img/stack-1.tex index dadcbc5e2..c08feceb9 100644 --- a/docs/latex/math/img/stack-1.tex +++ b/docs/latex/math/img/stack-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{amsmath} \usepackage{extarrows} \begin{document} diff --git a/docs/latex/tables/img/tabular-1.tex b/docs/latex/tables/img/tabular-1.tex index fbaadbf21..eba77e77e 100644 --- a/docs/latex/tables/img/tabular-1.tex +++ b/docs/latex/tables/img/tabular-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \begin{document} \begin{tabular}{|c|c|c|} \hline 2 & 9 & 4 \\ diff --git a/docs/latex/tables/img/tabular-2-1.tex b/docs/latex/tables/img/tabular-2-1.tex index 2dd97f456..95308d20b 100644 --- a/docs/latex/tables/img/tabular-2-1.tex +++ b/docs/latex/tables/img/tabular-2-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{multirow} \begin{document} \begin{tabular}{|ccc|} diff --git a/docs/latex/tables/img/tabular-2.tex b/docs/latex/tables/img/tabular-2.tex index 81fa3bb85..4b46e6120 100644 --- a/docs/latex/tables/img/tabular-2.tex +++ b/docs/latex/tables/img/tabular-2.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \begin{document} \begin{tabular}{||l|c|r||} \hline 2 & 91 & 4 \\ diff --git a/docs/latex/tables/img/tabular-3.tex b/docs/latex/tables/img/tabular-3.tex index f45a19593..723a73bdb 100644 --- a/docs/latex/tables/img/tabular-3.tex +++ b/docs/latex/tables/img/tabular-3.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{booktabs} \begin{document} \begin{tabular}{ccc} diff --git a/docs/latex/tables/img/tabular-4.tex b/docs/latex/tables/img/tabular-4.tex index 77fd7eed0..ba334e5fe 100644 --- a/docs/latex/tables/img/tabular-4.tex +++ b/docs/latex/tables/img/tabular-4.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{colortbl} \begin{document} \begin{tabular}{ccc} diff --git a/docs/latex/tables/img/tabular-5.tex b/docs/latex/tables/img/tabular-5.tex index 61ce6c562..5250cefcd 100644 --- a/docs/latex/tables/img/tabular-5.tex +++ b/docs/latex/tables/img/tabular-5.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{diagbox} \begin{document} \begin{tabular}{|l|ccc|} diff --git a/docs/latex/tikz/img/pgfplots-1.tex b/docs/latex/tikz/img/pgfplots-1.tex index 13ab6e48d..def63ce7c 100644 --- a/docs/latex/tikz/img/pgfplots-1.tex +++ b/docs/latex/tikz/img/pgfplots-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \begin{document} diff --git a/docs/latex/tikz/img/pgfplots-2.tex b/docs/latex/tikz/img/pgfplots-2.tex index 24ab9e110..a2fe4bd1a 100644 --- a/docs/latex/tikz/img/pgfplots-2.tex +++ b/docs/latex/tikz/img/pgfplots-2.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \begin{document} diff --git a/docs/latex/tikz/img/pgfplots-3.tex b/docs/latex/tikz/img/pgfplots-3.tex index 2f5a20c44..bfdc5e29b 100644 --- a/docs/latex/tikz/img/pgfplots-3.tex +++ b/docs/latex/tikz/img/pgfplots-3.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \begin{document} diff --git a/docs/math/convex-optimization/imgs/first-order-convex.tex b/docs/math/convex-optimization/imgs/first-order-convex.tex index 17478cc85..0787456bc 100644 --- a/docs/math/convex-optimization/imgs/first-order-convex.tex +++ b/docs/math/convex-optimization/imgs/first-order-convex.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \begin{document} diff --git a/docs/math/convex-optimization/imgs/simple-duality-1.tex b/docs/math/convex-optimization/imgs/simple-duality-1.tex index be21e7b21..a3fb7baff 100644 --- a/docs/math/convex-optimization/imgs/simple-duality-1.tex +++ b/docs/math/convex-optimization/imgs/simple-duality-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} diff --git a/docs/math/convex-optimization/imgs/strict-separation.tex b/docs/math/convex-optimization/imgs/strict-separation.tex index f017c013e..1ccd42e3d 100644 --- a/docs/math/convex-optimization/imgs/strict-separation.tex +++ b/docs/math/convex-optimization/imgs/strict-separation.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} diff --git a/docs/math/empirical-methods/imgs/casual-inference-1.tex b/docs/math/empirical-methods/imgs/casual-inference-1.tex index 317317f7a..d1115e150 100644 --- a/docs/math/empirical-methods/imgs/casual-inference-1.tex +++ b/docs/math/empirical-methods/imgs/casual-inference-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \begin{document} \begin{tabular}{ccc} \toprule diff --git a/docs/math/empirical-methods/imgs/casual-inference-2.tex b/docs/math/empirical-methods/imgs/casual-inference-2.tex index b281b980e..7e659005c 100644 --- a/docs/math/empirical-methods/imgs/casual-inference-2.tex +++ b/docs/math/empirical-methods/imgs/casual-inference-2.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \begin{document} \begin{tikzpicture} \node[circle, draw] (X1) at (0, 0) {$X_1$}; diff --git a/docs/math/operating-research/img/1.tex b/docs/math/operating-research/img/1.tex index 5e08fab00..12c8bd9de 100644 --- a/docs/math/operating-research/img/1.tex +++ b/docs/math/operating-research/img/1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{booktabs} \usepackage{colortbl} \begin{document} diff --git a/docs/math/operating-research/img/2-1.tex b/docs/math/operating-research/img/2-1.tex index ac3455b8a..f50613b4b 100644 --- a/docs/math/operating-research/img/2-1.tex +++ b/docs/math/operating-research/img/2-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{colortbl} \begin{document} \begin{tabular}{*{6}{|c}|} diff --git a/docs/math/operating-research/img/2.tex b/docs/math/operating-research/img/2.tex index 6c12a0868..9d6d21bf5 100644 --- a/docs/math/operating-research/img/2.tex +++ b/docs/math/operating-research/img/2.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{booktabs} \usepackage{colortbl} \begin{document} diff --git a/docs/math/operating-research/img/3.tex b/docs/math/operating-research/img/3.tex index eb6b96796..79c92d50e 100644 --- a/docs/math/operating-research/img/3.tex +++ b/docs/math/operating-research/img/3.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{booktabs} \usepackage{colortbl} \begin{document} diff --git a/docs/math/operating-research/img/4-1.tex b/docs/math/operating-research/img/4-1.tex index b59817644..e28a7abf8 100644 --- a/docs/math/operating-research/img/4-1.tex +++ b/docs/math/operating-research/img/4-1.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{booktabs} \usepackage{colortbl} \begin{document} diff --git a/docs/math/operations-mamagement/imgs/inventory-control-random-demand/one-for-one-policy-backorder.tex b/docs/math/operations-mamagement/imgs/inventory-control-random-demand/one-for-one-policy-backorder.tex index 79b5c4fc6..f87d5bf59 100644 --- a/docs/math/operations-mamagement/imgs/inventory-control-random-demand/one-for-one-policy-backorder.tex +++ b/docs/math/operations-mamagement/imgs/inventory-control-random-demand/one-for-one-policy-backorder.tex @@ -1,4 +1,4 @@ -\documentclass[standalone, version=1.0]{huangfusl-template} +\documentclass[standalone, version=2.0]{huangfusl-template} \usepackage{tikz} \begin{document} \begin{tikzpicture}