Skip to content

⬆️ Upgrade build software and dependencies#97

Closed
mmcky wants to merge 7 commits into
mainfrom
upgrade-build-software-2025
Closed

⬆️ Upgrade build software and dependencies#97
mmcky wants to merge 7 commits into
mainfrom
upgrade-build-software-2025

Conversation

@mmcky

@mmcky mmcky commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Summary

Upgrades build software and dependencies to align with lecture-python-intro.

Changes

environment.yml

  • Upgrade anaconda to 2025.12
  • Upgrade quantecon-book-theme to 0.15.1
  • Add jupyter-book version constraint (<2.0)

.github/dependabot.yml

  • Add conda ecosystem with weekly schedule
  • Add ignore rule for jupyter-book >= 2.0

.github/workflows/ci.yml

  • Temporarily disable build cache for full execution check

lectures/_config.yml

  • Add nb_merge_streams: true
  • Add path_to_docs: lectures

Reference

- Upgrade anaconda to 2025.12
- Upgrade quantecon-book-theme to 0.15.1
- Add jupyter-book version constraint (<2.0)
- Configure Dependabot for conda ecosystem with jupyter-book restriction
- Add nb_merge_streams and path_to_docs to _config.yml
- Temporarily disable build cache for full execution check
@netlify

netlify Bot commented Dec 22, 2025

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 576cbc1
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/694a0aa97e0b8500088ec294
😎 Deploy Preview https://deploy-preview-97--astonishing-narwhal-a8fc64.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.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request December 22, 2025 01:51 Inactive
…precated JAX API, fix undefined variable

- Add 'import matplotlib as mpl' to 7 files that use mpl.font_manager
- Fix docstring indentation in ogm.py (7 spaces -> 8 spaces)
- Update deprecated jax.lib.xla_bridge to jax.extend.backend in back_prop.md
- Fix undefined variable '失败者列表' -> 'loser_list' in house_auction.md
@mmcky

mmcky commented Dec 23, 2025

Copy link
Copy Markdown
Contributor Author

Build Error Fixes

Fixed all 14 build errors across 11 files:

1. Missing import matplotlib as mpl (7 files)

Added the missing import before mpl.font_manager.fontManager.addfont() usage:

  • lectures/imp_sample.md
  • lectures/likelihood_bayes.md
  • lectures/likelihood_ratio_process.md
  • lectures/likelihood_ratio_process_2.md
  • lectures/likelihood_var.md
  • lectures/mix_model.md
  • lectures/wald_friedman_2.md

2. IndentationError (1 file, affects 3 notebooks)

Fixed docstring indentation in lectures/_static/lecture_specific/optgrowth_fast/ogm.py:

  • Changed line 37 from 7 spaces to 8 spaces for "生产函数" docstring
  • This fixes errors in: coleman_policy_iter.md, egm_policy_iter.md, optgrowth_fast.md

3. Deprecated JAX API (1 file)

Updated lectures/back_prop.md to use current JAX API:

  • Replaced from jax.lib import xla_bridge with import jax.extend
  • Replaced xla_bridge.get_backend().platform with jax.extend.backend.get_backend().platform

4. Undefined Variable (1 file)

Fixed lectures/house_auction.md:

  • Changed 失败者列表 (Chinese variable name) to loser_list (defined in previous cell)

Note: Hardware-dependent packages (torch, POT, pyro-ppl, numpyro) are installed via pip index versions sphinx-togglebutton install commands in the notebooks themselves, not in environment.yml.

Python version should be constrained by the anaconda distribution version
specified in environment.yml, not updated independently by dependabot.
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 20651ee
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a5b4db7c79fba00085ffdb7
😎 Deploy Preview https://deploy-preview-97--astonishing-narwhal-a8fc64.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.

mmcky added a commit that referenced this pull request Jul 18, 2026
environment.yml copied from lecture-python.myst (anaconda 2026.06,
jupyter-book <2.0, quantecon-book-theme 0.21.0, sphinx-tojupyter 0.6.0
and current sphinx-* pins) so the resynced 2026-era lecture code builds
against the same stack the source executes under. Adds the source's
nb_merge_streams setting to _config.yml.

Supersedes the environment half of #97 (which pinned anaconda 2025.12 /
theme 0.15.1 — current in December, seven months behind now).

Part of Phase 0 Track B, QuantEcon/lecture-python.myst#947.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@mmcky

mmcky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded, per review with Matt: the environment/config half landed via #165 (aligned to the source's current pins — this PR's December pins had fallen seven months behind), and the CI/dependabot half plus the missing wald_dec_rule.png carried forward into #166. The lecture-code fixes here were either regenerated correctly by the Track B resync wave (back_prop's jax API, house_auction's identifier) or applied directly to the wave branches (the five missing import matplotlib as mpl lines — found by sweeping the wave for exactly the bug class this PR had fixed in December). The ogm.py tweak targets optgrowth_fast, which was removed in #99. Nothing in this PR was lost — thanks nisha617/Matt for the December groundwork; it directly seeded today's fixes.

@mmcky mmcky closed this Jul 18, 2026
mmcky added a commit that referenced this pull request Jul 18, 2026
#97) (#166)

* CI hardening: strict builds, conda dependabot, missing wald_dec_rule.png

Carries forward the pieces of #97 that #165 did not supersede:

- jb build gains '-n -W --keep-going' in cache/ci/publish workflows,
  matching the English source repos' strict-build convention
- dependabot watches the conda ecosystem (jupyter-book pinned <2.0,
  python constrained by the anaconda distribution)
- wald_dec_rule.png copied from the source repo (referenced by
  wald_friedman_2 but absent here - a warning today, an error under -W)

Dropped from #97 as obsolete: the lecture-code fixes (regenerated by the
Track B resync wave or applied directly to its branches) and the ogm.py
tweak (optgrowth_fast was removed in #99).

Part of Phase 0 Track B, QuantEcon/lecture-python.myst#947.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Fix the two main-content strict-build breaks: mix_model import, cass_fiscal ref

mix_model kept a CJK font-config block without the mpl import it needs
(same class as the five wave-branch fixes; mix_model was skipped by the
wave so the pre-existing bug stayed on main). cass_fiscal's note pointed
{doc} at a document that never existed; replaced with the wave branch's
exact {ref}`growth_model` sentence so the resync PR merges cleanly over
it. newton_method's two iref_ambiguous warnings are NOT patched here:
old main lacks the local anchors, and the resync PR (#140) adds them -
merging #140 resolves those warnings without conflict-prone edits.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant