P1 pilot: read lingcod data from data-lectures#792
Draft
mmcky wants to merge 1 commit into
Draft
Conversation
Repoints msy_fishery at the canonical copy in QuantEcon/data-lectures and drops the local one, which nothing else reads. This also fixes the lecture rather than merely relocating its data. The read was a relative path, 'datasets/lingcod_msy_recovery.csv', which only resolves inside a repo checkout — a downloaded notebook has no datasets/ directory, so the cell raised FileNotFoundError in Colab. Reading over https is what makes the notebook self-contained. Uses the interim URL form github.com/QuantEcon/data-lectures/raw/main/… and the data_url convention already used by long_run_growth and inflation_history. Blocked until the data is on data-lectures main (QuantEcon/data-lectures#10, then #11) — until then this URL 404s. The branch URL resolves today, but pointing at a non-default ref is exactly the bug meta#337 is cleaning up in mle.md, so it is not a shortcut worth taking. Verified by running the cell against the data over https: 82 rows, figure renders, terminal-year null in F/Fmsy handled. Output is unchanged — the migrated file is byte-identical (sha256 fc2f873f…) to the copy removed here. Part of QuantEcon/meta#338 See QuantEcon/meta#336 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lecture half of pilot P1 — local-path static (QuantEcon/meta#338). Repoints
msy_fisheryat the canonical copy inQuantEcon/data-lecturesand drops the local one, which nothing else reads. Paired with QuantEcon/data-lectures#12.This fixes the lecture, it doesn't just relocate the data
The read was a relative path —
pd.read_csv('datasets/lingcod_msy_recovery.csv')— which only resolves inside a repo checkout. A downloaded notebook has nodatasets/directory, so this cell raisedFileNotFoundErrorin Colab. Reading over https is what makes the notebook self-contained, which is exactly the P1 exit test.Finding: the convention has a merge-order constraint, and it needs stating
The data repo's README promises "the lecture PR builds green immediately, no two-step merge." True — but only once the data is on the data repo's default branch. Probed directly:
.../data-lectures/raw/main/lectures/lingcod_msy_recovery.csv.../data-lectures/raw/datasets/p1-lingcod/lectures/...The branch URL is right there and would turn this PR green instantly. Taking it would recreate the exact bug QuantEcon/meta#337 is cleaning up —
mle.mdhas been pinned to a non-default branch ofhigh_dim_datasince 2023, and that pin is precisely why the branch cannot be deleted today. So the order is: data PR first, lecture PR second. Each is a single step, but the order is load-bearing and belongs in QuantEcon/QuantEcon.manual#108.Verification
Ran this lecture's own cell against the data over https (branch ref substituted, since main 404s): 82 rows fetched, figure renders, no exception, and the terminal-year null in
F_over_Fmsypasses throughfill_between/plotcleanly.Output cannot move: the migrated file is byte-identical to the copy removed here (
sha256 fc2f873f...), verified before the repoint.Uses the interim URL form and the
data_urlconvention already used bylong_run_growthandinflation_history.Part of QuantEcon/meta#338
See QuantEcon/meta#336