Repository navigation
Restructure the repository around one naming rule - #22
Merged
Merged
Conversation
Chinese is the source edition and English its translation: an unsuffixed file is Chinese and `-en` is English, for text, PDF and notebook alike. That retires three older spellings at once (`_experiments`, a bare English name, and the `pg` / `ac` abbreviations). - Delete the unused issue templates, CODEOWNERS and the old `.zh` entry points. - Move `scripts/` to `tools/`, `check_consistency.py` to `check_repo.py`, and `book/requirements-site.txt` to the repository root. - Add `book/chapters.yml` as the single chapter list and generate the four catalog tables and `book/_toc.yml` from it with `tools/sync_pages.py`. - Split the demo into `demo.md` and `demo-en.md` and drop the page's private `data-zh` / `data-en` layer and its own language buttons. - Reduce the language switch to one rule, add or strip `-en`, and derive each sidebar part's language from its links instead of a caption dictionary. - Drop the figure-placement assertion and the per-URL catalog assertions, both of which guarded prose the generator now owns. - Move the chapter writing template to `docs/rl-note-template.tex`, so `book/notes/` holds chapters only. - Make Chinese the default README, home page and site language. - Describe the project as lecture notes rather than a textbook. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Root cause
The repository carried three language-suffix conventions at once (
.zh,-zh,_en), andbaremeant English in two places and Chinese in fifty-eight. Chapter files also had three spellings per edition (_experiments, a bare English name,pg/acabbreviations). Every new page had to pick a convention, and five catalog tables were maintained by hand, so they drifted.Change
One naming rule: Chinese is the source edition and English its translation. An unsuffixed file is Chinese,
-enis English — for text, PDF and notebook alike (dqn.tex/dqn-en.tex).tools/chapters.pyis the only place that turns a chapter into a path.CODEOWNERS, and the old.zhentry points.scripts/totools/,check_consistency.pytocheck_repo.py, andbook/requirements-site.txtto the repository root.book/chapters.ymlas the single chapter list.tools/sync_pages.pygenerates the four catalog tables andbook/_toc.ymlfrom it.demo.mdanddemo-en.md; drop the page's privatedata-zh/data-enlayer and its own language buttons.-en, and derive each sidebar part's language from its links instead of a caption dictionary.docs/rl-note-template.tex, sobook/notes/holds chapters only.Net: 112 files, +1246 / −1324.
Verification
All five gates pass locally on the built site:
check_catalognow regenerates each catalog block frombook/chapters.ymland compares byte for byte, so a stale table fails CI instead of drifting.Cleanup
No backups, temporary files, or dead paths left. The only remaining
scripts/mention is the pinned Colab raw URL intools/colab_setup.py, which points at thev1.2.2tag's tree layout; a comment there says so, and bumpingRELEASE_TAGmeans repointing the path.Residual risk
EDITIONSsuffix map intools/chapters.py, runpython tools/sync_pages.py, rebuild.DeprecatedEnvforCliffWalking-v0, whichtemporal-difference-learningandmodel-based-rlstill use in code cells (both languages). Those four notebooks cannot be re-run as committed. Fixing it means re-running two chapters of experiments, re-exporting figures, and reconciling numbers in the text and the Failure Atlas — content work, not structure.python tools/test_colab_setup.py --smokereports it; CI does not run--smoke.🤖 Generated with Claude Code