Skip to content

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

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 second 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's is QuantEcon/lecture-python-intro#872.

File Change
environment.yml quantecon-book-theme 0.22.0 to 0.22.2, sphinx-exercise 1.2.1 to 1.2.2 (the newest releases; jupyter-book 1.x, sphinx-tojupyter, sphinxext-rediraffe, sphinxcontrib-youtube and sphinx-togglebutton are already at theirs; programming's configuration loads neither sphinx-proof nor sphinx-reredirects, so they are not added)
pandas, pandas_panel, polars, scipy five install lines drop --upgrade: wbgapi, yfinance (twice), seaborn, polars and quantecon

The GPU workflows already pin jax[cuda13]==0.11.0, as the monorepo's list does, and the execution workflows install the build stack unpinned, so they take the newest; neither changes.

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. Without --upgrade the line installs the package where it is missing and leaves it alone where it is there. In this series' own build seaborn comes from Anaconda 2026.07 (0.13.2, also the newest release); the others are not in Anaconda, so the line still installs the newest.

For the reviewer: a reader running these notebooks on Colab now gets Colab's preinstalled yfinance, polars, seaborn and quantecon where it has them, instead of the newest.

Validation

By the owner's rule for any software upgrade on a series, this merges only after a full validation of the site: a fresh build with every lecture executed, compared with one of main for new warnings (DeprecationWarning, FutureWarning, Sphinx), for changed cell outputs and for rendering regressions page by page, plus the Colab path. The evidence follows in a comment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL

…install lines

environment.yml takes quantecon-book-theme 0.22.2 and sphinx-exercise 1.2.2, the newest releases, which the QuantEcon lecture monorepo's one environment pins (QuantEcon/lectures#70). Five install lines in pandas, pandas_panel, polars and scipy 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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
Copilot AI balanced review requested due to automatic review settings November 18, 2026 22:13

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

This change alters dependency versions and notebook installation behavior in ways that can affect executed lecture outputs and site rendering, so it requires a fresh full Jupyter Book build/execution and rendering/Colab spot-check before it’s safe to approve.

No open issues 🎉

What changed in this PR

Aligns this lecture series’ build environment with the shared QuantEcon baseline and adjusts notebook-local install cells to avoid unintended environment-wide upgrades during sequential execution.

Changes:

  • Update pinned build-stack dependencies in environment.yml (quantecon-book-theme 0.22.0 → 0.22.2, sphinx-exercise 1.2.1 → 1.2.2).
  • Remove --upgrade from selected lecture pip install cells to prevent overwriting already-installed/pinned packages during full builds.
File Description
lectures/​scipy.md Removes --upgrade from the lecture’s pip install quantecon cell to avoid upgrading an existing environment install during builds.
lectures/​polars.md Removes --upgrade from the pip install polars yfinance cell to prevent overriding preinstalled versions when present.
lectures/​pandas.md Drops --upgrade from pip install cells for wbgapi and yfinance to avoid mid-build upgrades that can affect later lectures.
lectures/​pandas_panel.md Removes --upgrade from the pip install seaborn cell to preserve the environment-provided seaborn version during execution builds.
environment.yml Bumps pinned documentation/theme dependencies to match the shared baseline (quantecon-book-theme 0.22.2 and sphinx-exercise 1.2.2).

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

@github-actions

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 (28 notebooks each, strict -W, GPU), all green: main 426fb42 (run 44411864649) and this PR at 035f5a8 (run 44411860390, repeated as run 44413950424). Both sides installed jax 0.11.0 with the CUDA 13 plugin, numpyro 0.22.0 and matplotlib 3.11.0; the packages differ only in the theme and sphinx-exercise. The logs carry no DeprecationWarning, FutureWarning or Sphinx warning, and the warnings and tracebacks inside cell outputs are the same on both sides (the lectures that show them on purpose).
  • Page by page (31 pages): equal counts of exercises, solutions, admonitions, figures, tables, math, embedded media and external links on every page. Every other difference also appears between two builds of main (random draws, timings, download bars); in pandas, pandas_panel, polars and scipy the only change is the removed --upgrade, with 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 and search pages is left out (fix: leave out the View Source button on pages without a repository URL quantecon-book-theme#453).
  • Colab path (this series has no Colab check, so run locally with Colab's own versions: polars 1.35.2, yfinance 0.2.66, pandas 2.2.3, seaborn 0.13.2, quantecon 0.13.1): pandas, pandas_panel and scipy ran without error, pandas fetching its Yahoo data on yfinance 0.2.66; polars ran end to end with Yahoo's prices replaced by synthetic ones of the same shape, as Yahoo throttled the machine after its first requests. The plain install lines leave Colab's versions in place.
  • One line, not from this PR: about_py showed "Matplotlib is building the font cache" in the PR's builds. An instrumented pair, main (run 44418219319) and this PR (run 44418224343), shows main gets it too: matplotlib's first font scan on a freshly launched instance takes 10 to 13 s when cold (1.9 s warm, the same in both environments), and it prints the notice past 5 s. A separate pull request warms the font cache before the build.

@mmcky

mmcky commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python-programming.zh-cn
Translation PR: QuantEcon/lecture-python-programming.zh-cn#151
Files synced (4):

  • lectures/pandas.md
  • lectures/pandas_panel.md
  • lectures/polars.md
  • lectures/scipy.md

@mmcky

mmcky commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fa)

Target repo: QuantEcon/lecture-python-programming.fa
Translation PR: QuantEcon/lecture-python-programming.fa#185
Files synced (4):

  • lectures/pandas.md
  • lectures/pandas_panel.md
  • lectures/polars.md
  • lectures/scipy.md

@mmcky

mmcky commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fr)

Target repo: QuantEcon/lecture-python-programming.fr
Translation PR: QuantEcon/lecture-python-programming.fr#110
Files synced (4):

  • lectures/pandas.md
  • lectures/pandas_panel.md
  • lectures/polars.md
  • lectures/scipy.md

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