Repository navigation
Conversation
…, and stage-site Implements QuantEcon/project-monorepo#21 and records the cross-reference policy of QuantEcon/project-monorepo#22. - products/ is renamed sites/ (owner, 2026-11-17), and the vocabulary with it: promote's PRODUCT_PAGES is SITE_PAGES (same pages, same behaviour), pool-check and drift-check say "site page", the README's model is mirror -> pool -> sites. - sites/<key>/ for intro, programming, intermediate, advanced, dp and jax: the series' _config.yml and _toc.yml verbatim at the pins in sync/state.yml, with each addition marked in place; the site's own pages and branding verbatim; site.yml with type, runner, time_limit, publishes and url, each sourced in a comment. sites/README.md records the fields, every deviation from verbatim, how to stage and build, and the rules. - dp's _toc.yml adds mccall_risk after mccall_fitted_vfi (#21, 2026-10-08). - tools/pool-check checks the sites (site-layout, site-toc, site-page, site-config, site-yml); pool-check.yml runs on sites/** too. - tools/stage-site copies a site's pages and _static/ files into lectures/ before a build and removes them after; it never overwrites. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU
It is Jupyter Book's execute: timeout, the limit on one cell, not a job's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU
…eview's fixes From the independent review of sites-21: - tools/stage-site never removes a file it did not copy. Staging refuses any destination that exists, whatever its bytes, and records what it copies, and the folders it makes, in _build/stage-site.json (git-ignored, outside the pool); --clean removes only what the record lists, each file while its bytes are the ones copied. One site at a time. It takes only a key that names a site folder (_toc.yml and site.yml), never `.` or `..`. - tools/drift-check reports site-stale (drift, so an issue that closes itself): every file in a series' sites/<key>/ but site.yml is compared with the series' lectures/<path> at the pin, _config.yml and _toc.yml with the site's additions removed. Every added line now holds the marker `# site addition`, so removing those lines gives the series' file back exactly; the six sites' additions are re-marked that way. - tools/pool-check also requires only_build_toc_files: true and the site's own execute.cache, and reports a _config.yml section of the wrong type as site-config instead of crashing. - README: cell_timeout in the summary of site.yml; sites/README.md records the markers, the record, site-stale, and that -n -W is stricter than intro's and advanced's own publish builds (#25 settles it per site). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🔵 Needs a closer look
The change adds new site staging semantics and CI-gating drift/pool checks whose real-world behavior in Jupyter Book builds and GitHub Actions runners needs human validation beyond what unit tests can confirm.
No open issues 🎉
What changed in this PR
Introduce a first-class sites/<key>/ layer (one folder per published site) and update tooling/CI checks so each site’s configs, pages, assets, and metadata stay consistent with the pool and upstream series pins.
Changes:
- Add
sites/<key>/folders (configs, TOCs, site pages/assets) plussite.ymlmetadata for each published site. - Add
tools/stage-siteto stage/clean site-only pages and_static/assets into/out oflectures/for builds. - Extend
tools/pool-checkandtools/drift-checkwith site-aware validation and drift detection; update workflow/tests/docs and terminology (products→sites).
| File | Description |
|---|---|
| tools/tests/test_sites.py | Adds new tests covering site validation rules, stage-site staging/cleaning behavior, and drift-check’s site-stale behavior. |
| tools/tests/test_site_pages.py | Updates tests and terminology from “product pages” to “site pages” and adjusts expectations accordingly. |
| tools/tests/test_pool_check.py | Updates pool-check test expectations, including wording changes to refer to “site pages”. |
| tools/tests/conftest.py | Adjusts test harness setup so scratch repos include and can invoke the new tools/stage-site tool. |
| tools/stage-site | Introduces a new CLI tool to copy a site’s pages and _static/ assets into the pool for builds and safely clean only what it staged. |
| tools/promote | Renames PRODUCT_PAGES to SITE_PAGES and updates related wording while keeping behavior consistent. |
| tools/pool-check | Extends pool-check with site-focused rules validating sites/<key>/ structure, toc/page resolution, config invariants, and path collisions. |
| tools/drift-check | Adds a site-stale drift rule to compare committed site copies against upstream series pins (with site additions stripped) and updates wording to “sites”. |
| sync/toc.yml | Updates comments/wording to reflect that per-site TOCs live under sites/<key>/. |
| sites/README.md | Adds documentation for the sites/ layout, site.yml fields, invariants, staging workflow, and deviation rules. |
| sites/programming/troubleshooting.md | Adds the programming site troubleshooting page under sites/programming/. |
| sites/programming/status.md | Adds the programming site status page under sites/programming/. |
| sites/programming/site.yml | Adds site.yml for the programming site with build/workflow metadata (runner, outputs, timeouts, URL). |
| sites/programming/intro.md | Adds the programming site intro/landing page under sites/programming/. |
| sites/programming/_toc.yml | Adds the programming site TOC selecting pool lectures and site pages for builds. |
| sites/programming/_config.yml | Adds the programming site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| sites/jax/zreferences.md | Adds the jax site references page under sites/jax/. |
| sites/jax/troubleshooting.md | Adds the jax site troubleshooting page under sites/jax/. |
| sites/jax/status.md | Adds the jax site status page under sites/jax/. |
| sites/jax/site.yml | Adds site.yml for the jax site with build/workflow metadata (runner, outputs, timeouts, URL). |
| sites/jax/intro.md | Adds the jax site intro/landing page under sites/jax/. |
| sites/jax/about_jax.md | Adds the jax site “about JAX” page under sites/jax/. |
| sites/jax/_toc.yml | Adds the jax site TOC selecting pool lectures and site pages for builds. |
| sites/jax/_config.yml | Adds the jax site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| sites/intro/zreferences.md | Adds the intro site references page under sites/intro/. |
| sites/intro/troubleshooting.md | Adds the intro site troubleshooting page under sites/intro/. |
| sites/intro/status.md | Adds the intro site status page under sites/intro/. |
| sites/intro/site.yml | Adds site.yml for the intro site with build/workflow metadata (runner, outputs, timeouts, URL). |
| sites/intro/intro.md | Adds the intro site landing page under sites/intro/. |
| sites/intro/about.md | Adds the intro site about page under sites/intro/. |
| sites/intro/_toc.yml | Adds the intro site TOC selecting pool lectures and site pages for builds. |
| sites/intro/_config.yml | Adds the intro site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| sites/intermediate/zreferences.md | Adds the intermediate site references page under sites/intermediate/. |
| sites/intermediate/troubleshooting.md | Adds the intermediate site troubleshooting page under sites/intermediate/. |
| sites/intermediate/status.md | Adds the intermediate site status page under sites/intermediate/. |
| sites/intermediate/site.yml | Adds site.yml for the intermediate site with build/workflow metadata (runner, outputs, timeouts, URL). |
| sites/intermediate/intro.md | Adds the intermediate site landing page under sites/intermediate/. |
| sites/intermediate/_toc.yml | Adds the intermediate site TOC selecting pool lectures and site pages for builds. |
| sites/intermediate/_config.yml | Adds the intermediate site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| sites/dp/zreferences.md | Adds the dp site references page under sites/dp/. |
| sites/dp/status.md | Adds the dp site status page under sites/dp/. |
| sites/dp/site.yml | Adds site.yml for the dp site with HTML-only publishing metadata used by workflows. |
| sites/dp/intro.md | Adds the dp site landing page under sites/dp/. |
| sites/dp/_toc.yml | Adds the dp site TOC selecting pool lectures and site pages (including the documented dp-specific ordering change). |
| sites/dp/_config.yml | Adds the dp site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| sites/advanced/zreferences.md | Adds the advanced site references page under sites/advanced/. |
| sites/advanced/troubleshooting.md | Adds the advanced site troubleshooting page under sites/advanced/. |
| sites/advanced/status.md | Adds the advanced site status page under sites/advanced/. |
| sites/advanced/site.yml | Adds site.yml for the advanced site with build/workflow metadata (runner, outputs, timeouts, URL). |
| sites/advanced/intro.md | Adds the advanced site landing page under sites/advanced/. |
| sites/advanced/_toc.yml | Adds the advanced site TOC selecting pool lectures and site pages for builds. |
| sites/advanced/_config.yml | Adds the advanced site Jupyter Book configuration, largely verbatim with marked site-specific additions. |
| README.md | Updates repository documentation to describe the mirror → pool → sites model and the related tools/checks. |
| products/.gitkeep | Removes the obsolete products/ placeholder file as the repository vocabulary shifts to sites/. |
| .github/workflows/pool-check.yml | Updates the pool-check workflow to run when sites/** changes and reflects site-related checks in comments. |
| _base/README.md | Updates placeholder documentation wording from “product” to “site”. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One folder per published site,
sites/<key>/, for all six series, with the checks that keep them true. For QuantEcon/project-monorepo#21; its Done when (every site builds through the build workflow) follows with the workflow and dp's first build (QuantEcon/project-monorepo#25, QuantEcon/project-monorepo#77), so this does not complete it.The folder is
sites/, notproducts/By the owner's decision of 2026-11-17: every entry is exactly one published site, and a future course or reader is also one site. The empty
products/placeholder goes, and the vocabulary follows in the tools, tests, README and workflow comments (tools/promote'sPRODUCT_PAGESbecomesSITE_PAGES, same behaviour; only a skip message's wording changes). "Product" stays only where it quotes history.What each
sites/<key>/holds_config.ymland_toc.yml, verbatim at the pin, plus additions on lines marked# site addition. Removing every marked line gives back the series' file byte for byte. The additions: a per-site execution cache (_build/jupyter_cache/<key>);intersphinx_disabled_reftypes: []where the series lacks it; the site mapping itself inintersphinx_mappingwhere it lacks that (dp, a consumer, maps nothing: no site mapsdp);only_build_toc_files: truefor programming and advanced, so a build reads only the site's lectures; and, in dp's toc,mccall_riskaftermccall_fitted_vfi(decided 2026-10-09 on QuantEcon/project-monorepo#76).intro,status,troubleshooting,zreferences,about,about_jax, as each series has them) and its branding and page assets under_static/, byte-identical to the series.site.yml, the fields the build workflow reads:Runner and outputs come from each series'
publish.ymlandci.ymlat its pin;cell_timeoutisexecute: timeout(no series sets a job time limit);urlishtml.baseurl. dp publishes HTML only.sites/README.mdrecords the fields, every deviation from verbatim, how to stage and build a site locally, and the rules from QuantEcon/project-monorepo#22 and QuantEcon/project-monorepo#76: every site maps itself, no site mapsdp, names are unique across the published sites, and a link with no target in the site resolves on the lecture's home site.Tools and checks
tools/stage-site <key>copies a site's pages and_staticinto the pool folder beforejb build(the copy step the owner ruled), refusing any destination that already exists, and records what it copied in_build/stage-site.json.--cleanremoves only what that record lists, while its bytes are still the site's.tools/pool-checkgains five rules, run on every pull request that toucheslectures/orsites/:site-layout,site-toc(every entry a pool lecture or a site page),site-page(no site file shares a path with the pool),site-config(branding present, the required additions present, no consumer mapped, a non-consumer mapped to itsurl; a section of the wrong type is a finding, not a crash) andsite-yml.tools/drift-checkgainssite-stale: after every sync, each site file is compared with the series' copy at the pin (additions removed); a difference is adriftissue that closes itself when the site is brought into step.Checked
tools/tests/test_sites.pyand the drift-check tests are new).tools/pool-check,tools/assets-report --check-indexandtools/drift-checkare clean on the tree.-n -W --keep-going, execution off). The only warnings came from execution being off; no{doc}link or cross-reference failed, and the out-of-site links resolved to their home sites. A real, executing build is QuantEcon/project-monorepo#25's. A strict build is stricter than intro's and advanced's own publish builds; that is for QuantEcon/project-monorepo#25 to settle per site.Review
An independent adversarial review found no blocking defect; its two should-fix findings (a clean that could remove a tracked file identical to a site file, and no watch on the copied files upstream) and five minor ones are settled in the third commit, each with a test.
Lecture content is unchanged: no file under
lectures/changes.🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMXuHMiWb8victibwcU