Skip to content

Raise the build stack to the shared baseline and drop --upgrade from install lines - #872

Merged
mmcky merged 1 commit into
mainfrom
env-baseline
Nov 18, 2026
Merged

mmcky merged 1 commit into
mainfrom
env-baseline

Conversation

@mmcky

@mmcky mmcky commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

What

The first of six pull requests, one per series, that bring the lecture series to one up-to-date baseline: the environment the QuantEcon lecture monorepo's sites are to build in, pinned in QuantEcon/lectures#70 (_base/environment-update.yml). Intro goes first as the pilot.

File Change
environment.yml quantecon-book-theme 0.22.0 to 0.22.2, sphinx-exercise 1.2.1 to 1.2.2, sphinx-proof 0.4.0 to 0.4.1 (the newest releases; jupyter-book, sphinx-tojupyter, sphinxext-rediraffe, sphinxcontrib-youtube, sphinx-togglebutton and sphinx-reredirects are already at theirs)
.github/workflows/collab.yml the same build stack in the Colab check, which also takes sphinxcontrib-youtube 1.5.0 (from 0.20.2 and 1.4.1 there)
bivariate_dist, fitting_distributions, heavy_tails, mle_intro, observed_distributions !pip install --upgrade yfinance (with wbgapi in heavy_tails) becomes !pip install yfinance

Why the install lines change

In a build every lecture runs in one environment, so an --upgrade line replaces the version the environment pins for every lecture executed after it, and the build no longer runs on the versions it was set up with. Without --upgrade the line installs the package where it is missing and leaves it alone where it is there. The lecture monorepo pins yfinance and wbgapi exactly; this series' own build installs the newest when the line runs, as before.

For the reviewer: Colab ships its own yfinance, so a reader running one of these notebooks there now gets Colab's version instead of the newest. yfinance follows changes on Yahoo's side, so an older one can stop fetching; whether that matters for these five lectures is a judgement for the review.

Checks

This changes lecture content (five install lines) and the software the series builds with, so it needs a person's review; the preview build is the check that the five lectures and the theme render as before.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

…install lines

environment.yml and the Colab workflow take quantecon-book-theme 0.22.2, sphinx-exercise 1.2.2 and sphinx-proof 0.4.1 (and sphinxcontrib-youtube 1.5.0 in the Colab workflow), the newest releases, which the QuantEcon lecture monorepo's one environment pins (QuantEcon/lectures#70). Five install lines drop --upgrade: in a build every lecture shares one environment, so an --upgrade line replaces the pinned version for every lecture executed after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
Copilot AI balanced review requested due to automatic review settings November 18, 2026 21:42
@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 17192f6
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6afe1bc89555571a5a29ef15
😎 Deploy Preview https://deploy-preview-872--taupe-gaufre-c4e660.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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The change alters Colab runtime dependency behavior by removing --upgrade from pip install yfinance/wbgapi, which could leave users on preinstalled package versions that may break data fetching, so it requires a human sanity-check in the target environment before approval.

No open issues 🎉

What changed in this PR

Raises the build stack to the shared QuantEcon baseline and removes pip install --upgrade from select notebooks to prevent environment drift during builds.

Changes:

  • Update environment.yml doc-build dependency pins (e.g., quantecon-book-theme, sphinx-exercise, sphinx-proof) to baseline versions.
  • Align the Colab CI workflow’s pinned build stack (including sphinxcontrib-youtube==1.5.0) with the baseline.
  • Drop --upgrade from !pip install cells in five lectures so later executed notebooks don’t override pinned dependencies.
File Description
lectures/​observed_distributions.md Removes --upgrade from the yfinance install cell to avoid mutating the shared build environment.
lectures/​mle_intro.md Removes --upgrade from the yfinance install cell to prevent cross-lecture dependency drift during builds.
lectures/​heavy_tails.md Removes --upgrade from the yfinance wbgapi install cell to keep the environment consistent across executed lectures.
lectures/​fitting_distributions.md Removes --upgrade from the yfinance install cell to avoid overriding pinned versions in the build environment.
lectures/​bivariate_dist.md Removes --upgrade from the yfinance install cell (in the exercise solution) to prevent environment-wide upgrades during builds.
environment.yml Bumps pinned documentation build dependencies to the shared baseline versions.
.github/​workflows/​collab.yml Updates the Colab CI workflow to install a baseline-aligned, pinned doc-build stack (including sphinxcontrib-youtube==1.5.0).

Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

@mmcky

mmcky commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Full site validation: no new warning, no regression.

  • Fresh builds, no cache, every lecture executed (56 notebooks each, strict -W), same day, both green: main 530ede2 (run 44406856695) and this PR at 17192f6 (run 44406850830). Their logs carry no DeprecationWarning, FutureWarning or Sphinx warning, and the warnings inside cell outputs are the same two on both sides, both already on main (fitting_distributions, inflation_history).
  • Page by page (66 pages): equal counts of exercises, solutions, proofs, admonitions, dropdowns, figures, tables, math, embedded videos and external links on every page. Every other difference also appears between two builds of main (random figures, timings), except mle_intro, where the only change is the removed --upgrade. The five yfinance lectures ran, with yfinance 1.8.0 in both builds and the same figure counts.
  • Theme 0.22.0 to 0.22.2, all in its changelog: rel="noopener" on links that open a new tab; the contrast button's tooltip now reads "Toggle dark mode"; the script tag for sphinx-book-theme.js, a file never copied, is gone (fix: stop registering sphinx-book-theme.js, which is never copied quantecon-book-theme#455); the View Source button that pointed at None/... on the index, search and proof-index pages is left out (fix: leave out the View Source button on pages without a repository URL quantecon-book-theme#453).
  • Colab: the Colab check (run 44404244553) ran the five yfinance lectures in Colab's runtime image with its own yfinance 0.2.66, without error.

This branch was previously deployed

1 inactive deployment
pull request — 17192f69 Deployed Nov 18, 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.

2 participants