From 6764aeb8f71f229aa82ca2e8c7ab11fad90b2baf Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 14:21:40 +1000 Subject: [PATCH 01/13] adding ci job for pdf artifact --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4cc2c646..de71917ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,4 +46,41 @@ jobs: deploy-message: "Preview Deploy from GitHub Actions" env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} \ No newline at end of file + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + + pdflatex: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install wheel + pip install -e .[testing] + - 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 + + - name: Build PDF from LaTeX (Docs) + run: | + jb build lectures --builder pdflatex -n -W --keep-going + - uses: actions/upload-artifact@v2 + with: + name: PDF_LATEX + path: jupyter-book/docs/_build/latex/book.pdf From c6b97a0c13f38ba4582f0506531b8a6530470e01 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 14:30:22 +1000 Subject: [PATCH 02/13] adding a ci job --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de71917ec..8d4a03d68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,11 +60,6 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install wheel - pip install -e .[testing] - name: Install latex dependencies run: | sudo apt-get -qq update From 35ef91fad0279ebb8ddfb32ddf8a50d138677e31 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 14:35:29 +1000 Subject: [PATCH 03/13] modifying ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d4a03d68..729d94741 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,10 +72,10 @@ jobs: latexmk \ xindy - - name: Build PDF from LaTeX (Docs) + - name: Build PDF from LaTeX (Lectures) run: | jb build lectures --builder pdflatex -n -W --keep-going - uses: actions/upload-artifact@v2 with: name: PDF_LATEX - path: jupyter-book/docs/_build/latex/book.pdf + path: lecture-python.myst/lectures/_build/latex/book.pdf From 45205e30108ae11408053d6e230b6eb8fd294066 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 15:02:42 +1000 Subject: [PATCH 04/13] upload download pdf --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 729d94741..0d5c8c711 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,8 +74,14 @@ jobs: - name: Build PDF from LaTeX (Lectures) run: | - jb build lectures --builder pdflatex -n -W --keep-going + jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going - uses: actions/upload-artifact@v2 with: name: PDF_LATEX - path: lecture-python.myst/lectures/_build/latex/book.pdf + path: _build/latex/*.pdf + + - name: Copy Download Notebooks for GH-PAGES + shell: bash -l {0} + run: | + mkdir _build/html/_pdf + cp _build/latex/*.pdf _build/html/_pdf From acba029b4063390ff4325257cce4deb4ccfe66ae Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 15:06:02 +1000 Subject: [PATCH 05/13] formatting workflow --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d5c8c711..9800e4782 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,8 +80,8 @@ jobs: name: PDF_LATEX path: _build/latex/*.pdf - - name: Copy Download Notebooks for GH-PAGES - shell: bash -l {0} - run: | - mkdir _build/html/_pdf - cp _build/latex/*.pdf _build/html/_pdf + - name: Copy pdf assets + shell: bash -l {0} + run: | + mkdir _build/html/_pdf + cp _build/latex/*.pdf _build/html/_pdf From 9ad50e1350530945488550f3de57666e140db070 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 15:14:24 +1000 Subject: [PATCH 06/13] adding pdf creation workflow --- .github/workflows/ci.yml | 63 ++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9800e4782..7cee6f0a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,31 @@ jobs: shell: bash -l {0} run: | jb build lectures --path-output ./ + - 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 + + - name: Build PDF from LaTeX + run: | + jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going + - uses: actions/upload-artifact@v2 + with: + name: PDF_LATEX + path: _build/latex/*.pdf + + - name: Copy pdf assets + shell: bash -l {0} + run: | + mkdir _build/html/_pdf + cp _build/latex/*.pdf _build/html/_pdf - name: Save Build as Artifact uses: actions/upload-artifact@v1 with: @@ -47,41 +72,3 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - - pdflatex: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.8] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - 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 - - - name: Build PDF from LaTeX (Lectures) - run: | - jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going - - uses: actions/upload-artifact@v2 - with: - name: PDF_LATEX - path: _build/latex/*.pdf - - - name: Copy pdf assets - shell: bash -l {0} - run: | - mkdir _build/html/_pdf - cp _build/latex/*.pdf _build/html/_pdf From aee9b96873994747f44aa0c0cd14fab29d3d88bb Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 15:26:07 +1000 Subject: [PATCH 07/13] ci workflow --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cee6f0a9..360ad1882 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,15 +43,10 @@ jobs: texlive-xetex \ latexmk \ xindy - - name: Build PDF from LaTeX + shell: bash -l {0} run: | jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going - - uses: actions/upload-artifact@v2 - with: - name: PDF_LATEX - path: _build/latex/*.pdf - - name: Copy pdf assets shell: bash -l {0} run: | From 11857ba36aff97894e05de6185e003f0b1d33de9 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 15:35:07 +1000 Subject: [PATCH 08/13] warning as error removed --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 360ad1882..16678f285 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Build PDF from LaTeX shell: bash -l {0} run: | - jb build lectures --builder pdflatex --path-output ./ -n -W --keep-going + jb build lectures --builder pdflatex --path-output ./ -n --keep-going - name: Copy pdf assets shell: bash -l {0} run: | From 9e300bbde60b2b0124f203f7d9cfbb5d568d40cf Mon Sep 17 00:00:00 2001 From: AakashGC Date: Mon, 12 Apr 2021 16:12:24 +1000 Subject: [PATCH 09/13] added pdf-download branch for qe-theme --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 5b5a2f2b4..ec10371af 100644 --- a/environment.yml +++ b/environment.yml @@ -8,11 +8,11 @@ dependencies: - pip: - jupyter-book - sphinx-multitoc-numbering - - quantecon-book-theme - sphinx-tojupyter - sphinxext-rediraffe - sphinx-exercise - jupytext - ghp-import - jupinx + - git+git://github.com/QuantEcon/quantecon-book-theme@pdf-download From 68cbc35425c6195190e13a608a12120f912afe2e Mon Sep 17 00:00:00 2001 From: AakashGC Date: Thu, 15 Apr 2021 11:20:58 +1000 Subject: [PATCH 10/13] tornado as dependency --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index ec10371af..405e5fd41 100644 --- a/environment.yml +++ b/environment.yml @@ -7,6 +7,7 @@ dependencies: - pip - pip: - jupyter-book + - tornado>=6.1.0 - sphinx-multitoc-numbering - sphinx-tojupyter - sphinxext-rediraffe From 48d603d37cc7fb4b9a6e5bf3678c59174657d08a Mon Sep 17 00:00:00 2001 From: mmcky Date: Wed, 28 Apr 2021 15:15:42 +1000 Subject: [PATCH 11/13] remove extra tornado spec --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index 2a06ab061..310c39472 100644 --- a/environment.yml +++ b/environment.yml @@ -7,7 +7,6 @@ dependencies: - pip - pip: - jupyter-book - - tornado>=6.1.0 - sphinx-multitoc-numbering - sphinx-tojupyter - sphinxext-rediraffe From b244a16565dcc8bec3d1f6a2e3864f673176b045 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Wed, 5 May 2021 19:08:59 +1000 Subject: [PATCH 12/13] running pdflatex before html --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16678f285..916f9eace 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,10 +28,6 @@ jobs: branch: main name: build-cache path: _build - - name: Build HTML - shell: bash -l {0} - run: | - jb build lectures --path-output ./ - name: Install latex dependencies run: | sudo apt-get -qq update @@ -52,6 +48,10 @@ jobs: run: | mkdir _build/html/_pdf cp _build/latex/*.pdf _build/html/_pdf + - name: Build HTML + shell: bash -l {0} + run: | + jb build lectures --path-output ./ - name: Save Build as Artifact uses: actions/upload-artifact@v1 with: From a3a6361e0c9efb2a90861ea0261abb9e7ea20092 Mon Sep 17 00:00:00 2001 From: AakashGC Date: Thu, 6 May 2021 10:03:19 +1000 Subject: [PATCH 13/13] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 310c39472..23d4df71d 100644 --- a/environment.yml +++ b/environment.yml @@ -14,7 +14,7 @@ dependencies: - jupytext - ghp-import - jupinx - - git+git://github.com/QuantEcon/quantecon-book-theme@pdf-download + - git+git://github.com/QuantEcon/quantecon-book-theme@download-pdf # Temporary Fixes - tornado>=6.1