Skip to content

smoothing, smoothing_tax: take advanced's copies, linking perm_income_cons with {doc} - #84

Merged
mmcky merged 1 commit into
mainfrom
link-text-permanent-income
Nov 25, 2026
Merged

mmcky merged 1 commit into
mainfrom
link-text-permanent-income

Conversation

@mmcky

@mmcky mmcky commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

dp's smoothing and smoothing_tax are copies of advanced's. QuantEcon/lecture-python-advanced.myst#427 (merged as adc328c) changed one link in each, and this pull request copies advanced's two files over dp's so the copies stay identical. The net change is those two lines:

Lecture Line Old link New reference Rendered text
smoothing 87 Optimal Savings II: LQ Techniques {doc}intermediate:perm_income_cons Permanent Income II: LQ Techniques
smoothing_tax 80 the same {doc}intermediate:perm_income_cons Permanent Income II: LQ Techniques

"Optimal Savings II" now names another lecture in intermediate (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 link goes to python.quantecon.org directly instead of through the python-intro.quantecon.org forward. dp's lectures/_config.yml already maps intermediate in intersphinx_mapping.

Both files are byte-for-byte advanced's at adc328c. The branch's commit message mentions advanced's pull request as a bare number, which GitHub links within this repository; this body names it in full, so please squash with this body.

Validation

Fresh builds of main and of this branch the same day, dp's way (cache.yml with no cache, then ci.yml rendering each side's own fresh cache), compared page by page; the evidence comment 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?"; the {doc} form follows his question about QuantEcon/lecture-python-advanced.myst#427, "Shouldn't we use {doc} links that populate the title from the document?" (2026-11-25, relayed by the infrastructure organiser session)

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG

…_cons with {doc}

Copies lectures/smoothing.md and lectures/smoothing_tax.md from
QuantEcon/lecture-python-advanced.myst at adc328c, its merge of #427, so
dp's copies stay identical to advanced's. The only change is one link in
each: [Optimal Savings II: LQ Techniques](https://python-intro.quantecon.org/perm_income_cons.html)
becomes {doc}`intermediate:perm_income_cons`, which renders intermediate's
current title, "Permanent Income II: LQ Techniques". dp's _config.yml
already maps intermediate in intersphinx.

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

mmcky commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Validation: a full validation

dp's way, as for #75 and #81: a fresh build with no cache of main and of this pull request, each executing all 51 notebooks (cache.yml), each then rendered by ci.yml, which restored exactly that build's cache.

main at b2705c6, 2026-11-25 this pull request at 0012ed8, 2026-11-25
fresh build 45572305863 45572309284
render 45578329967 45578336048
  • The change shows as intended, and nowhere else. On smoothing (line 87) and smoothing_tax (line 80) the link now reads "Permanent Income II: LQ Techniques", the title in intermediate's objects.inv, and points at https://python.quantecon.org/perm_income_cons.html, no longer through the python-intro.quantecon.org forward. These are the only two pages whose prose differs, and that link is the only prose that differs on them. (The status page differs too, with its build times.)
  • The environment: both fresh builds ran in the same image, the same digest (sha256:833e117fefbd…).
  • Build logs: no Sphinx warning on either side; the fresh builds' warning lines are identical, and so are the renders'.
  • Cell outputs: the warnings and errors are the same on both sides, page by page.
  • Packages installed inside cells: five pages run pip install in a cell (amss, calvo_machine_learn, chang_credible, chang_ramsey, odu); on each, "Successfully installed" lists the same packages at the same versions on both sides.
  • The HTML: 28 of 57 pages differ, every figure compared by content. Apart from the link, every difference is output noise of the kinds in this series' earlier comparison (environment.yml: the Anaconda channels are defaults #81, its addendum): 26 of these pages are on that list; the other two are amss (timings) and smoothing_tax (the change).
Page What differs between main's render and this pull request's
amss %%time timings
amss2 figure 2 of 2, from a long simulation whose Markov states are drawn without a seed
amss3 figures 1 and 4 of 5, from a long simulation whose Markov states are drawn without a seed
calvo_machine_learn the progress bars of the cell's pip install
career figure 5 of 6, from qe.random.draw, which draws without a seed
chang_credible the progress spinner of the cell's pip install
chang_ramsey the printed elapsed times (329.1 against 171.1 seconds, 110.3 against 85.2)
cons_news memory addresses in printed objects, and figures 3 and 4 of 4, from unseeded LSS.simulate draws
discrete_dp %timeit timings and the printed elapsed times
ifp_discrete relative speeds (8.59 against 8.67)
ifp_egm the NumPy/JAX speed-up, 12.62x against 10.67x
ifp_egm_transient_shocks the NumPy/JAX speed-up, 20.82x against 20.93x
ifp_opi speed-ups, and figure 2 of 2, which plots run times
jv a solver's printed error, and figures 1 and 2 of 3, from unseeded draws (np.random.beta, np.random.uniform)
lagrangian_lqdp %%timeit timings
lq_inventories figures 1, 2, 4, 5, 6, 12, 15 and 16 of 16, from simulate, which calls LQ.compute_sequence without a seed
lqcontrol figures 1, 2, 8, 9 and 10 of 10, from LQ.compute_sequence, which draws its shocks without a seed
lqramsey figures 1 to 6 of 6, from paths drawn with numpy's unseeded randn
markov_jump_lq figure 2 of 52, from compute_sequence, which draws its shocks without a seed
odu one solver's iteration count (33 against 32), from unseeded draws, and 14 of 15 figures, from unseeded draws (np.random.beta, np.random.uniform)
perm_income figures 1 and 2 of 3, from unseeded draws (np.random.randn)
perm_income_cons figures 1 to 6 of 6, from lss.simulate, which draws without a seed
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

Conclusion. The pull request changes the one link on each of the two pages, which now takes its text from intermediate's title and points at python.quantecon.org, and nothing else a reader would see. dp also carries perm_income_cons itself; the link leaves dp's site for intermediate's, as the old link did, since dp's copies stay identical to advanced's.

@mmcky
mmcky merged commit c7f9905 into main Nov 25, 2026
3 checks passed
@mmcky
mmcky deleted the link-text-permanent-income branch November 25, 2026 09:14
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