3 Commits
Author SHA1 Message Date
Vijay Janapa Reddi 27d4f8114b binder: fix repo-root, build, doctor and info bugs; clearer errors; dedup
Bug fixes
- Build lock is keyed on books/ so builds started from different
  directories block each other (fixes two tests broken by 89b828efa3).
- ConfigManager resolves the repo root when binder runs from books/ or
  binder/, so bib, newsletter, doctor and render paths are right.
- `build <word> --all` treats intro/scaling/agentic/physical as chapter
  names (it built every volume), and Ctrl-C stops a --all loop.
- doctor checked chapter names that no longer exist and failed on the
  generated _quarto.yml; info defaulted to a deleted books/contents.
- `headings apply --path <typo>` no longer rewrites the whole book;
  `bib clean` stops on unreadable chapters instead of dropping entries.
- Discovery falls back to a line scan on invalid YAML instead of crashing.
- Volume III/IV were labeled Volume II in layout and release output.

Output
- Unexpected errors print the command, exception type, and raising
  file:line (new cli/core/errors.py), with the traceback on stderr.
- Chapter-not-found suggests the closest names and the list command.
- Silent except blocks in bib lookups, info, headings, layout,
  maintenance, preview and debug now say what went wrong.

Cleanup
- Shared qmd_files_under/display_path, file-rewrite loop, doctor result
  helper, preview server, clean helpers, volume display names.
- Removed legacy import fallbacks, dead config attributes, legacy backup
  restore logic, and unused imports.
2026-10-19 19:28:49 +02:00
Vijay Janapa Reddi e8e7d356db Document every binder module, class, and function
Adds docstrings to the 900 definitions and 8 modules that had none across the binder CLI, its checks, and the audit and maintenance tools, and corrects a few docstrings that no longer matched the code. Only documentation changed.
2026-09-12 12:55:34 +02:00
Vijay Janapa Reddi 14ca66d2e9 Rename bindery/ to binder/ and run the CLI by its real path
The toolchain folder is now binder/, and the root ./binder symlink is gone.
The command is ./binder/binder: a plain path to the script, with no link and
no install step. Every invocation moved with it: pre-commit entries, workflow
steps, the VS Code extension's command palette, help text, and docs.

- bindery/ paths and bindery.* imports, including the chapter code cells
  that import binder.tools.figures, now name binder/.
- Binder (mybinder.org) reads its configuration from a root binder/ folder
  and refuses to build when binder/ and .binder/ both exist. .binder/postBuild
  and .binder/requirements.txt move into binder/, so the TinyTorch "Launch
  Binder" buttons keep working; binder/README.md records which file names the
  toolchain must not use there.
- contributors/projects.json still pointed the book's contributor record at
  publishing/; it now names binder/, where that .all-contributorsrc lives.
- The margin-figure reader-link audit report linked its 222 figures through
  the retired quarto/ tree; the links now resolve under books/.

The hooks reformatted hidden Python cells and trimmed whitespace in the
Volume II chapters whose figure imports this rename touches.

Checks: ./binder/binder check cli passes (contract and canonical hooks),
binder.tools.figures imports, and every workflow YAML file parses.

binder test suite, excluding the four modules that cannot import mlsysim
through the root symlink (fixed separately): 7 failed, 346 passed.

The GitHub repository variables BOOK_ROOT, BOOK_TOOLS, BOOK_DEPS, and
BOOK_DOCKER still name the retired book/ layout and must change when this
reaches origin.
2026-09-10 15:26:07 +02:00