From fb2f0148405895cb923061c459cceceed7ad040b Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 24 Jul 2026 13:34:15 +1000 Subject: [PATCH 1/2] FIX: install quantecon in networks.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `lectures/networks.md` imports `quantecon` but its pip cell never installs it. The lecture builds today only because `markov_chains_I`, `markov_chains_II` and `eigen_II` appear earlier in the TOC and install `quantecon` into the same runner environment, so a full cold build satisfies the dependency by accident. That breaks as soon as the lecture executes on its own — the normal case with a warm `jupyter-cache`, where only the edited notebook is re-run. Observed in the Chinese edition, which carries the same gap as a faithful translation. Adds `quantecon` to the lecture's own pip cell and splits the cell to one package per line, matching `input_output.md` and the style guide. Closes #801 Co-Authored-By: Claude Opus 4.8 (1M context) --- lectures/networks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lectures/networks.md b/lectures/networks.md index c5866b97..60102e76 100644 --- a/lectures/networks.md +++ b/lectures/networks.md @@ -16,7 +16,9 @@ kernelspec: ```{code-cell} ipython3 :tags: [hide-output] -!pip install quantecon-book-networks==1.6 pandas-datareader +!pip install quantecon +!pip install quantecon-book-networks==1.6 +!pip install pandas-datareader ``` ## Outline From fcb98a09485de223399d0e3c2a5035811a6fc3fd Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 24 Jul 2026 13:40:33 +1000 Subject: [PATCH 2/2] MAINT: drop pip installs that no lecture uses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three installed packages are never imported or used: - `input_output.md` installs `quantecon` and `pandas-datareader`; the lecture only ever uses `quantecon_book_networks`, and has no `qe.` call anywhere. - `networks.md` installs `pandas-datareader` but never touches it. `pandas_datareader` is imported by exactly one lecture, `business_cycle.md`, which installs it itself. `quantecon` is imported by `eigen_II`, `markov_chains_I`, `markov_chains_II` and `networks`, each of which now installs it itself. Neither is a declared dependency of `quantecon-book-networks==1.6`, so nothing pulls them in transitively. `xlrd` in `inflation_history.md` is deliberately left alone: it is never imported but is required by `pd.read_excel` to read the lecture's `.xls` dataset. Builds on #802 — that PR makes `networks.md` install its own `quantecon`, without which removing `input_output.md`'s copy would reopen the same hole from the other end. Co-Authored-By: Claude Opus 4.8 (1M context) --- lectures/input_output.md | 2 -- lectures/networks.md | 1 - 2 files changed, 3 deletions(-) diff --git a/lectures/input_output.md b/lectures/input_output.md index 320345ed..6c8fa595 100644 --- a/lectures/input_output.md +++ b/lectures/input_output.md @@ -21,8 +21,6 @@ This lecture requires the following imports and installs before we proceed. :tags: [hide-output] !pip install quantecon_book_networks==1.6 -!pip install quantecon -!pip install pandas-datareader ``` ```{code-cell} ipython3 diff --git a/lectures/networks.md b/lectures/networks.md index 60102e76..dbecb6e3 100644 --- a/lectures/networks.md +++ b/lectures/networks.md @@ -18,7 +18,6 @@ kernelspec: !pip install quantecon !pip install quantecon-book-networks==1.6 -!pip install pandas-datareader ``` ## Outline