Moves the mlsysim package from book/quarto/mlsysim/ to the repo root
so it is importable as a proper top-level package across the codebase.
Key changes:
- mlsysim/fmt.py: new top-level module for all formatting helpers (fmt,
sci, check, md_math, fmt_full, fmt_split, etc.), moved out of viz/
- mlsysim/viz/__init__.py: now exports only plot utilities; dashboard.py
(marimo-only) is no longer wildcard-exported and must be imported
explicitly by marimo labs
- mlsysim/__init__.py: added `from . import fmt` and `from .core import
constants`; removed broken `from .viz import plots as viz` alias
- execute-env.yml: fixed PYTHONPATH from "../../.." to "../.." so
chapters resolve to repo root, not parent of repo
- 51 QMD files: updated `from mlsysim.viz import <fmt-fns>` to
`from mlsysim.fmt import <fmt-fns>`
- book/quarto/mlsys/: legacy shadow package contents cleaned up;
stub __init__.py remains for backward compat
- All Vol1 and Vol2 chapters verified to build with `binder build pdf`
Integrate figure rendering into the binder CLI so plots can be previewed
without a full Quarto build. Extracts Python code blocks with fig-* labels
from QMD files, renders them to PNG, and outputs a browsable gallery at
_output/plots/<chapter>/. Also fixes the package import chain so `binder`
works correctly as an installed entry point.
- Add book/cli/commands/render.py with RenderCommand class
- Wire into main.py with help table entry and command dispatch
- Add matplotlib>=3.7.0 to pyproject.toml dependencies
- Add book/quarto/_output/ to .gitignore
- Archive standalone render_figures.py to _archive/
- Add BOOK_ROOT, QUARTO_DIR, TOOLS_DIR, DEPS_DIR, DOCKER_DIR env vars to all workflows
- Update path references to use centralized env vars
- Fix requirements.txt to reference book/tools/dependencies
- Fix pyproject.toml entry points: cli.main -> book.cli.main
- Add __init__.py to book/ and book/tools/ for Python package support
- Fix Dockerfile path casing (dockerfile -> Dockerfile)
- Fix publish-live.yml relative path after cd
This enables TinyTorch to coexist at repo root alongside book/ directory.
- Add pyproject.toml with comprehensive Python package configuration
- Create tools/scripts/common/ package with shared utilities:
- base_classes.py: Abstract base classes following SOLID principles
- config.py: Centralized configuration management with environment support
- exceptions.py: Custom exception hierarchy for better error handling
- logging_config.py: Standardized logging setup across all tools
- validators.py: Input validation utilities with detailed error reporting
This establishes a proper foundation for building maintainable,
production-grade tools following software engineering best practices
as outlined in the updated .cursorrules guidelines.