Skip to content

Link the permanent income lectures with {doc}, taking their current titles - #427

Merged
mmcky merged 2 commits into
mainfrom
link-text-permanent-income
Nov 25, 2026
Merged

mmcky merged 2 commits into
mainfrom
link-text-permanent-income

Conversation

@mmcky

@mmcky mmcky commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Five links in three lectures name two of intermediate's lectures by their old titles. This pull request turns them into {doc} references, so their text comes from each lecture's own title:

Lecture Line Old link New reference Rendered text
permanent_income_dles 40 Optimal Savings I: The Permanent Income Model {doc}intermediate:perm_income The Permanent Income Model
permanent_income_dles 41, 270 Optimal Savings II: LQ Techniques {doc}intermediate:perm_income_cons Permanent Income II: LQ Techniques
smoothing 87 the same as line 41 {doc}intermediate:perm_income_cons Permanent Income II: LQ Techniques
smoothing_tax 80 the same as line 41 {doc}intermediate:perm_income_cons Permanent Income II: LQ Techniques

"Optimal Savings I" and "II" now name two other lectures in intermediate, os and os_numerical, so the old text pointed readers at the wrong lecture by name. With {doc}, Sphinx takes the link text from the title in intermediate's objects.inv, so it follows any later retitling, and the links go to python.quantecon.org directly instead of through the python-intro.quantecon.org forward. lectures/_config.yml already maps intermediate in intersphinx_mapping, and seven lectures here already link to intermediate this way.

The first commit changed only the link text; the second, after @mmcky asked "Shouldn't we use {doc} links that populate the title from the document?" (2026-11-25, relayed by the infrastructure organiser session), makes them {doc} references. The squash carries the net change above.

dp carries copies of smoothing and smoothing_tax; a PR to QuantEcon/lecture-dp copies this PR's two files once it has merged, so the copies stay identical (dp's _config.yml maps intermediate too).

Validation

A fresh no-cache build of this branch, compared page by page with the same day's fresh build of main; the evidence comment for the current head follows below.

Requested by @mmcky on 2026-11-25 in the lecture monorepo's working session: "Yes please", to "Shall I open the advanced PR, then dp's?"

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG

Five links in permanent_income_dles, smoothing and smoothing_tax still
name intermediate's perm_income and perm_income_cons by their old
titles, "Optimal Savings I: The Permanent Income Model" and "Optimal
Savings II: LQ Techniques". Those lectures are now "The Permanent Income
Model" and "Permanent Income II: LQ Techniques", and "Optimal Savings I"
and "II" now name two other lectures (os and os_numerical). The link
text changes to the current titles; the addresses are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
@netlify

netlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!

Name Link
🔨 Latest commit 424d042
🔍 Latest deploy log https://app.netlify.com/projects/lustrous-melomakarona-3ee73e/deploys/6b06821503e7b06d0016a5b0
😎 Deploy Preview https://deploy-preview-427--lustrous-melomakarona-3ee73e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request November 25, 2026 05:46 Inactive
@mmcky

mmcky commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Validation: a full validation

Two fresh builds with no cache, run the same day, each executing all 77 notebooks with -W --keep-going, both green:

Build Run Runner
main at d4ef398, this branch's base, 2026-11-25 45555085609 Azure eastus2, runner image ubuntu-26.04 20261116.202.1
this pull request at b6b23c3, 2026-11-25 45555088753 AWS, runner image ubuntu-26.04 20261116.88.1

The change shows as intended, and nowhere else. Only three pages differ in their prose, permanent_income_dles, smoothing and smoothing_tax, and on each the only prose difference is the five link texts this pull request changes. (The status page differs too, with its build times.)

The installed packages are identical. Both builds installed the same 504 conda packages, each at the same version and build, from setup-miniconda's record of the packages it cached, and the same 43 pip packages, from pip's "Successfully installed" lines. The six pages that run pip install in a cell (atkeson_1991, BCG_complete_mkts, calvo_machine_learn, chang_credible, chang_ramsey, repeat_mh) install the same packages at the same versions on both sides.

Build logs. The same warning lines on both sides, and no Sphinx warning on either.

Cell outputs. The warnings and errors in the cell outputs are the same on both sides, page by page.

The HTML. 48 of 85 pages differ, every figure compared by content. Apart from the link texts, every difference is output noise of the kinds found when this series' builds were compared for #423 (its evidence comment and addendum): unseeded draws, timings, memory addresses, round-off, figures drawn again, and the build times. 47 of the 48 pages differed in that comparison too; the one new page is match_transport, explained in its row. "Round-off" below means differences around 1e-15, or in the last of 16 or so significant figures.

Page What differs between main's build and this pull request's
additive_functionals figures 1 to 3 of 10, from lss.simulate, which draws without a seed
amss %%time timings
amss2 printed values in the last digits, the kernel's temporary file numbers inside RuntimeWarnings (the same warnings on both sides), figure 2 of 2, from a long simulation whose Markov states are drawn without a seed, and figure 1 on 0.5% of its pixels, a simulation along a fixed history whose values differ by round-off
amss3 printed values in the last digits, the kernel's temporary file numbers inside RuntimeWarnings, and figures 1 and 4 of 5, from a long simulation whose Markov states are drawn without a seed
arma the kernel's temporary file numbers inside its warnings (the same ComplexWarning and UserWarnings on both sides), and figures 5 to 9 of 9, each from ARMA.simulation(), which draws without a seed
asset_pricing_lph round-off, and estimates from unseeded np.random.normal draws
atkeson_1991 the progress counter of the cell's pip install
BCG_complete_mkts %%time timings
black_litterman the size of three printed numerical checks (2.7e-15 against 2.0e-15, 5.6e-16 against 4.4e-16, 9.2e-09 against 7.8e-09)
calvo_machine_learn the progress counter of the cell's pip install, the last digits of a printed array, figure 3 of 5 on under 0.05% of its pixels, and figures 4 and 5, the same plots saved at a slightly different size; as in #423's comparison, I haven't found why the crop moves
cattle_cycles figure 1 of 3, from compute_sequence, which draws its shocks without a seed
chang_ramsey a printed pair at round-off level, and figures 4 to 8 of 8, each on at most 0.3% of its pixels
classical_filtering round-off, and a printed pair of eigenvectors that comes out with the opposite sign (both are eigenvectors)
cons_news printed values in the last digits, memory addresses, and figures 3 and 4 of 4, from LSS.simulate, which draws without a seed
discrete_dp %timeit timings and the printed elapsed times
dyn_stack round-off (including the sign of a zero), and figure 6 of 6 on 0.1% of its pixels
estspec figures 1, 6 and 7 of 7, from ARMA.simulation, which draws without a seed
gorman_heterogeneous_households a value at round-off level (3e-14 against 7e-14), and figure 4 of 8, the same plot saved at a slightly different size; as in #423's comparison, I haven't found why the crop moves
gradual_liberalization_network round-off in two printed checks (1.8e-15 against 1.9e-15, 9.2e-12 against 6.3e-12), and figures 4 and 5 of 6, each on 0.1% of its pixels. The first year of free trade, which moved between builds in #423's comparison (#425), is the same on both sides this time
growth_in_dles the printed steady state: main's build prints c, i, k = 4.999, −0.001, −0.016, this pull request's 5, 0, 0, the CPU-dependent result reported in #425 (this pull request's build ran on AWS, main's on Azure); and all five figures, from compute_sequence, which draws its shocks without a seed
hansen_jagannathan_1991 a value at round-off level (3.4e-14 against −1.2e-14), and figure 6 of 6 on under 0.05% of its pixels
hansen_richard_1987 the sign of a zero
irfs_in_hall_model values at round-off level, and figures 1, 3 and 5 of 6, from compute_sequence, which draws its shocks without a seed
knowing_forecasts_of_others regression coefficients in the last digits
lqramsey figures 1 to 6 of 6, from paths drawn with numpy's unseeded randn
lucas_asset_pricing_dles correlation matrices and all five figures, from compute_sequence, which draws its shocks without a seed
lucas_model figures 1 and 3 of 3, from unseeded draws (ϕ.rvs)
markov_jump_lq figure 22 of 22, from compute_sequence, which draws its shocks without a seed
match_transport New in this comparison. One printed dict lists the same nine entries, each with the same value, in a different order. The cell builds it by looping over matched_pairs | {'artificial_pair'}, a set that mixes tuples with one string, and Python randomises string hashes in every new process, so the string's place in the loop, and so the dict's order, changes from run to run. The draws before it are seeded (np.random.seed(1)), so the contents can't change
muth_kalman figures 1 to 3 of 4, from ssf.simulate, which draws without a seed
organizational_equilibrium figures 5 to 7 of 8, each on under 0.05% of its pixels
permanent_income_dles the change: the link texts on lines 40, 41 and 270; and figure 1 of 1, from compute_sequence, which draws its shocks without a seed
policy_counterfactuals values at round-off level
policy_counterfactuals_nk printed approximation errors and the smallest of three singular values (1.65993137e-07 against 1.65993186e-07), and figures 2 and 7 of 7, each on under 0.05% of its pixels
policy_invertibility values at round-off level
policy_regimes values at round-off level
repeat_mh the progress counters of the cell's pip install, and figures 12 and 13 of 15, each on at most 0.4% of its pixels
robustness memory addresses in printed objects, and figure 3 of 4 on 0.1% of its pixels
smoothing the change: the link text on line 87; figure 1 of 2, from a simulation whose seed is itself drawn at random (np.random.randint), and figure 2 on 0.1% of its pixels
smoothing_tax the change: the link text on line 80; printed values in their last digits, and six of its 20 figures, each on at most 0.1% of its pixels
status the build times
supply_demand_var a value in the last digits
tax_smoothing_1 figures 1 to 3 of 3, from compute_sequence, which draws its shocks without a seed
tax_smoothing_2 figures 1 to 4 of 4, from compute_sequence, which draws its shocks without a seed
tax_smoothing_3 figures 1 and 2 of 2, from compute_sequence, which draws its shocks without a seed
temptation_self_control a value at round-off level (1.3e-07 against 1.4e-07)
tsyrennikov_2013 figures 1 and 2 of 5, each on under 0.05% of its pixels. The LE statistic, which moved between builds in #423's comparison (#425), is the same on both sides this time
un_insure the solver's printed errors, in the last digits

Conclusion. The pull request changes the five link texts and nothing else a reader would see; every other difference is output noise of the kinds this series' builds already show between runs.

…om intermediate

The five links become {doc}`intermediate:perm_income` and
{doc}`intermediate:perm_income_cons`. Sphinx takes each link's text from
the title in intermediate's objects.inv ("The Permanent Income Model",
"Permanent Income II: LQ Techniques"), so it follows any later retitling,
and the links go to python.quantecon.org directly rather than through the
python-intro.quantecon.org forward. lectures/_config.yml already maps
intermediate in intersphinx, as seven other lectures here use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
@mmcky mmcky changed the title Give the permanent income links their lectures' current titles Link the permanent income lectures with {doc}, taking their current titles Nov 25, 2026
@github-actions
github-actions Bot temporarily deployed to pull request November 25, 2026 06:46 Inactive
@mmcky

mmcky commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Validation of the current head, 424d042: a full validation

This replaces the evidence comment above, which validated the first head, b6b23c3. The second commit makes the five links {doc} references, so this is a new build of the pull request, compared with the same fresh build of main as before (main is still at d4ef398).

Build Run Runner
main at d4ef398, this branch's base, 2026-11-25 45555085609 Azure eastus2, runner image ubuntu-26.04 20261116.202.1
this pull request at 424d042, 2026-11-25 45561950036 Azure eastus, runner image ubuntu-26.04 20261116.202.1

Both builds are fresh, with no cache, each executing all 77 notebooks with -W --keep-going, and both are green.

The links render as intended. On the three pages the five links now read "The Permanent Income Model" (line 40 of permanent_income_dles) and "Permanent Income II: LQ Techniques" (lines 41 and 270, smoothing line 87, smoothing_tax line 80), the titles intermediate's objects.inv gives, and they point at https://python.quantecon.org/perm_income.html and https://python.quantecon.org/perm_income_cons.html, no longer through the python-intro.quantecon.org forward. Only these three pages differ in their prose, and only in these five links. (The status page differs too, with its build times.) Compared with the build of the first head, the prose is identical on every page: the second commit changes only where the links point.

The installed packages are identical. The same 504 conda packages, each at the same version and build, and the same 43 pip packages; the six pages that run pip install in a cell install the same packages at the same versions on both sides.

Build logs. The same warning lines on both sides, and no Sphinx warning on either.

Cell outputs. The warnings and errors in the cell outputs are the same on both sides, page by page.

The HTML. 43 of 85 pages differ, every figure compared by content. Apart from the five links, every difference is output noise of the kinds described in the comment above and in #423's comparison: unseeded draws, timings, pip progress output, memory addresses, round-off, figures drawn again, and the build times. "Round-off" means differences around 1e-15, or in the last of 16 or so significant figures.

Page What differs between main's build and this pull request's
additive_functionals figures 1 to 3 of 10, from lss.simulate, which draws without a seed
amss %%time timings
amss2 printed values in their last digits, the kernel's temporary file numbers inside RuntimeWarnings (the same warnings on both sides), and figures 1 and 2 of 2, as in the comment above
amss3 printed values in their last digits, the kernel's temporary file numbers inside RuntimeWarnings, and figures 1 and 4 of 5, from a long simulation whose Markov states are drawn without a seed
arma the kernel's temporary file numbers inside its warnings (the same warnings on both sides), and figures 5 to 9 of 9, from ARMA.simulation(), which draws without a seed
asset_pricing_lph estimates from unseeded np.random.normal draws
atkeson_1991 the progress output of the cell's pip install
BCG_complete_mkts %%time timings
black_litterman the size of a printed numerical check (2.7e-15 against 2.9e-15)
calvo_machine_learn the progress bar of the cell's pip install
cattle_cycles figure 1 of 3, from compute_sequence, which draws its shocks without a seed
chang_credible the progress output of the cell's pip install
chang_ramsey the printed elapsed time (114.2 against 139.0 seconds), a printed pair at round-off level, and figures 4 to 8 of 8, each on at most 0.2% of its pixels
cons_news memory addresses, and figures 3 and 4 of 4, from LSS.simulate, which draws without a seed
discrete_dp %timeit timings and the printed elapsed times
entrepreneurial_stock_market figures 2, 4 and 6 of 9, each on under 0.05% of its pixels
estspec figures 1, 6 and 7 of 7, from ARMA.simulation, which draws without a seed
gradual_liberalization_network the first year of free trade, 31 on main's side and 32 on this side, the CPU-dependent result reported in #425 (both builds ran on Azure, whose machines differ in CPU); round-off in two printed checks; and figures 4 and 5 of 6, each on 0.1% of its pixels
gradual_trade_agreements figure 2 of 3, on under 0.05% of its pixels
growth_in_dles all five figures, from compute_sequence, which draws its shocks without a seed. The printed steady state is the same on both sides this time
hansen_jagannathan_1991 a value at round-off level (3.395222e-14 against 3.393428e-14)
irfs_in_hall_model figures 1, 3 and 5 of 6, from compute_sequence, which draws its shocks without a seed
lqramsey figures 1 to 6 of 6, from paths drawn with numpy's unseeded randn
lucas_asset_pricing_dles correlation matrices and all five figures, from compute_sequence, which draws its shocks without a seed
lucas_model figures 1 and 3 of 3, from unseeded draws (ϕ.rvs)
match_transport the printed dict's order: the same nine entries with the same values, the string key in another place, for the reason given in the comment above (a set that mixes tuples with one string, whose hash Python randomises per process; the draws are seeded)
muth_kalman figures 1 to 3 of 4, from ssf.simulate, which draws without a seed
organizational_equilibrium a value at round-off level (5.4e-13 against 1.6e-13), and figures 5 to 7 of 8, each on under 0.05% of its pixels
permanent_income_dles the change: the three links, their text and their address; and figure 1 of 1, from compute_sequence, which draws its shocks without a seed
policy_counterfactuals values at round-off level
policy_counterfactuals_nk values at round-off level (8.6e-14 against 8.2e-14, 1.2e-13 against 1.3e-13)
repeat_mh the progress output of the cell's pip install
risk_aversion_or_mistaken_beliefs figure 8 of 13, the same plot saved at a slightly different size; as in #423's comparison, I haven't found why the crop moves
robustness memory addresses in printed objects
smoothing the change: the link on line 87, its text and its address; and figure 1 of 2, from a simulation whose seed is itself drawn at random (np.random.randint)
smoothing_tax the change: the link on line 80, its text and its address
status the build times
tax_smoothing_1 figures 1 to 3 of 3, from compute_sequence, which draws its shocks without a seed
tax_smoothing_2 figures 1 to 4 of 4, from compute_sequence, which draws its shocks without a seed
tax_smoothing_3 figures 1 and 2 of 2, from compute_sequence, which draws its shocks without a seed
temptation_self_control a value at round-off level (1.3e-07 against 1.5e-07), and figure 1 of 3, on under 0.05% of its pixels
tsyrennikov_2013 one statistic, the LE mean RSI, 0.7676 on main's side and 0.7653 on this side, the other CPU-dependent result reported in #425; and figures 1 to 3 of 5, each on at most 0.3% of its pixels
un_insure the solver's printed errors, in their last digits

Conclusion. The pull request changes the five links, which now take their text from intermediate's titles and point at python.quantecon.org, and nothing else a reader would see; every other difference is output noise of the kinds this series' builds already show between runs.

@mmcky
mmcky merged commit adc328c into main Nov 25, 2026
10 checks passed
@mmcky
mmcky deleted the link-text-permanent-income branch November 25, 2026 07:57
mmcky added a commit to QuantEcon/lecture-dp that referenced this pull request Nov 25, 2026
…_cons with {doc} (#84)

dp's smoothing.md and smoothing_tax.md become advanced's at adc328c (QuantEcon/lecture-python-advanced.myst#427's merge), byte for byte, so dp's copies stay identical to advanced's. The net change is one line in each: the link to intermediate's perm_income_cons becomes {doc}`intermediate:perm_income_cons`, which takes its current title, "Permanent Income II: LQ Techniques", and points at python.quantecon.org. The old link text, "Optimal Savings II", now names a different intermediate lecture. Validated on 2026-11-25 with fresh no-cache builds of main and this pull request in the same image (the evidence comment): the prose differs only in that link, with the same warnings.

Lecture content: reviewed by @mmcky ("Merge as recommended") in the organiser session, at head 0012ed8.

Co-authored-by: Claude Opus 5.5 <[email protected]>
mmcky pushed a commit to QuantEcon/lectures that referenced this pull request Nov 26, 2026
The nightly refresh: three pool lectures whose canonical source in lecture-python-advanced.myst moved, with QuantEcon/lecture-python-advanced.myst#427's link change. permanent_income_dles, smoothing and smoothing_tax replace the stale "Optimal Savings I/II" link texts with {doc}`intermediate:perm_income` and {doc}`intermediate:perm_income_cons`, so each link's text follows its target's title. No code cell changes. sync/ledger.yml takes the series pins and the three lectures' digests.

Content review: @mmcky's yes to this exact diff ("Approve runs, then merge", 2026-11-26), after the organiser read it. mini:project-monorepo recomputed the refresh from the base and got the same tree, and again at 0d1f301 with the same patch-id. pool-check, drift-check and site-build passed on 5ed773a.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
pull request — 424d0426 Deployed Nov 25, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant