feat: integrate TinyTorch into MLSysBook repository

TinyTorch educational deep learning framework now lives at tinytorch/

Structure:
- tinytorch/src/         - Source modules (single source of truth)
- tinytorch/tito/        - CLI tool
- tinytorch/tests/       - Test suite
- tinytorch/site/        - Jupyter Book website
- tinytorch/milestones/  - Historical ML implementations
- tinytorch/datasets/    - Educational datasets (tinydigits, tinytalks)
- tinytorch/assignments/ - NBGrader assignments
- tinytorch/instructor/  - Teaching materials

Workflows (with tinytorch- prefix):
- tinytorch-ci.yml           - CI/CD pipeline
- tinytorch-publish-dev.yml  - Dev site deployment
- tinytorch-publish-live.yml - Live site deployment
- tinytorch-build-pdf.yml    - PDF generation
- tinytorch-release-check.yml - Release validation

Repository Variables added:
- TINYTORCH_ROOT  = tinytorch
- TINYTORCH_SRC   = tinytorch/src
- TINYTORCH_SITE  = tinytorch/site
- TINYTORCH_TESTS = tinytorch/tests

All workflows use \${{ vars.TINYTORCH_* }} for path configuration.

Note: tinytorch/site/_static/favicon.svg kept as SVG (valid for favicons)
This commit is contained in:
Vijay Janapa Reddi
2025-12-05 19:23:18 -08:00
parent 327077185d
commit c602f97364
536 changed files with 185348 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
# End-to-End User Journey Tests
This directory contains tests that simulate the complete student experience with TinyTorch.
## Philosophy
Unlike unit tests (test components) or integration tests (test interactions), E2E tests verify:
- **The complete user journey works from start to finish**
- **Commands chain together correctly**
- **Progress tracking persists across operations**
- **Milestones unlock at the right time**
## Test Levels
### Level 1: Quick Verification (~30 seconds)
```bash
pytest tests/e2e/test_user_journey.py -k quick -v
```
- Verifies CLI commands work
- Checks module/milestone structure exists
- No actual training
### Level 2: Module Flow (~2 minutes)
```bash
pytest tests/e2e/test_user_journey.py -k module_flow -v
```
- Tests module start → complete → export cycle
- Verifies progress tracking
- Tests prerequisite enforcement
### Level 3: Full Journey (~5-10 minutes)
```bash
pytest tests/e2e/test_user_journey.py -k full_journey -v
```
- Complete flow from setup to first milestone
- Actual module completion
- Milestone unlock verification
### Level 4: Release Validation (~30 minutes)
```bash
./tests/e2e/validate_release.sh
```
- Simulates fresh git clone
- Full setup through milestone 01
- Tests pip installability
- Comprehensive verification
## Running Before Release
Before any release, run:
```bash
# Quick sanity check
make e2e-quick
# Full validation (recommended before release)
make e2e-full
```
## What Gets Tested
1. **Setup Flow**
- `tito setup --skip-profile` works non-interactively
- Environment validation passes
- Package is importable
2. **Module Workflow**
- `tito module start 01` works
- `tito module complete 01` exports correctly
- Progress tracking updates
- `tito module status` shows correct state
3. **Prerequisite Enforcement**
- Can't start module 02 without completing 01
- Can't run milestone 02 without prerequisites
4. **Milestone Flow**
- Milestones list correctly
- `tito milestone run 01` executes
- Completion is tracked
5. **Error Handling**
- Graceful failures for invalid commands
- Helpful error messages