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.