Skip to content

site-build: advanced joins the base environment - #86

Merged
mmcky merged 1 commit into
mainfrom
site-build/advanced
Nov 22, 2026
Merged

mmcky merged 1 commit into
mainfrom
site-build/advanced

Conversation

@mmcky

@mmcky mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What

Step 2 of bringing the sites into one environment for every site (QuantEcon/project-monorepo#77), in the owner's order of 2026-11-22 (intro, then advanced, then the GPU sites; QuantEcon/project-monorepo#77, comment of 2026-11-22). Intro moved in #84.

File Change
sites/advanced/site.yml environment: base, with a comment saying why
.github/workflows/site-build.yml SITES: dp intro advanced; the comments name advanced; "Only an ubuntu-latest series site has a leg" now reads "Only the ubuntu-latest runner class has a leg so far, in either environment"; two comment blocks re-flowed and the SITES comment re-wrapped (the review of #85)
sites/README.md, _base/README.md name advanced

_base/environment-update.yml is not touched. Its whole text is hashed into the base environment's cache key, so even a comment edit would make intro build cold again. Its stale comment lines wait for the pull request that removes plotly-orca, which edits it anyway.

advanced's three Kaleido lectures (BCG_complete_mkts, BCG_incomplete_mkts, knowing_forecasts_of_others) export images with kaleido 1.5.2, which needs a Chrome. The full image has carried Chrome for Testing at /opt/chrome, with BROWSER_PATH set, since QuantEcon/actions#346. The environment scan of 2026-11-19 built advanced in this environment before that Chrome arrived, and those three pages were its only failures. This build is their first in the image with Chrome.

The job limit is 240 minutes (cell_timeout 7200 s plus 120). advanced builds HTML alone for now, as intro and dp do.

Validation

Done on 2026-11-22; the evidence is in the comment below. The advanced leg builds green and strict (-n -W) from the pool in the full image with the list, all 80 notebook pages executed, the three Kaleido lectures included. Against two fresh builds of advanced's own at the same commit, every difference beyond their noise is one of these: the full image's install output; citation anchors; the merged bibliography's corrections of four of advanced's entries; cvxopt's GLPK being found by polytope; platform round-off; or plotly's text drawn in a different font by the image's Chrome. The last is cosmetic, and visible. The cell-output warnings are the same, and all 39 pins are installed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

Step 2 of bringing the sites into one environment for every site
(QuantEcon/project-monorepo#77), by the owner's order of 2026-11-22:
intro, then advanced, then the GPU sites. sites/advanced/site.yml sets
environment: base, and SITES is dp intro advanced; the comments and both
READMEs name it. advanced builds HTML alone for now, as intro and dp do.

Its three Kaleido lectures (BCG_complete_mkts, BCG_incomplete_mkts and
knowing_forecasts_of_others) export images with kaleido 1.5.2, which needs a
Chrome: the full image carries Chrome for Testing at /opt/chrome with
BROWSER_PATH set since QuantEcon/actions#346. The environment scan of
2026-11-19 built advanced in this environment before that Chrome arrived,
and those three were its only failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
@mmcky

mmcky commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Validation: advanced built from the pool against advanced's own builds

Builds compared, all of advanced's lectures/ at 63ef0be, the pool's pin:

Build Run What
This pull request, advanced leg 45000509799 at 0b0f6e9 from the pool, in the full image with _base/environment-update.yml, strict (-n -W), cold: 77 pages executed and 3 taken from the cache (intro, troubleshooting and zreferences, which have no code), none failed, 45 minutes
advanced's own, fresh QuantEcon/lecture-python-advanced.myst 44998881695 cache.yml on main, 2026-11-22
advanced's own, fresh again QuantEcon/lecture-python-advanced.myst 45001954151 the same, an hour later, for the noise baseline

Noise baseline. advanced's two own builds differ on 27 of 85 pages: image file names, unseeded random outputs, timings, memory addresses and solver iteration printouts. This pull request's build differs from the first on 78 pages. Every difference beyond the noise is one of these:

  • Install cells (most pages): the full image already holds each package at the list's version, so pip prints "Requirement already satisfied … /opt/conda/…" where advanced's build prints "Collecting … Downloading … /home/runner/miniconda3/…". The versions are the same.
  • Citation anchors (on many pages, and the only difference on 16): the pool's merged bibliography numbers the references page's anchors differently.
  • Corrected references, from the owner's rulings of 2026-11-02 on the merged bibliography (QuantEcon/project-monorepo#10). In each case advanced's own entry is wrong:
    • doubts_or_variability cites hansen1995discounted, which advanced's file gives as Hansen, Sargent and Tallarini (1999); the pool gives Hansen and Sargent (1995), the paper the sentence means.
    • risk_aversion_or_mistaken_beliefs cites hansen2020twisted, which advanced's file gives as a different Hansen and Sargent paper; the pool gives Hansen, Szőke, Han and Sargent (2020).
    • classical_filtering and lu_tricks cite Athanasios1991, "Athanasios and Pillai" in advanced's file; the pool gives Papoulis (1991), who wrote that edition alone.
    • On the references page, ten empty https://doi.org/ links become full DOIs, and months are dropped in the house style.
  • chang_credible: the list includes cvxopt 1.3.3, so polytope finds GLPK and no longer prints "polytope failed to import cvxopt.glpk. will use scipy.optimize.linprog". The page's results are identical.
  • Floating-point round-off, the same in advanced's two builds but different in the container (another CPU or BLAS): the last digit or two on classical_filtering (also eigenvector signs, which are arbitrary), dyn_stack, gorman_heterogeneous_households, hansen_richard_1987 (-0.0 against 0.0), irfs_in_hall_model, policy_invertibility, policy_regimes, smoothing_tax and supply_demand_var. On growth_in_dles the steady state of an economy whose endogenous eigenvalue is 0.99999999999048 prints [[5.]] [[0.]] [[0.]] against advanced's [[4.999]] [[-0.001]] [[-0.016]]. That eigenvalue differs in the last digit, and the lecture itself says "the near-unity endogenous eigenvalue means that these steady state values are of little relevance".
  • The three Kaleido lectures (BCG_complete_mkts, BCG_incomplete_mkts, knowing_forecasts_of_others) executed in the image with its Chrome for Testing, with the same number of images at the same sizes as advanced's own build. Ten of their 18 PNGs (4, 10 and 4) differ in about 1% of their pixels. Rendered side by side, the plotted data is identical, and only the text (titles, axis and tick labels) differs: the container's Chrome draws plotly's text with a different system font from the runner's. Advanced's two own builds give byte-identical images. This is cosmetic, but readers would see it at cutover.

Warnings. The build log has no Sphinx warning; its only warning lines are Node.js deprecation notices from GitHub's own actions and conda's update notice. The cell outputs carry the same warnings as advanced's own build, page by page:

Kind Count, each side
DeprecationWarning (plotly's engine=) 7
MatplotlibDeprecationWarning (chang_credible) 2
RuntimeWarning 10
ComplexWarning 5
UserWarning 5
solver "Error at iteration" printouts 39

Environment. All 39 pins in _base/environment-update.yml are installed at their versions: 38 by pip, and plotly-orca 1.3.1 by conda.

(Corrected 2026-11-22: two counts, found in review; the conclusions are unchanged.)

@mmcky
mmcky marked this pull request as ready for review November 22, 2026 09:20
Copilot AI adaptive review requested due to automatic review settings November 22, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review reports no active issues with moving advanced to the shared base environment and adding it to site-build CI.

No open issues 🎉

What changed in this PR

This PR moves advanced into the shared base environment after intro and adds it to the site-build workflow, continuing the staged migration toward one environment for all sites.

Changes:

  • Sets advanced to use the base environment, documenting Chrome support for its Kaleido image exports.
  • Adds advanced to CI alongside dp and intro.
  • Updates documentation and workflow comments without changing the cache-key-sensitive environment package list.
File Description
sites/​README.md Documents advanced’s base environment and inclusion in CI.
sites/​advanced/​site.yml Selects the base environment and explains its Chrome dependency.
.github/​workflows/​site-build.yml Adds advanced to SITES and updates explanatory comments.
_base/​README.md Lists intro and advanced as current base-environment users.

Review effort: Balanced (adaptive)

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.

2 participants