You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MAINT: tidy up orphaned _static/lecture_specific/optgrowth_fast/ (and related optgrowth-series) files #1033
lectures/_static/lecture_specific/optgrowth_fast/ contains two code snippets (ogm.py, ogm_crra.py)
that were :load:-ed by the old lecture optgrowth_fast.md ("Optimal Growth II: Accelerating the Code
with Numba").
That lecture was deleted in #679 (merged 2025-11-08), which refactored the optimal growth series into
the cake eating series (now the os_* lectures) with inline NamedTuple models. The refactor inlined
or removed the other external code files it used, but this folder was left behind.
Current state
No lecture references optgrowth_fast/: there are no :load: directives or other references to ogm.py / ogm_crra.py anywhere in the repo, and OptimalGrowthModel appears nowhere outside these
two files. (The only lecture still loading a static .py is markov_perf.)
Further evidence the files are never executed: ogm_crra.py defines u_prime_inv(c) without self
while its body references self.γ, which would fail on any call.
Two other leftovers from the same refactor also appear unreferenced:
The only hits are the class definitions inside ogm.py and ogm_crra.py themselves. Nothing outside these folders refers to them.
2. Referenced from outside this repo.
If this happened, deleting the file would break someone else's page or code. Only two things can point at our copy of a file: the published site URL, or a raw GitHub URL. I searched for both.
optgrowth: the hits are of two kinds. Some are old S3 bucket URLs (s3-ap-southeast-2.amazonaws.com/python.quantecon.org/...). The bucket is named after the site, so these also match the search, but that host returns 404 today. The rest point at python.quantecon.org itself, and they all link to the same file, solution_og_ex2.png, from two repos. I come back to this at the end of this comment.
coleman_policy_iter: nothing points at python.quantecon.org. Only the same old S3 host appears.
raw URL: one hit, and it downloads risk_aversion_or_mistaken_beliefs/fred_data.csv, not one of these folders. (The command prints only the matching line, which is the first half of that URL. The web UI, or --json textMatches, shows the following lines as well.)
The third query is only the host and the repo name, because a long URL is sometimes split over several lines and then an exact search does not match it. For the same reason I also searched by file name, which is never split:
ogm_crra and solve_time_iter return only relative :load: lines, in lecture-dynamics, tom-course-2025 and a few forks outside QuantEcon. Each of those repos keeps its own copy.
(solve_time_iter also matches some unrelated projects by coincidence.)
solution_og_ex2 returns image links on other sites as well, mainly julia.quantecon.org and dynamics.quantecon.org, plus the old S3 host again. The only links to python.quantecon.org are the ones I already mentioned above.
3. Still served on the published site.
If a file is still served, deleting it will break any link to it. I checked all five files:
One thing I would like to confirm before deleting.
This is the point I mentioned in step 2. solution_og_ex2.png is still linked by URL from two places: the old optgrowth_fast.ipynb in lecture-python.notebooks, and a personal copy in shlff/qe-lec. Both are archives of the deleted lecture, so I think we can delete the PNG. But please tell me if you would rather keep it. (3ndp.pdf has no such link.)
One caveat: GitHub code search only covers public repos and is not complete. So this shows that I found no consumer. It is not a proof that none exists. If someone reports a problem later, we can restore the files from git history.
If this looks fine, I will open a PR that deletes all three folders.
Activity
Chihiro2000GitHub commentedon Aug 13, 2026
Thanks @mmcky for writing this up.
I would like to take this on, since it came from #962 and #963.
I will go through the checklist and open a PR.
Chihiro2000GitHub commentedon Aug 14, 2026
Hi @mmcky
I looked into the first checkbox.
Note that I did this investigation with Claude's help. I did not simply trust its output. I ran the searches myself and checked the results.
A file in
_static/can be used in three different ways, so I checked each way separately.1. Used by a lecture in this repo.
If this happened, the build would break. You already checked this in the issue, and I get the same result.
The only hits are the class definitions inside
ogm.pyandogm_crra.pythemselves. Nothing outside these folders refers to them.2. Referenced from outside this repo.
If this happened, deleting the file would break someone else's page or code. Only two things can point at our copy of a file: the published site URL, or a raw GitHub URL. I searched for both.
optgrowth: the hits are of two kinds. Some are old S3 bucket URLs (s3-ap-southeast-2.amazonaws.com/python.quantecon.org/...). The bucket is named after the site, so these also match the search, but that host returns 404 today. The rest point atpython.quantecon.orgitself, and they all link to the same file,solution_og_ex2.png, from two repos. I come back to this at the end of this comment.coleman_policy_iter: nothing points atpython.quantecon.org. Only the same old S3 host appears.risk_aversion_or_mistaken_beliefs/fred_data.csv, not one of these folders. (The command prints only the matching line, which is the first half of that URL. The web UI, or--json textMatches, shows the following lines as well.)The third query is only the host and the repo name, because a long URL is sometimes split over several lines and then an exact search does not match it. For the same reason I also searched by file name, which is never split:
These do not add anything new.
ogm_crraandsolve_time_iterreturn only relative:load:lines, inlecture-dynamics,tom-course-2025and a few forks outside QuantEcon. Each of those repos keeps its own copy.(
solve_time_iteralso matches some unrelated projects by coincidence.)solution_og_ex2returns image links on other sites as well, mainlyjulia.quantecon.organddynamics.quantecon.org, plus the old S3 host again. The only links topython.quantecon.orgare the ones I already mentioned above.3. Still served on the published site.
If a file is still served, deleting it will break any link to it. I checked all five files:
All five are still served, but the lecture page itself (https://python.quantecon.org/optgrowth_fast.html) is already gone. So the files are still
published even though the lecture no longer exists.
One thing I would like to confirm before deleting.
This is the point I mentioned in step 2.
solution_og_ex2.pngis still linked by URL from two places: the oldoptgrowth_fast.ipynbinlecture-python.notebooks, and a personal copy inshlff/qe-lec. Both are archives of the deleted lecture, so I think we can delete the PNG. But please tell me if you would rather keep it. (3ndp.pdfhas no such link.)One caveat: GitHub code search only covers public repos and is not complete. So this shows that I found no consumer. It is not a proof that none exists. If someone reports a problem later, we can restore the files from git history.
If this looks fine, I will open a PR that deletes all three folders.