Commit Graph

19 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
672a35335f feat(vscode-ext, tito): make extension a thin client over Tito CLI
The VS Code extension no longer implements any business logic — every
capability (module discovery, path resolution, system info, builds,
tests, clean) lives in Tito CLI commands. The extension is a pure UI
shell that delegates via `python3 -m tito.main`.

Tito CLI additions:
- `module list --json` for machine-readable module discovery
- `module path <num> --notebook|--source|--about` for file resolution
- `system info --json` for environment info
- `dev build html|serve|pdf|paper` wrapping make targets
- `dev clean [all|site]` wrapping make clean
- Banner suppression for --json and module path output

Extension hardening:
- Centralized CLI integration in utils/tito.ts (single TITO_CMD constant,
  callTito, callTitoJson, titoTerminalCommand, isTitoAvailable, log/logError)
- Replaced all silent catch{} blocks with logged errors and user feedback
- Module tree shows error/empty states with actionable Setup/Health buttons
- Info tree shows "Tito CLI unavailable" when CLI is unreachable
- Removed all setTimeout refresh hacks — file watcher on .tito/progress.json
  is the sole refresh mechanism
- Exit code tracking via onDidEndTerminalShellExecution
- Tito availability pre-flight check on activation
- BUILD_OUTPUTS constants for build artifact paths
- Zero execSync calls outside tito.ts, zero hardcoded command strings
2026-02-17 10:08:00 -05:00
Vijay Janapa Reddi
c46beda3e5 feat(cli): better error message for invalid commands 2026-01-28 12:41:58 -05:00
Vijay Janapa Reddi
aefbedbe30 fix(tinytorch): add PYTHONIOENCODING=utf-8 for Windows emoji support
Fixes encoding issues on Windows where emoji/unicode output would fail.
Thanks @lalalostcode for reporting!

See: https://github.com/harvard-edge/cs249r_book/discussions/1145
2026-01-27 13:20:37 -05:00
Vijay Janapa Reddi
54f91331af fix(docs): replace non-existent tito src with tito dev export
The `tito src` command was never implemented. All documentation
references have been updated to use the correct commands:

- `tito src export` → `tito dev export`
- `tito src test` → `tito dev test`

Also removed 'src' from developer_commands list in main.py since
it doesn't exist as a registered command.
2026-01-23 13:21:34 -05:00
Vijay Janapa Reddi
7fe85bd912 refactor(tinytorch): use pyproject.toml as single source of truth for version
- Update pyproject.toml version to 0.1.4
- Set put_version_in_init = False in settings.ini to prevent nbdev overwrite
- Update tito/main.py to read version from pyproject.toml
- Update tito/__init__.py to read version from pyproject.toml
- Sync settings.ini version to 0.1.4

This ensures tito dev validate doesn't reset the version number.
2026-01-22 08:23:16 -05:00
Vijay Janapa Reddi
6c108c6323 refactor(cli): reorganize commands and add welcome message
- Move tito update → tito system update
- Move tito logo → tito system logo
- Remove tito grade (use tito nbgrader instead)
- Add first-run welcome message for new users
- Update demo scripts and docs for new command paths
2026-01-14 16:51:06 -05:00
Vijay Janapa Reddi
fd7c0f5e2f fix(tinytorch): tito module complete no longer overwrites student notebooks
- Create tito dev export for developers (rebuilds src→notebook→package)
- Fix tito module complete to only export notebook→package (preserves student work)
- Remove deprecated tito src command
- Add module name normalization to dev export (supports 01 shorthand)
2026-01-14 12:51:02 -05:00
Vijay Janapa Reddi
f5904af1cb feat(tito): add dynamic --version flag reading from tinytorch package 2026-01-13 14:02:02 -05:00
Vijay Janapa Reddi
0c12edd231 fix(tito): remove top-level export and test shortcuts
These commands should only be accessible via 'tito module export'
and 'tito module test' to maintain consistent CLI structure.
2025-12-15 19:00:21 -05:00
Vijay Janapa Reddi
ab540c215a Fix: Corrects virtual environment detection
Ensures virtual environment detection works correctly
when using direnv or similar PATH-based activation methods,
in addition to traditional activation via sys.prefix.
This prevents tito commands from failing when run in a virtual environment activated via direnv.
2025-12-15 18:54:45 -05:00
Vijay Janapa Reddi
d8e63c0be8 refactor(tito): make setup command idempotent
Setup now skips existing components silently instead of prompting.
Running tito setup multiple times is safe - it only sets up whats missing.

Changes:
- Skip existing venv/profile without prompting (use --force to recreate)
- Check which packages are already installed before installing
- Add spinners for long-running operations
- Show step numbers (Step 1/4, 2/4, etc.) for clarity
- Update help text to explain idempotent behavior
- Pass RawDescriptionHelpFormatter to subparsers for proper formatting
2025-12-15 13:19:20 -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
125dd5f636 fix: correct module workflow export and milestone prerequisites
- Fix notebook path mismatch in SrcCommand._handle_export
  (was looking for 01_tensor.ipynb but actual file is tensor.ipynb)

- Update install.sh to preserve needed files for student workflow:
  - Keep settings.ini (required for nbdev_export)
  - Keep milestones/ (required for tito milestone run)
  - Clear tinytorch/core/*.py (students rebuild via exports)
  - Clear progress.json (students start fresh)

- Fix milestone module requirements to match actual script imports:
  - Milestone 01: [1,2,3] (Tensor, Activations, Layers)
  - Milestone 02: [1,2,3,4,5,6] (+ Losses, Autograd, Optimizers)
  - Milestone 03: [1,2,3,4,5,6,8] (+ DataLoader)
  - Milestone 04: [1,2,3,4,5,6,8,9] (+ Spatial)
  - Milestone 05: [1,2,3,4,5,6,11,12,13] (+ Embeddings, Attention, Transformers)

- Fix progress file path: read from progress.json not .tito/progress.json

- Fix module number comparison: convert string IDs to integers

- Update health check to validate modules_dir (src/) not assignments_dir

- Rename 'milestones' command to 'milestone' (singular)

- Fix test files to check correct directories for student install
2025-12-11 17:22:15 -08:00
Vijay Janapa Reddi
ddf651970f refactor(tito): remove doctor alias, use health as single command
Remove the doctor/health alias duplication in favor of a single
'tito system health' command for environment validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2025-12-11 12:34:28 -08:00
Vijay Janapa Reddi
0063b539e5 fix(tito): correct help text to 'tito system doctor' 2025-12-11 12:17:48 -08:00
Vijay Janapa Reddi
b1fea14980 feat: add curl-based install system with tito update command
- Add install.sh script using git sparse checkout for minimal downloads
- Add tito update command to check for and install updates
- Add install command box to homepage with copy button
- Unify ASCII logo between install script and tito CLI
- Add flame emoji to tagline and tighten letter spacing
- Remove unused fix-venv and rebuild-site scripts
2025-12-10 10:57:27 -08:00
Vijay Janapa Reddi
b0618ab856 refactor: remove leaderboard and compete from community commands
Keep only login and logout - leaderboard/compete features not ready yet
2025-12-10 09:06:59 -08:00
Vijay Janapa Reddi
ddb2683268 refactor(tito): extract export utilities and add venv guard
- Extract shared export logic to export_utils.py to reduce duplication
  between export.py and src.py commands
- Add virtual environment check to prevent running tito outside venv
  (can be bypassed with TITO_ALLOW_SYSTEM=1 for advanced users)
2025-12-06 21:20:10 -08:00
Vijay Janapa Reddi
c602f97364 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)
2025-12-05 19:23:18 -08:00