Repository navigation
Raise the build stack to the shared baseline, pin kaleido, drop --upgrade from install lines - #416
Conversation
…rade from install lines - environment.yml: quantecon-book-theme 0.22.2, sphinx-exercise 1.2.2, sphinx-proof 0.4.1, kaleido==1.5.2, the versions of the lecture baseline, QuantEcon/lectures' _base/environment-update.yml. - --upgrade dropped from 43 install lines (quantecon, optax, statsmodels): 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. - BCG_incomplete_mkts and knowing_forecasts_of_others: the `!conda install -y -c plotly plotly plotly-orca` line becomes `!pip install kaleido`, as in BCG_complete_mkts. The lectures export their figures with engine="kaleido"; orca, plotly's retired exporter, is not used, and the conda line also replaced the environment's plotly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🔵 Needs a closer look
The supplied evidence lacks the required fresh main/branch execution, warning/output and rendering comparisons, and Colab validation, which static inspection and cached CI cannot establish.
No open issues 🎉
What changed in this PR
This PR aligns the advanced Python lecture series with QuantEcon’s shared build baseline and prevents lecture setup cells from unnecessarily upgrading installed packages.
Changes:
- Updates the book theme and Sphinx extensions, and pins Kaleido to 1.5.2.
- Removes
--upgradefrom 43 installation commands across 40 lectures. - Replaces two obsolete Plotly/Orca conda commands with Kaleido installation commands.
| File | Description |
|---|---|
lectures/tax_smoothing_3.md |
Removes forced quantecon upgrade. |
lectures/tax_smoothing_2.md |
Removes forced quantecon upgrade. |
lectures/tax_smoothing_1.md |
Removes forced quantecon upgrade. |
lectures/supply_demand_var.md |
Removes forced quantecon upgrade. |
lectures/stationary_densities.md |
Removes forced quantecon upgrade. |
lectures/smoothing.md |
Removes forced quantecon upgrade. |
lectures/smoothing_tax.md |
Removes forced quantecon upgrade. |
lectures/rosen_schooling_model.md |
Removes forced quantecon upgrade. |
lectures/robustness.md |
Removes forced quantecon upgrade. |
lectures/rob_markov_perf.md |
Removes forced quantecon upgrade. |
lectures/policy_invertibility.md |
Removes forced quantecon upgrade. |
lectures/policy_counterfactuals.md |
Removes forced quantecon upgrade. |
lectures/permanent_income_dles.md |
Removes forced quantecon upgrade. |
lectures/opt_tax_recur.md |
Removes forced quantecon upgrade. |
lectures/muth_kalman.md |
Removes forced quantecon upgrade. |
lectures/markov_jump_lq.md |
Removes forced quantecon upgrade. |
lectures/lucas_asset_pricing_dles.md |
Removes forced quantecon upgrade. |
lectures/lqramsey.md |
Removes forced quantecon upgrade. |
lectures/knowing_forecasts_of_others.md |
Removes quantecon upgrade; replaces Orca setup with Kaleido. |
lectures/irfs_in_hall_model.md |
Removes forced quantecon upgrade. |
lectures/induced_priors.md |
Removes forced quantecon upgrade. |
lectures/hs_invertibility_example.md |
Removes forced quantecon upgrade. |
lectures/growth_in_dles.md |
Removes forced quantecon upgrade. |
lectures/gorman_heterogeneous_households.md |
Removes forced quantecon upgrade. |
lectures/estspec.md |
Removes forced quantecon upgrade. |
lectures/dyn_stack.md |
Removes forced quantecon upgrade. |
lectures/discrete_dp.md |
Removes forced quantecon upgrade. |
lectures/cons_news.md |
Removes forced quantecon upgrade. |
lectures/cattle_cycles.md |
Removes forced quantecon upgrade. |
lectures/calvo.md |
Removes forced quantecon upgrades in both setup cells. |
lectures/calvo_machine_learn.md |
Removes forced quantecon, optax, and statsmodels upgrades. |
lectures/calvo_abreu.md |
Removes forced quantecon upgrade. |
lectures/BCG_incomplete_mkts.md |
Removes quantecon upgrade; replaces Orca setup with Kaleido. |
lectures/BCG_complete_mkts.md |
Removes forced quantecon upgrade; retains Kaleido setup. |
lectures/arma.md |
Removes forced quantecon upgrade. |
lectures/arellano.md |
Removes forced quantecon upgrade. |
lectures/amss3.md |
Removes forced quantecon upgrade. |
lectures/amss2.md |
Removes forced quantecon upgrade. |
lectures/amss.md |
Removes forced quantecon upgrade. |
lectures/additive_functionals.md |
Removes forced quantecon upgrade. |
environment.yml |
Updates theme and Sphinx extension pins; pins Kaleido to 1.5.2. |
Review effort: Balanced (adaptive)
|
Full site validation: no new warnings and no regressions. The intended changes are the only behavioural ones: statsmodels and plotly are no longer replaced partway through the build.
|
What
The fifth 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,
_base/environment-update.ymlin QuantEcon/lectures. The others are QuantEcon/lecture-python-intro#872, QuantEcon/lecture-python-programming#663 and QuantEcon/lecture-python-programming#665, QuantEcon/lecture-jax#374 and QuantEcon/lecture-python.myst#1135.environment.ymlkaleidopinned at 1.5.2. These are the baseline's versions; the rest of the build stack is already at them.--upgradedropped from 43 install lines: quantecon in 41, and optax and statsmodels incalvo_machine_learnBCG_incomplete_mkts,knowing_forecasts_of_others!conda install -y -c plotly plotly plotly-orcabecomes!pip install kaleido, the lineBCG_complete_mktsalready hasWhy the install lines change
In a build every lecture runs in one environment, so an
--upgradeline 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.--upgradereplaced it with the newest.engine="kaleido", so orca is never used, and the conda line also replaced the environment's plotly. kaleido is what the lectures need, andenvironment.ymlinstalls it for the build.kaleido 1.x needs a Chrome. GitHub's
ubuntu-latestrunners carry one, and main's builds already run all three Kaleido lectures with kaleido 1.5.1. QuantEcon/actions#342 added a pinned Chrome for Testing to QuantEcon's container images, which the monorepo's builds will use.For the reviewer, two content points:
!pip install kaleido, so each lecture's "this lecture will need the following libraries" cell names the library it uses. Say if you'd rather drop the lines outright: the build gets kaleido fromenvironment.ymleither way.back_prop;BCG_complete_mkts's plain!pip install kaleidoleaves that plotly in place. The validation's Colab path checks all three. Raise the build stack to the shared baseline, pin jax 0.12.1, drop --upgrade from install lines lecture-python.myst#1135 madeback_proprun on Colab with!pip install "kaleido>=1" "plotly>=6.1"andkaleido.get_chrome_sync(). These three could do the same, but in QuantEcon's imagesget_chrome_sync()downloads a second Chrome, which kaleido then prefers over the image's pinned one. Say if you'd like it here; otherwise it's left for a separate change.Validation
By the owner's rule for any software upgrade on a series, this merges only after a full validation of the site: fresh builds of main and of this branch with every lecture executed, compared for new warnings (DeprecationWarning, FutureWarning, Sphinx), changed cell outputs and 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