Repository navigation
markov_chains_II: link the cross-sectional example to markov_chains_I's own label - #883
Conversation
…n markov_chains_I The sentence links back to the employment/unemployment example's cross-sectional reading "discussed before", in markov_chains_I. That section carried the label mc_eg1-1 until #479 made it a prf:example labelled cross-sectional-distributions, so the link has had no target in this site since, and intersphinx has sent it to the same label on the retired tools-techniques site. It now points at the example again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…labels need
cross-sectional-distributions is a prf:example's label, which {ref} cannot
reach: the build reported it undefined. {prf:ref} does, as this lecture's
link to mc_po_conv_thm already shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
Validation: a full validationFresh builds with no cache, the same day (2026-11-26), each executing every lecture (
The branch's first commit,
Corrected minutes after posting: the page counts (18 and 11, not 15 and 14), and the runner, which the logs don't name. Conclusion. The pull request makes one link point at intro's own example, as intended, and nothing else a reader would see. Every other difference is output noise or round-off of the kinds this series' builds show between runs and between runners. |
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-intro.zh-cn
|
- Only a label a {ref} reaches counts: targets ((name)=, :name:) and an
exercise's or solution's 🏷️ (sphinx-exercise's). A {math} block's
🏷️ is an equation's and a {prf:...} directive's sphinx-proof's, and
{ref} reaches neither (QuantEcon/lecture-python-intro#883), so a site's
own equation no longer hides an ambiguity, and two mapped sites' proofs no
longer make one.
- A mapped name is read as the pool site at its address, by site.yml's url
(intro's pyprog is programming), keeping the name for the prefix and for
intersphinx's order.
- A site's YAML or page that is not UTF-8 text is left to the site rules,
which report it, instead of an internal error that hid every finding.
On the pool the output is unchanged: the one finding is still dp's
{ref}`lln_mr`. Each fix has a test that fails on e453d18.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
…get) (#101) **A draft until QuantEcon/lecture-python-intro#882 reaches the pool.** This rule's own check is red on this branch, as it should be: it reports the one case the pool has today. ## What it adds A new pool-check rule, `ref-target`, for QuantEcon/project-monorepo#22, on Matt's "Rule + two intro PRs" (2026-11-26, relayed by the organiser session): **a `{ref}` link that leaves its site has one target.** A label the site's pages don't define must be defined by at most one of the pool's sites the site maps. **Why.** Sphinx 7.4.7's intersphinx merges the mapped sites' inventories in sorted name order, each overwriting the last (`sphinx/ext/intersphinx/_load.py`, `load_mappings`). So a label that two mapped sites define sends the link to whichever name sorts last, whatever the lecture meant. Rule 3 keeps lecture names unique for `{doc}` links; this does the same for the labels a link leaves its site for. **What it doesn't count.** A prefixed link (`` {ref}`intermediate:lln_mr` ``) names its site. A mapped site outside the pool, such as a retired one that intro still maps, is not read. Labels are targets (`(name)=`, `:name:`) and a directive's `:label:` (a proof's or an exercise's), compared without case, as Sphinx does. Text in code cells and literals is not read, as for `doc-target`. ## The one case today `sites/dp: lectures/perm_income_cons.md links to {ref}`lln_mr``. intro's `lln_clt_intro` and intermediate's `lln_clt` both define `lln_mr`, and `intro` sorts last, so dp's live page links to intro's lecture rather than intermediate's, which dp's copy follows. QuantEcon/lecture-python-intro#882 renames intro's label to `lln_mr_intro`. Once it merges and the nightly refresh brings it into the pool, this check is clean, and this pull request can leave draft. The other ambiguous link QuantEcon/project-monorepo#22's check found, intro's `markov_chains_II`, isn't one this rule can see: its second target was the retired tools-techniques site. QuantEcon/lecture-python-intro#883 points it back at intro's own example. ## Changes - **`tools/pool-check`:** `check_ref_targets`, the rule, and its entry in the docstring. - **`tools/tests/test_sites.py`:** the reported case, and four clean ones: one mapped site defines the label, a prefix names the site, the site defines the label itself (in any case), and an inline literal that isn't a link. - **`sites/README.md`:** rule 8, and a note that a hard-coded address is outside the rules, since Sphinx never resolves it and only the link checker sees it. - **`README.md`:** one sentence. Locally: the tests pass (335, and 1 skipped), and pool-check reports exactly the case above. Copilot: not requested (Matt, 2026-11-22). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG
Changes one link in
markov_chains_II:{ref}`discussed before <mc_eg1-1>`becomes{prf:ref}`discussed before <cross-sectional-distributions>`(sphinx-proof's role, which reaches aprf:example's label, as the lecture's own{prf:ref}`stated <mc_po_conv_thm>`does).Why. The sentence ("Recall our cross-sectional interpretation of the employment/unemployment model discussed before") points back to
markov_chains_I. That section carried the labelmc_eg1-1until #479 (2026-05-28) turned it into aprf:examplelabelledcross-sectional-distributions. Since then the link has had no target in this site. Intersphinx foundmc_eg1-1on the retired tools-techniques site, so the live page links tohttps://tools-techniques.quantecon.org/finite_markov.html#mc-eg1-1. With this change it points at intro's own example again. This came out of the lecture monorepo's check of links that leave a site (QuantEcon/project-monorepo#22).Matt chose this fix on 2026-11-26, relayed by the organiser session ("(i) intro's own example"), over prefixing the link to intermediate's
finite_markov. He reviews the diff before it merges. A full validation (fresh no-cache builds of main and this branch, compared page by page) follows in a comment.🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMZxoF4m8xKRb8BcHnG