Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
branch: main
name: build-cache
path: _build
- name: Clear stale Sphinx environment
shell: bash -l {0}
run: rm -rf _build/.doctrees
# # Build Assets (Download Notebooks and PDF via LaTeX)
# - name: Build PDF from LaTeX
# shell: bash -l {0}
Expand All @@ -63,13 +66,22 @@ jobs:
- name: Build Download Notebooks (sphinx-tojupyter)
shell: bash -l {0}
run: |
jb build lectures --path-output ./ --builder=custom --custom-builder=jupyter
# `shell: bash -l {0}` is a custom shell spec, so GitHub does not inject
# `-eo pipefail` (it only does that for the bare `shell: bash` shorthand).
# Without this, a failing `jb build` would be masked by the trailing
# mkdir/cp, whose exit code becomes the step's — and `--keep-going`
# guarantees the .ipynb files exist for `cp` to succeed on.
set -eo pipefail
jb build lectures -n -W --keep-going --path-output ./ --builder=custom --custom-builder=jupyter
mkdir -p _build/html/_notebooks
cp -u _build/jupyter/*.ipynb _build/html/_notebooks
Comment thread
mmcky marked this conversation as resolved.
- name: Upload Execution Reports (Download Notebooks)
uses: actions/upload-artifact@v7
if: failure()
with:
name: execution-reports-notebooks
path: _build/jupyter/reports
# Build HTML (Website)
# BUG: rm .doctress to remove `sphinx` rendering issues for ipywidget mimetypes
# and clear the sphinx cache for building final HTML documents.
# rm -r _build/.doctrees
- name: Build HTML
shell: bash -l {0}
run: |
Expand All @@ -78,7 +90,7 @@ jobs:
uses: actions/upload-artifact@v7
if: failure()
with:
name: execution-reports
name: execution-reports-html
path: _build/html/reports
- name: Preview Deploy to Netlify
uses: nwtgck/actions-netlify@v4.0
Expand Down
18 changes: 1 addition & 17 deletions lectures/ak_aiyagari.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kernelspec:
language: python
name: python3
translation:
title: V, σ, μ
title: 长寿、异质性个体、世代交叠模型
headings:
Overview: 概述
Environment: 经济环境
Expand All @@ -35,21 +35,6 @@ translation:
'Experiment 2: Preannounced tax cut': 实验2:预先宣布的减税
---

```
---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.17.3
kernelspec:
display_name: Python 3 (ipykernel)
language: python
name: python3
---


# 长寿、异质性个体、世代交叠模型

```{include} _admonition/gpu.md
Expand Down Expand Up @@ -1477,4 +1462,3 @@ ax2.set_ylabel(r"j")

plt.show()
```
```
4 changes: 2 additions & 2 deletions lectures/kalman_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ for i, t in enumerate(np.linspace(0, T-1, 3, dtype=int)):
axs[i].set_ylabel(r'$u_{{{}}}$'.format(str(t)))

cov_latex = (
r'$\Sigma_{{{}}}= \begin{{bmatrix}} {:.2f} & {:.2f} \\ '
r'{:.2f} & {:.2f} \end{{bmatrix}}$'
r'$\Sigma_{{{}}}= \left[ \substack{{{:.2f} \; {:.2f} \\ '
r'{:.2f} \; {:.2f}}} \right]$'
).format(t, cov[0, 0], cov[0, 1], cov[1, 0], cov[1, 1])
axs[i].text(0.33, -0.15, cov_latex, transform=axs[i].transAxes)

Expand Down
2 changes: 1 addition & 1 deletion lectures/likelihood_bayes.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ translation:

FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf"
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.font_manager.fontManager.addfont(FONTPATH)
plt.rcParams['font.family'] = ['Source Han Serif SC']

import matplotlib.pyplot as plt
import numpy as np
from numba import vectorize, jit, prange
from math import gamma
Expand Down
2 changes: 1 addition & 1 deletion lectures/sir_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ translation:
Ending Lockdown: 解除封锁
---

```{raw}
```{raw} jupyter
<div id="qe-notebook-header" align="right" style="text-align:right;">
<a href="https://quantecon.org/" title="quantecon.org">
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
Expand Down
Loading