Skip to content

MAINT: tidy up orphaned _static/lecture_specific/optgrowth_fast/ (and related optgrowth-series) files #1033

Open

Description

@mmcky

Background

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

Proposed tidy-up

Activity

  1. Chihiro2000GitHub commented on Aug 13, 2026

    @Chihiro2000GitHub
    Contributor

    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.

  2. Chihiro2000GitHub commented on Aug 14, 2026

    @Chihiro2000GitHub
    Contributor

    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.

    git grep -E "optgrowth_fast|ogm_crra|OptimalGrowthModel|3ndp|solution_og_ex2|solve_time_iter" origin/main
    

    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.

    gh search code "python.quantecon.org/_static/lecture_specific/optgrowth"
    gh search code "python.quantecon.org/_static/lecture_specific/coleman_policy_iter"
    gh search code "raw.githubusercontent.com/QuantEcon/lecture-python.myst"
    
    • 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:

    gh search code "solution_og_ex2"
    gh search code "ogm_crra"
    gh search code "solve_time_iter"
    

    These do not add anything new.

    • 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:

    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.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions