Skip to content

Commit b899920

Browse files
mmckyHumphreyYang
andauthored
ENH: Upgrade to jupyter-book==0.15.1 + associated packages (#129)
* ENH: Upgrade to jupyter-book==0.15.1 + associated packages * fix warnings, install docutils for bibliography support * qe-book-theme no issue with docutils + remove cache * fix reference --------- Co-authored-by: Humphrey Yang <u6474961@anu.edu.au>
1 parent 8f5dc8b commit b899920

File tree

5 files changed

+51
-62
lines changed

5 files changed

+51
-62
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
- name: Display Pip Versions
3535
shell: bash -l {0}
3636
run: pip list
37-
- name: Download "build" folder (cache)
38-
uses: dawidd6/action-download-artifact@v2
39-
with:
40-
workflow: cache.yml
41-
branch: main
42-
name: build-cache
43-
path: _build
37+
# - name: Download "build" folder (cache)
38+
# uses: dawidd6/action-download-artifact@v2
39+
# with:
40+
# workflow: cache.yml
41+
# branch: main
42+
# name: build-cache
43+
# path: _build
4444
# Build Assets (Download Notebooks and PDF via LaTeX)
4545
- name: Build PDF from LaTeX
4646
shell: bash -l {0}

environment.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,11 @@ dependencies:
66
- anaconda=2022.05
77
- pip
88
- pip:
9-
- jupyter-book==0.12.3
10-
- quantecon-book-theme==0.3.1
11-
- sphinx-tojupyter==0.2.1
9+
- jupyter-book==0.15.1
10+
- quantecon-book-theme==0.4.1
11+
- sphinx-tojupyter==0.3.0
1212
- sphinxext-rediraffe==0.2.7
13-
- sphinx-exercise==0.4.0
13+
- sphinx-exercise==0.4.1
1414
- ghp-import==1.1.0
1515
- sphinxcontrib-youtube==1.1.0
1616
- sphinx-togglebutton==0.3.1
17-
# Sandpit Requirements
18-
- quantecon
19-
- libsass
20-
- array-to-latex
21-
- PuLP
22-
- cvxpy
23-
- cvxopt
24-
- cylp
25-
- prettytable

lectures/_config.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,27 @@ latex:
3333
sphinx:
3434
extra_extensions: [sphinx_multitoc_numbering, sphinxext.rediraffe, sphinx_tojupyter, sphinx_exercise, sphinx_togglebutton]
3535
config:
36-
nb_render_priority:
37-
html:
38-
- "application/vnd.jupyter.widget-view+json"
39-
- "application/javascript"
40-
- "text/html"
41-
- "text/latex"
42-
- "image/svg+xml"
43-
- "image/png"
44-
- "image/jpeg"
45-
- "text/markdown"
46-
- "text/plain"
47-
jupyter:
48-
- "application/vnd.jupyter.widget-view+json"
49-
- "application/javascript"
50-
- "text/html"
51-
- "text/latex"
52-
- "image/svg+xml"
53-
- "image/png"
54-
- "image/jpeg"
55-
- "text/markdown"
56-
- "text/plain"
36+
nb_mime_priority_overrides: [
37+
['html', 'application/vnd.jupyter.widget-view+json', 10],
38+
['html', 'application/javascript', 20],
39+
['html', 'text/html', 30],
40+
['html', 'text/latex', 40],
41+
['html', 'image/svg+xml', 50],
42+
['html', 'image/png', 60],
43+
['html', 'image/jpeg', 70],
44+
['html', 'text/markdown', 80],
45+
['html', 'text/plain', 90],
46+
['jupyter', 'application/vnd.jupyter.widget-view+json', 10],
47+
['jupyter', 'application/javascript', 20],
48+
['jupyter', 'text/html', 30],
49+
['jupyter', 'text/latex', 40],
50+
['jupyter', 'image/svg+xml', 50],
51+
['jupyter', 'image/png', 60],
52+
['jupyter', 'image/jpeg', 70],
53+
['jupyter', 'text/markdown', 80],
54+
['jupyter', 'text/plain', 90],
55+
['linkcheck', 'text/plain', 10],
56+
]
5757
html_favicon: _static/lectures-favicon.ico
5858
html_theme: quantecon_book_theme
5959
html_static_path: ['_static']
@@ -91,7 +91,7 @@ sphinx:
9191
"fF": "\\mathcal{F}"
9292
"gG": "\\mathcal{G}"
9393
"hH": "\\mathcal{H}"
94-
mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-svg.js
94+
mathjax_path: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
9595
rediraffe_redirects:
9696
index_toc.md: intro.md
9797
tojupyter_static_file_path: ["source/_static", "_static"]

lectures/five_preferences.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ for i in range(π_hat_0_vals.size): # Loop over all possible values for `π_hat
236236
```{code-cell} ipython3
237237
---
238238
tags: [hide-input]
239-
render:
239+
mystnb:
240240
figure:
241241
caption: |
242242
Figure 1

lectures/knowing_forecasts_of_others.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,25 +1556,23 @@ Townsend argued that the more manageable model could do a good job of
15561556
approximating the intractable model in which the Markov component of the demand shock remains unobserved
15571557
for ever.
15581558

1559-
By applying technical machinery of [[PCL86](https://python-advanced.quantecon.org/zreferences.html#id23)],
1560-
[[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] showed that there is a recursive
1559+
By applying technical machinery of {cite}`PCL`, {cite}`Pearlman_Sargent2005` showed that there is a recursive
15611560
representation of the equilibrium of the perpetually and symmetrically
15621561
uninformed model that Townsend wanted to solve
1563-
[[Tow83](https://python-advanced.quantecon.org/zreferences.html#id25)].
1562+
{cite}`townsend`.
15641563

1565-
A reader of [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] will notice that their representation of the equilibrium of
1564+
A reader of {cite}`Pearlman_Sargent2005` will notice that their representation of the equilibrium of
15661565
Townsend’s model exactly matches that of the **pooling equilibrium** presented here.
15671566

15681567
We have structured our notation in this lecture to faciliate comparison of the **pooling equilibrium**
1569-
constructed here with the equilibrium of Townsend’s model reported in [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)].
1568+
constructed here with the equilibrium of Townsend’s model reported in {cite}`Pearlman_Sargent2005`.
15701569

1571-
The computational method of [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] is recursive:
1570+
The computational method of {cite}`Pearlman_Sargent2005` is recursive:
15721571
it enlists the Kalman filter and invariant subspace methods for
15731572
solving systems of Euler
15741573
equations [^footnote1] .
15751574

1576-
As {cite}`singleton87`,
1577-
[[Kas00](https://python-advanced.quantecon.org/zreferences.html#id24)], and {cite}`sargent91_equilibrium` also
1575+
As {cite}`singleton87`, {cite}`kasa`, and {cite}`sargent91_equilibrium` also
15781576
found, the equilibrium is fully revealing: observed prices tell
15791577
participants in industry $ i $ all of the information held by
15801578
participants in market $ -i $ ($ -i $ means not $ i $).
@@ -1598,7 +1596,7 @@ those forecasts are the same as their own, they know them.
15981596
Sargent {cite}`sargent91_equilibrium` proposed a way to compute an equilibrium
15991597
without making Townsend’s approximation.
16001598

1601-
Extending the reasoning of [[Mut60](https://python-advanced.quantecon.org/zreferences.html#id110)], Sargent noticed that it is possible to
1599+
Extending the reasoning of {cite}`Muth1960`, Sargent noticed that it is possible to
16021600
summarize the relevant history with a low dimensional object, namely, a
16031601
small number of current and lagged forecasting errors.
16041602

@@ -1614,16 +1612,16 @@ appropriate orders of the autoregressive and moving average pieces of
16141612
the equilibrium representation.
16151613

16161614
By working in the frequency
1617-
domain [[Kas00](https://python-advanced.quantecon.org/zreferences.html#id24)] showed how to discover the appropriate
1615+
domain {cite}`kasa` showed how to discover the appropriate
16181616
orders of the autoregressive and moving average parts, and also how to
16191617
compute an equilibrium.
16201618

1621-
The [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)] recursive computational method, which stays in the time domain, also
1619+
The {cite}`Pearlman_Sargent2005` recursive computational method, which stays in the time domain, also
16221620
discovered appropriate orders of the autoregressive and moving
16231621
average pieces.
16241622

16251623
In addition, by displaying equilibrium representations
1626-
in the form of [[PCL86](https://python-advanced.quantecon.org/zreferences.html#id23)], [[PS05](https://python-advanced.quantecon.org/zreferences.html#id22)]
1624+
in the form of {cite}`PCL`, {cite}`Pearlman_Sargent2005`
16271625
showed how the moving average piece is linked to the innovation process
16281626
of the hidden persistent component of the demand shock.
16291627

@@ -1632,25 +1630,25 @@ innovation process is the additional state variable contributed by the
16321630
problem of extracting a signal from equilibrium prices that decision
16331631
makers face in Townsend’s model.
16341632

1635-
[^footnote0]: [PS05](zreferences.html#id22) verified this assertion using a different tactic, namely, by constructing
1633+
[^footnote0]: {cite}`Pearlman_Sargent2005` verified this assertion using a different tactic, namely, by constructing
16361634
analytic formulas for an equilibrium under the incomplete
16371635
information structure and confirming that they match the pooling equilibrium formulas derived here.
16381636

1639-
[^footnote3]: See [[Sar87](zreferences.html#id197)], especially
1637+
[^footnote3]: See {cite}`Sargent1987`, especially
16401638
chapters IX and XIV, for principles that guide solving some roots backwards and others forwards.
16411639

1642-
[^footnote4]: As noted by [[Sar87](zreferences.html#id197)], this difference equation is the Euler equation for
1640+
[^footnote4]: As noted by {cite}`Sargent1987`, this difference equation is the Euler equation for
16431641
a planning problem that maximizes the discounted sum of consumer plus
16441642
producer surplus.
16451643

1646-
[^footnote5]: [[PS05](zreferences.html#id22)] verify the same claim by applying machinery of [[PCL86](zreferences.html#id23)].
1644+
[^footnote5]: [PS05](Pearlman_Sargent2005) verify the same claim by applying machinery of {cite}`PCL`.
16471645

1648-
[^footnote1]: See [[AHMS96](zreferences.html#id135)] for an account of invariant subspace methods.
1646+
[^footnote1]: See [AHMS96](ahms) for an account of invariant subspace methods.
16491647

1650-
[^footnote2]: See [[AMS02](zreferences.html#id28)] for a discussion
1648+
[^footnote2]: See [AMS02](ams) for a discussion
16511649
of information assumptions needed to create a situation
16521650
in which higher order beliefs appear in equilibrium decision rules. A way
1653-
to read our findings in light of [[AMS02](zreferences.html#id28)] is that, relative
1651+
to read our findings in light of [AMS02](ams) is that, relative
16541652
to the number of signals agents observe, Townsend’s
16551653
section 8 model has too few random shocks to get higher order beliefs to
16561654
play a role.

0 commit comments

Comments
 (0)