mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-01 01:59:10 -05:00
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:
85
tinytorch/tests/e2e/README.md
Normal file
85
tinytorch/tests/e2e/README.md
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user