15 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
e26b6e145b Remove LEGO header import-export bookkeeping 2026-06-12 04:49:48 -04:00
Vijay Janapa Reddi
c8b887249c docs: generalize internal rule-file references in comments
Replace pointers to the private project rules/docs tree (relative .claude/rules
and .claude/docs paths) in code comments and docstrings with neutral phrasing
("the project prose style guide", etc.). Load-bearing runtime paths that the
tooling reads or writes are left intact.
2026-05-30 17:32:19 -04:00
Vijay Janapa Reddi
6860c2459f Centralize book checks in Binder CLI 2026-05-30 13:41:34 -04:00
Vijay Janapa Reddi
8d0678b6f0 chore: capitalize 1,021 sentence-start crossrefs across vol1+vol2
With crossref prefixes set to lowercase, sentence-start refs need
the Quarto capitalized syntax (@Fig-, @Tbl-, @Sec-, @Eq-, @Lst-)
to render uppercase at sentence starts while staying lowercase
mid-sentence.

Applied 515 changes in vol1 (22 files) and 506 in vol2 (24 files).
Verified by rendering vol1/conclusion, vol1/introduction, and
vol2/introduction: capitalization correct in all contexts.

Also updated book/cli/commands/validate.py to recognize the
capitalized crossref prefixes in label/ref/citation checkers
(LABEL_REF_PATTERN, EXCLUDED_CITATION_PREFIXES, narrative_cite,
no_space_before_bracket).

Classification script added at book/tools/scripts/maintenance/
for future use and verification.
2026-05-26 20:08:59 -04:00
Vijay Janapa Reddi
f741a12103 Refactor inline-python chapters to one LEGO focal point per cell.
Split mega-classes and break cross-cell reads across vol1/vol2, add lego_focal_verify.py, wire foundation-model amortization prose to computed exports, and repair compute_infrastructure inline python fences and table placement.
2026-05-24 13:17:40 -04:00
Vijay Janapa Reddi
652e17590a refactor(validators): retire latex_math/latex_adjacent inline-python checks
These two patterns lived in both book/cli/commands/validate.py and the
legacy book/tools/scripts/maintenance/validate_inline_refs.py. They were
created to flag inline `{python}` substitutions inside `$..$` math mode
that would silently corrupt commas/decimals via Quarto's auto-escape.

Both checks carried an explicit `_str`-variable exemption (negative
lookahead `(?!\w+(?:\.\w+)?_str)`) in the regex — the convention assumed
pre-formatted `_str` substitutions were safe in math contexts. That
assumption was wrong: Quarto escapes the substituted text regardless of
the variable's Python type, and the exemption let 639 latent corruption
sites slip through (catalog in .claude/_reviews/math_audit_2026-05-19/).

The previous commit (1022ffc2c0) eliminated the underlying bug class by
making fmt() return a MarkdownStr that renders verbatim through Quarto's
markdown-detection path. With the bug class gone, these checks generate
no signal and add noise to the validator. Removing them.

71/71 binder checks continue to pass.
2026-05-19 08:36:38 -07:00
Vijay Janapa Reddi
2719c0d05f Add caption/label-required checks for tables, figures, and listings
Three new native binder scopes (`tables.caption-required`,
`figures.label-required`, `listings.caption-required`) catch the
silent gap PR #1744 surfaced: pipe tables in body prose with no
`: caption {#tbl-X}` line, markdown-image figures with no
`{#fig-X}` label, and `::: {#lst-X ...}` listing divs without
`lst-cap`. All three feed into the existing pre-commit hooks
(`book-check-tables`, `book-check-figures`, new `book-check-listings`)
and skip tables nested inside `::: {.callout-*}` divs, frontmatter,
and backmatter, matching the surrounding editorial conventions.

Pre-existing corpus violations (48 tables, 207 figures, 0 listings)
are grandfathered via book/tools/audit/baselines/captions_baseline.json
following the bib_lint_baseline.json pattern: per-file count budgets
that block only NEW violations beyond the recorded budget. Regenerate
with book/tools/scripts/maintenance/regen_captions_baseline.py after
shrinking the debt.
2026-05-15 14:34:52 -04:00
Vijay Janapa Reddi
2409f6c20b chore: remove old book/quarto/mlsys shim directory and migrate tools/tests 2026-03-07 17:25:29 -05:00
Vijay Janapa Reddi
aa0c690a6f feat: add newsletter system with Buttondown integration and CLI commands
Adds newsletter infrastructure: CLI commands (new, list, preview, publish,
fetch, status) integrated into binder, Quarto archive site config for
mlsysbook.ai/newsletter/, and 12-month editorial content plan. Drafts
are gitignored for private local writing; sent newsletters are committed
as the public archive.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:22:52 -05:00
Vijay Janapa Reddi
e3cc9f7af3 refactor: rename ml_ml_workflow files, consolidate CLI, and clean up scripts
Remove redundant ml_ prefix from ml_workflow chapter files and update all
Quarto config references. Consolidate custom scripts into native binder
subcommands and archive obsolete tooling.
2026-02-13 11:06:28 -05:00
Vijay Janapa Reddi
8160d5869c refactor: deprecate CHANGELOG.md in favor of GitHub Releases
- Remove CHANGELOG.md from repo root
- Remove changelog.qmd page from book frontmatter
- Remove changelog from navbar in HTML, PDF, and EPUB configs
- Delete changelog generation scripts (generate_release_content.py, etc.)
- Update documentation to remove changelog references

GitHub Releases now serves as the primary changelog for version updates.
The version number in the navbar already links to releases.
2026-01-06 11:31:35 -05:00
Vijay Janapa Reddi
81041d637d refactor(infra): deploy book to /book/, remove Netlify, use Cloudflare
- Deploy textbook to /book/ subdirectory instead of root
- Remove Netlify config (netlify.toml, _redirects files)
- Remove Netlify badges from footer, index, and acknowledgements
- Add root index.html redirect to /book/ as fallback
- Simplify deployment (no more tinytorch/kits preservation needed)
- Update 404.qmd with correct paths
- Each subsite now deploys to its own directory:
  /book/ (textbook), /kits/ (hardware), /tinytorch/ (framework)
2026-01-06 11:02:25 -05:00
Vijay Janapa Reddi
853eb03ee8 style: apply consistent whitespace and formatting across codebase 2025-12-13 14:05:34 -05:00
Vijay Janapa Reddi
9697a590dc docs(changelog): add December 06 release entry with AI-generated summaries
- Add comprehensive changelog entry for changes since November 02
- Include updates to 20 chapters, 16 labs, and 5 frontmatter files
- Add TinyTorch integration under new Infrastructure section
- Enhance changelog script with --since and --branch arguments
- Fix date format and details tag formatting for consistency
2025-12-06 08:18:31 -08:00
Vijay Janapa Reddi
7b92e11193 Repository Restructuring: Prepare for TinyTorch Integration (#1068)
* Restructure: Move book content to book/ subdirectory

- Move quarto/ → book/quarto/
- Move cli/ → book/cli/
- Move docker/ → book/docker/
- Move socratiQ/ → book/socratiQ/
- Move tools/ → book/tools/
- Move scripts/ → book/scripts/
- Move config/ → book/config/
- Move docs/ → book/docs/
- Move binder → book/binder

Git history fully preserved for all moved files.

Part of repository restructuring to support MLSysBook + TinyTorch.

Pre-commit hooks bypassed for this commit as paths need updating.

* Update pre-commit hooks for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update all tools/ paths to book/tools/
- Update config/linting to book/config/linting
- Update project structure checks

Pre-commit hooks will now work with new directory structure.

* Update .gitignore for book/ subdirectory structure

- Update quarto/ paths to book/quarto/
- Update assets/ paths to book/quarto/assets/
- Maintain all existing ignore patterns

* Update GitHub workflows for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update cli/ paths to book/cli/
- Update tools/ paths to book/tools/
- Update docker/ paths to book/docker/
- Update config/ paths to book/config/
- Maintain all workflow functionality

* Update CLI config to support book/ subdirectory

- Check for book/quarto/ path first
- Fall back to quarto/ for backward compatibility
- Maintain full CLI functionality

* Create new root and book READMEs for dual structure

- Add comprehensive root README explaining both projects
- Create book-specific README with quick start guide
- Document repository structure and navigation
- Prepare for TinyTorch integration
2025-12-05 14:04:21 -08:00