Skip to content

Commit 626fd14

Browse files
committed
update toc
1 parent 88ac730 commit 626fd14

File tree

7 files changed

+201
-143
lines changed

7 files changed

+201
-143
lines changed

.github/workflows/cache.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,44 @@
11
name: Build Cache [using jupyter-book]
22
on:
3-
schedule:
4-
# Execute cache weekly at 3am on Monday
5-
- cron: '0 3 * * 1'
3+
push:
4+
branches:
5+
- main
66
jobs:
7-
cache:
8-
runs-on: quantecon-gpu
9-
container:
10-
image: ghcr.io/quantecon/lecture-python-container:cuda-12.6.0-anaconda-2024-10-py312-b
11-
options: --gpus all
7+
tests:
8+
runs-on: ubuntu-latest
129
steps:
13-
- uses: actions/checkout@v4
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Setup Anaconda
13+
uses: conda-incubator/setup-miniconda@v3
1414
with:
15-
ref: ${{ github.event.pull_request.head.sha }}
16-
- name: Check nvidia drivers
17-
shell: bash -l {0}
15+
auto-update-conda: true
16+
auto-activate-base: true
17+
miniconda-version: 'latest'
18+
python-version: "3.11"
19+
environment-file: environment.yml
20+
activate-environment: quantecon
21+
- name: graphviz Support # TODO: required?
22+
run: |
23+
sudo apt-get -qq update && sudo apt-get install -y graphviz
24+
- name: Install latex dependencies
1825
run: |
19-
nvidia-smi
26+
sudo apt-get -qq update
27+
sudo apt-get install -y \
28+
texlive-latex-recommended \
29+
texlive-latex-extra \
30+
texlive-fonts-recommended \
31+
texlive-fonts-extra \
32+
texlive-xetex \
33+
latexmk \
34+
xindy \
35+
dvipng \
36+
cm-super
2037
- name: Build HTML
2138
shell: bash -l {0}
2239
run: |
2340
jb build lectures --path-output ./ -W --keep-going
24-
- name: Upload Execution Reports
41+
- name: Upload Execution Reports (HTML)
2542
uses: actions/upload-artifact@v4
2643
if: failure()
2744
with:
@@ -31,5 +48,4 @@ jobs:
3148
uses: actions/upload-artifact@v4
3249
with:
3350
name: build-cache
34-
path: _build
35-
include-hidden-files: true
51+
path: _build

.github/workflows/ci.yml

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,84 @@
1-
name: Build Project [using jupyter-book]
1+
name: Build HTML [using jupyter-book]
22
on: [pull_request]
33
jobs:
44
preview:
5-
runs-on: quantecon-gpu
6-
container:
7-
image: ghcr.io/quantecon/lecture-python-container:cuda-12.6.0-anaconda-2024-10-py312-b
8-
options: --gpus all
5+
runs-on: ubuntu-latest
96
steps:
10-
- uses: actions/checkout@v4
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
- name: Setup Anaconda
10+
uses: conda-incubator/setup-miniconda@v3
1111
with:
12-
ref: ${{ github.event.pull_request.head.sha }}
13-
# Check nvidia drivers
14-
- name: nvidia Drivers
15-
shell: bash -l {0}
16-
run: nvidia-smi
12+
auto-update-conda: true
13+
auto-activate-base: true
14+
miniconda-version: 'latest'
15+
python-version: "3.11"
16+
environment-file: environment.yml
17+
activate-environment: quantecon
18+
- name: Graphics Support #TODO: Review if graphviz is needed
19+
run: |
20+
sudo apt-get -qq update && sudo apt-get install -y graphviz
21+
- name: Install latex dependencies
22+
run: |
23+
sudo apt-get -qq update
24+
sudo apt-get install -y \
25+
texlive-latex-recommended \
26+
texlive-latex-extra \
27+
texlive-fonts-recommended \
28+
texlive-fonts-extra \
29+
texlive-xetex \
30+
latexmk \
31+
xindy \
32+
dvipng \
33+
cm-super
1734
- name: Display Conda Environment Versions
1835
shell: bash -l {0}
1936
run: conda list
2037
- name: Display Pip Versions
2138
shell: bash -l {0}
2239
run: pip list
2340
- name: Download "build" folder (cache)
24-
uses: dawidd6/action-download-artifact@v7
41+
uses: dawidd6/action-download-artifact@v6
2542
with:
2643
workflow: cache.yml
2744
branch: main
2845
name: build-cache
2946
path: _build
30-
# Build Assets (Download Notebooks and PDF via LaTeX)
31-
- name: Build Download Notebooks (sphinx-tojupyter)
32-
shell: bash -l {0}
33-
run: |
34-
jb build lectures -n -W --keep-going --path-output ./ --builder=custom --custom-builder=jupyter
35-
mkdir -p _build/html/_notebooks
36-
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
37-
- name: Upload Execution Reports (Download Notebooks)
38-
uses: actions/upload-artifact@v4
39-
if: failure()
40-
with:
41-
name: execution-reports
42-
path: _build/jupyter/reports
43-
- name: Build PDF from LaTeX
44-
shell: bash -l {0}
45-
run: |
46-
jb build lectures --builder pdflatex --path-output ./ -W --keep-going
47-
mkdir -p _build/html/_pdf
48-
cp -u _build/latex/*.pdf _build/html/_pdf
49-
- name: Upload Execution Reports (LaTeX)
50-
uses: actions/upload-artifact@v4
51-
if: failure()
52-
with:
53-
name: execution-reports
54-
path: _build/latex/reports
55-
# Final Build of HTML
47+
# # Build Assets (Download Notebooks and PDF via LaTeX)
48+
# - name: Build PDF from LaTeX
49+
# shell: bash -l {0}
50+
# run: |
51+
# jb build lectures --builder pdflatex --path-output ./ -n --keep-going
52+
# mkdir -p _build/html/_pdf
53+
# cp -u _build/latex/*.pdf _build/html/_pdf
54+
# - name: Upload Execution Reports (LaTeX)
55+
# uses: actions/upload-artifact@v4
56+
# if: failure()
57+
# with:
58+
# name: execution-reports
59+
# path: _build/latex/reports
60+
# - name: Build Download Notebooks (sphinx-tojupyter)
61+
# shell: bash -l {0}
62+
# run: |
63+
# jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
64+
# mkdir -p _build/html/_notebooks
65+
# cp -u _build/jupyter/*.ipynb _build/html/_notebooks
66+
# Build HTML (Website)
67+
# BUG: rm .doctress to remove `sphinx` rendering issues for ipywidget mimetypes
68+
# and clear the sphinx cache for building final HTML documents.
69+
# rm -r _build/.doctrees
5670
- name: Build HTML
5771
shell: bash -l {0}
5872
run: |
59-
jb build lectures --path-output ./ -n -W --keep-going
73+
jb build lectures --path-output ./ -nW --keep-going
6074
- name: Upload Execution Reports (HTML)
6175
uses: actions/upload-artifact@v4
6276
if: failure()
6377
with:
6478
name: execution-reports
6579
path: _build/html/reports
6680
- name: Preview Deploy to Netlify
67-
uses: nwtgck/actions-netlify@v3
81+
uses: nwtgck/actions-netlify@v3.0
6882
with:
6983
publish-dir: '_build/html/'
7084
production-branch: main

.github/workflows/collab.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
name: Build Project on Google Collab (Execution)
22
on: [pull_request]
3+
34
jobs:
4-
execution-checks:
5-
runs-on: quantecon-gpu
5+
test:
6+
runs-on: ubuntu-latest-m
67
container:
7-
image: docker://us-docker.pkg.dev/colab-images/public/runtime
8-
options: --gpus all
8+
image: us-docker.pkg.dev/colab-images/public/runtime:latest
99
steps:
1010
- uses: actions/checkout@v4
1111
with:
1212
ref: ${{ github.event.pull_request.head.sha }}
13-
- name: Check nvidia drivers
14-
shell: bash -l {0}
15-
run: |
16-
nvidia-smi
13+
- name: Check for dockerenv file
14+
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
1715
- name: Check python version
1816
shell: bash -l {0}
1917
run: |
@@ -22,7 +20,7 @@ jobs:
2220
shell: bash -l {0}
2321
run: pip list
2422
- name: Download "build" folder (cache)
25-
uses: dawidd6/action-download-artifact@v7
23+
uses: dawidd6/action-download-artifact@v6
2624
with:
2725
workflow: cache.yml
2826
branch: main
@@ -32,7 +30,7 @@ jobs:
3230
- name: Install Build Software
3331
shell: bash -l {0}
3432
run: |
35-
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-reredirects sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx-proof
33+
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.2 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 sphinx_proof==0.2.0 sphinx_reredirects==0.1.3
3634
# Build of HTML (Execution Testing)
3735
- name: Build HTML
3836
shell: bash -l {0}
@@ -45,7 +43,7 @@ jobs:
4543
name: execution-reports
4644
path: _build/html/reports
4745
- name: Preview Deploy to Netlify
48-
uses: nwtgck/actions-netlify@v3
46+
uses: nwtgck/actions-netlify@v3.0
4947
with:
5048
publish-dir: '_build/html/'
5149
production-branch: main

.github/workflows/linkcheck.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: ["ubuntu-latest"]
16-
python-version: ["3.12"]
16+
python-version: ["3.11"]
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020
- name: Setup Anaconda
21-
uses: conda-incubator/setup-miniconda@v2
21+
uses: conda-incubator/setup-miniconda@v3
2222
with:
2323
auto-update-conda: true
2424
auto-activate-base: true
2525
miniconda-version: 'latest'
26-
python-version: '3.12'
26+
python-version: "3.11"
2727
environment-file: environment.yml
2828
activate-environment: quantecon
2929
- name: Download "build" folder (cache)
30-
uses: dawidd6/action-download-artifact@v7
30+
uses: dawidd6/action-download-artifact@v6
3131
with:
3232
workflow: cache.yml
3333
branch: main

0 commit comments

Comments
 (0)