Repository navigation
Open
Labels
infrastructureSubstantial CI / build / deploy / tooling / automation work, or behaviour-preserving restructuringSubstantial CI / build / deploy / tooling / automation work, or behaviour-preserving restructuring
Description
Step 2 of QuantEcon/project-translation#65. It runs after #26 (round 5) and #55 have merged, and needs no engine release.
A lecture is in this edition, for sync and for the site's navigation, when its state file .translate/state/<file>.md.yml is on main. The edition has none yet. This PR writes them and switches the navigation to them at the same time. Switching scripts/prune_toc.py on its own would empty the site's navigation, because the site publishes on every push to main.
Steps
- Check each merged lecture against the English. Diff the English since the commit the lecture's round drafted from. Each round PR's Provenance line records that commit, and #65 lists them:
git -C repos/lecture-python-programming diff SHA..origin/main -- lectures/NAME.md
Carry anything the Malayalam lacks forward first, as in Bring python_by_example up to date with the English (lecture-python-programming#604 and #595) #55. Don't rely on--write-state's own guard: it compares dates only. - Write the state files with the tool, never by hand:
translate status -s repos/lecture-python-programming -t repos/lecture-python-programming.ml -l ml --write-state --exclude intro.md-l mlis required.-ldefaults tozh-cn, and--write-statewrites the language into.translate/config.yml.--exclude intro.mdkeeps the English landing page out until its round (Review: intro.md #32) merges with its own state file.statusreads only top-level files, so_admonition/gpu.mdgets no state file either.
- Change
scripts/prune_toc.pyto keep the entries whose lecture has a state file, and always the root page. Update its docstring: sync mirrors the verbatim English_toc.yml, and the build prunes it to the lectures with a state file.
Checks
translate status … -l mlreports each merged lecture ALIGNED.translate doctor -t repos/lecture-python-programming.ml -s repos/lecture-python-programminglists onlyintro.mdwithout a state file. That is a warning, and it lasts until theintroround merges.- The PR preview's navigation shows the same lectures as the live site.
Done when
- The state files and the prune change are on
mainin one merged PR, and the live site's navigation is unchanged.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
infrastructureSubstantial CI / build / deploy / tooling / automation work, or behaviour-preserving restructuringSubstantial CI / build / deploy / tooling / automation work, or behaviour-preserving restructuring
Activity