Skip to content

Commit 3d092f3

Browse files
mmckyclaude
andcommitted
Point the myst build at the QuantEcon theme release and refresh CI tooling
Theme: move site.template from the archived QuantEcon/quantecon-theme bundle (main.zip) to a pinned quantecon-theme.mystmd release, v2.2.0 — the current release, which carries the fancy-list rendering that pairs with the fork's fancy-lists parser (qe-v8). Pinned rather than floating so a theme release cannot change the build under us; bump the version in the URL to take a newer one. myst.yml also gets: - project.github corrected to lecture-python-programming (it pointed at lecture-python-programming.myst, which only survives as a rename redirect). The theme derives the notebook-launch repo from this value plus a ".notebooks" suffix, so a stale name means broken launch buttons. - toc brought back in line with _toc.yml: adds autodiff and the new polars lecture, drops the duplicate workspace entry from "Introduction to Python", and renames "The Scientific Libraries" to "Foundations of Scientific Computing". CI: Node 20 -> 24 (the theme's .nvmrc; it runs as a Remix server during `myst build --html`) and the remaining actions to current majors, which also clears the Node 20 runtime deprecation warnings. Adds the JAX install the jupyter-book 1.x workflow on main already does — without it the GPU lectures execute to ModuleNotFoundError cells in the preview, which the build does not fail on. Drops the unused configure-pages step; this job deploys to Netlify, not Pages. mystmd itself already comes from the QuantEcon fork's main branch, built from source with bun, with quantecon/VERSION.yml logged for traceability. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent c8c47eb commit 3d092f3

3 files changed

Lines changed: 37 additions & 20 deletions

File tree

.github/workflows/build-ipynb.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ jobs:
88
build-ipynb:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v7
1212

13-
- uses: actions/setup-node@v4
13+
# Node 24 matches the theme's .nvmrc (quantecon-theme.mystmd), which runs
14+
# as a Remix server during `myst build --html`.
15+
- uses: actions/setup-node@v7
1416
with:
15-
node-version: '20'
17+
node-version: '24'
1618

1719
- uses: oven-sh/setup-bun@v2
1820

1921
- name: Install Python
20-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@v7
2123
with:
2224
python-version: '3.12'
2325
cache: 'pip'
@@ -84,7 +86,7 @@ jobs:
8486
"
8587
8688
- name: Upload ipynb exports
87-
uses: actions/upload-artifact@v4
89+
uses: actions/upload-artifact@v7
8890
with:
8991
name: ipynb-exports
9092
path: './lectures/exports/'

.github/workflows/ci.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@ jobs:
66
steps:
77
- uses: actions/checkout@v7
88

9-
- name: Setup GitHub Pages
10-
uses: actions/configure-pages@v3
11-
129
- name: Cache Notebook Execution
13-
uses: actions/cache@v3
10+
uses: actions/cache@v6
1411
id: cache-execution
1512
with:
1613
path: ./lectures/_build/execute
1714
key: ${{ runner.os }}-execute-cache-${{ hashFiles('lectures/**/*.md') }}
1815

19-
- uses: actions/setup-node@v4
16+
# Node 24 matches the theme's .nvmrc (quantecon-theme.mystmd), which runs
17+
# as a Remix server during `myst build --html`.
18+
- uses: actions/setup-node@v7
2019
with:
21-
node-version: '20'
20+
node-version: '24'
2221

2322
- uses: oven-sh/setup-bun@v2
2423

2524
- name: Install Python
2625
if: steps.cache-execution.outputs.cache-hit != 'true'
27-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v7
2827
with:
2928
python-version: '3.12'
3029
cache: 'pip'
@@ -34,6 +33,15 @@ jobs:
3433
if: steps.cache-execution.outputs.cache-hit != 'true'
3534
run: python -m pip install -r myst_requirements.txt
3635

36+
# The GPU lectures (jax_intro, autodiff, numpy_vs_numba_vs_jax) need JAX
37+
# on the g4dn runner — same install as the jupyter-book 1.x workflow on
38+
# main. Without it those notebooks execute to ModuleNotFoundError cells.
39+
- name: Install JAX
40+
if: steps.cache-execution.outputs.cache-hit != 'true'
41+
run: |
42+
pip install -U "jax[cuda13]"
43+
python scripts/test-jax-install.py
44+
3745
- name: Install jupyter book 2.0
3846
run: pip install "jupyter-book>=2.0.0a0"
3947

lectures/myst.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ project:
1313
- Instructor for Ph.D. Advanced Macroeconomics, University of Minnesota.
1414
url: https://johnstachurski.net
1515
email: john.stachurski@gmail.com
16-
github: https://github.com/QuantEcon/lecture-python-programming.myst
16+
# The theme derives the notebook-launch repo from this (github + ".notebooks"),
17+
# so it has to be the real repo name.
18+
github: https://github.com/QuantEcon/lecture-python-programming
19+
# Keep in sync with _toc.yml (the jupyter-book 1.x table of contents).
1720
toc:
1821
- file: intro.md
1922
- title: Introduction to Python
@@ -26,22 +29,23 @@ project:
2629
- file: oop_intro.md
2730
- file: names.md
2831
- file: python_oop.md
29-
- file: workspace.md
30-
- title: The Scientific Libraries
32+
- title: Foundations of Scientific Computing
3133
children:
3234
- file: need_for_speed.md
3335
- file: numpy.md
3436
- file: matplotlib.md
3537
- file: scipy.md
36-
- title: Working with Data
37-
children:
38-
- file: pandas.md
39-
- file: pandas_panel.md
4038
- title: High Performance Computing
4139
children:
4240
- file: numba.md
4341
- file: jax_intro.md
4442
- file: numpy_vs_numba_vs_jax.md
43+
- file: autodiff.md
44+
- title: Working with Data
45+
children:
46+
- file: pandas.md
47+
- file: pandas_panel.md
48+
- file: polars.md
4549
- title: More Python Programming
4650
children:
4751
- file: writing_good_code.md
@@ -86,4 +90,7 @@ project:
8690
site:
8791
parts:
8892
footer: footer.md
89-
template: https://github.com/QuantEcon/quantecon-theme/archive/refs/heads/main.zip
93+
# Pinned theme release (see https://github.com/QuantEcon/quantecon-theme.mystmd/releases);
94+
# bump the vX.Y.Z in this URL to take a new theme version. The old bundled
95+
# QuantEcon/quantecon-theme repo is archived.
96+
template: https://github.com/QuantEcon/quantecon-theme.mystmd/releases/download/v2.2.0/quantecon-theme.zip

0 commit comments

Comments
 (0)