Commit Graph

1056 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
70634bcf4c fix(ci): make Windows jobs non-blocking due to infrastructure flakiness 2026-01-26 14:50:13 -05:00
Vijay Janapa Reddi
7756f0a5be Merge dev: use windows-2022 for stability 2026-01-26 13:30:04 -05:00
Vijay Janapa Reddi
16430b08e9 fix(ci): use windows-2022 instead of windows-latest
Windows Server 2025 (windows-latest) has path length issues causing
"Could not find a part of the path D:\a" errors during job setup.
Windows Server 2022 is more stable.
2026-01-26 13:29:46 -05:00
Vijay Janapa Reddi
a2d318f580 Merge dev: disable pip caching 2026-01-26 12:03:38 -05:00
Vijay Janapa Reddi
87b082fe0b fix(ci): disable pip caching to avoid Windows failures 2026-01-26 12:03:24 -05:00
Vijay Janapa Reddi
f7abb5b3d1 Merge dev: Windows support enabled by default 2026-01-26 10:02:49 -05:00
Vijay Janapa Reddi
0f67780f5a feat: enable Windows support by default with Git Bash
- CI now runs both Linux and Windows by default (matrix)
- Updated install.sh to detect Windows venv path (Scripts/ vs bin/)
- Added Windows installation instructions to getting-started.md
- Updated troubleshooting guide with Git Bash guidance
- Windows uses Git Bash for cross-platform bash script compatibility
2026-01-26 10:02:27 -05:00
Vijay Janapa Reddi
97f84b3a23 chore: update contributor legend role names
- Word Wizard → Doc Wizard
- Idea Generator → Idea Spark
- Test Engineer → Test Tinkerer
2026-01-26 09:22:54 -05:00
Vijay Janapa Reddi
e695b3a5cc chore: update contributor legend role names
- Word Wizard → Doc Wizard
- Idea Generator → Idea Spark
- Test Engineer → Test Tinkerer
2026-01-26 09:21:56 -05:00
Vijay Janapa Reddi
eeccfa4b1d fix(ci): add PYTHONUTF8 for Windows subprocess UTF-8 support
Subprocess pipes on Windows use cp1252 by default which fails
when reading UTF-8 output. PYTHONUTF8=1 forces Python to use
UTF-8 for all I/O operations.
2026-01-26 09:02:02 -05:00
Vijay Janapa Reddi
ef1919ad00 fix(ci): add PYTHONIOENCODING for Windows emoji support
Windows uses cp1252 encoding by default which doesn't support
emoji characters. Setting PYTHONIOENCODING=utf-8 fixes the
UnicodeEncodeError when Rich prints the banner with emojis.
2026-01-26 08:55:31 -05:00
Vijay Janapa Reddi
0936aa6f66 feat(ci): add Windows OS matrix support for progressive testing
- Add 'os' input parameter (linux/windows/all)
- Default to Linux for all automatic triggers
- Manual dispatch can select Windows for experimental testing
- Stages 1-5 now support OS matrix
- Stages 6-7 remain Linux-only (release/fresh-install)

This enables progressive Windows testing to identify compatibility
issues before committing to full Windows support.
2026-01-26 08:49:43 -05:00
Vijay Janapa Reddi
4815f25d1a fix(ci): skip Fresh Install test for fork PRs
Fork PRs have branches that don't exist in harvard-edge/cs249r_book,
so the install script URL is invalid. Skip Fresh Install for fork PRs
and run it only for:
- Direct pushes to dev/main
- PRs from branches within the same repo
2026-01-26 08:29:10 -05:00
Vijay Janapa Reddi
f6cadfb102 fix(ci): update publish-live to use tinytorch-validate-dev.yml 2026-01-25 20:04:28 -05:00
Vijay Janapa Reddi
6ce19128bb fix(ci): update concurrency group name to match workflow 2026-01-25 17:04:46 -05:00
Vijay Janapa Reddi
e8e0c89c73 refactor(ci): rename TinyTorch CI to Validate (Dev) pattern
Follow book pattern:
- Rename tinytorch-ci.yml → tinytorch-validate-dev.yml
- Rename workflow to "🔥 TinyTorch Validate (Dev)"
- Update tinytorch-publish-dev.yml to trigger after Validate passes
- Build PDFs after validation, then deploy

Flow: Push → Validate → (if passes) → Build PDFs → Deploy
2026-01-25 17:01:09 -05:00
Vijay Janapa Reddi
1a41a85232 fix(ci): restore tinytorch-publish-dev.yml workflow
The dev deploy workflow was accidentally lost when it was "combined"
into tinytorch-ci.yml, but the deploy step was never actually added.

Restores the exact original workflow to deploy TinyTorch site to dev
preview on push to dev branch.
2026-01-25 16:52:46 -05:00
Vijay Janapa Reddi
947a7ad8d1 ci: run stages 2-4 in parallel after stage 1
Previously stages ran sequentially (1->2->3->4->5), meaning if
integration tests failed, CLI tests would be skipped even though
they dont actually depend on each other.

New structure:
- Stage 1 (Inline Build): Foundation
- Stages 2, 3, 4 (Unit, Integration, CLI): Run in PARALLEL after Stage 1
- Stage 5 (E2E): Runs only if ALL of stages 2-4 pass

Benefits:
- Faster CI (parallel execution)
- See all test results even if one category fails
- E2E still gates on everything passing
2026-01-25 12:09:49 -05:00
Vijay Janapa Reddi
8237e31361 Merge origin/dev into feature/tinytorch-core 2026-01-25 10:51:14 -05:00
Vijay Janapa Reddi
e7bdbe9e58 fix: integrate fresh install test into CI pipeline
- Add TINYTORCH_NON_INTERACTIVE env var to install.sh for CI/scripted usage
- Skip interactive prompts when no TTY available or non-interactive mode set
- Add Stage 7 (Fresh Install) to tinytorch-ci.yml
- Remove separate tinytorch-install-test.yml workflow
- Fresh install now gates PRs/merges like other tests
2026-01-25 10:51:04 -05:00
Vijay Janapa Reddi
4c57bcd84a fix: use Python 3.11 for pre-commit checks and improve error output
- Change Python version from 3.13 to 3.11 for consistency with other workflows
- Install project dependencies before running pre-commit hooks
- Add verbose output to help debug pre-commit failures
- Show Python version in logs for debugging
2026-01-25 09:21:29 -05:00
Vijay Janapa Reddi
5062e5719b fix: resolve contributors update workflow failures
- Add API error handling in update_contributors.py
- Fix duplicate assignment syntax errors
- Fix reference to dropped commit_message column
- Add requests dependency to requirements.txt
- Use BOOK_QUARTO variable consistently across workflow and script
- Improve error handling and exception reporting
2026-01-25 08:54:45 -05:00
Vijay Janapa Reddi
7d154cad99 ci: run install test on dev branch only, not main 2026-01-25 08:48:33 -05:00
Vijay Janapa Reddi
103545ee23 Merge remote-tracking branch 'origin/dev' into feature/volume-restructure
# Conflicts:
#	.codespell-ignore-words.txt
#	README.md
2026-01-24 18:41:46 -05:00
Vijay Janapa Reddi
7169ad6529 fix(ci): remove milestone stage and fix interactive prompt in CI
- Remove Stage 6 (milestone tests) from CI workflow since test files were
  removed as redundant with integration tests
- Renumber Stage 7 (release) to Stage 6
- Update summary job to remove milestone references
- Fix _trigger_submission() to skip interactive prompts in CI mode
  by checking CI, GITHUB_ACTIONS env vars and stdin.isatty()

The milestone demo scripts remain available for student use via
'tito milestone run', but are no longer run as automated tests.
2026-01-24 14:30:22 -05:00
Vijay Janapa Reddi
22a94d21b5 fix(ci): increase unit test timeout from 10 to 30 minutes
The test suite has grown to 1071 tests and needs more time to complete.
2026-01-23 23:41:06 -05:00
Vijay Janapa Reddi
452b7c5c6b docs(workflow): update contributor recognition wording 2026-01-23 23:12:52 -05:00
Vijay Janapa Reddi
64444e41d3 Merge remote-tracking branch 'origin/dev' into feature/tinytorch 2026-01-23 14:31:09 -05:00
Vijay Janapa Reddi
f65fd37ebd fix(workflow): resolve merge conflict in generate_main_readme.py 2026-01-23 14:20:31 -05:00
Vijay Janapa Reddi
989f127512 fix(workflow): trigger all-contributors on edited comments too 2026-01-23 14:10:54 -05:00
Vijay Janapa Reddi
2ae6642e19 feat(workflow): let LLM parse entire all-contributors comment
Instead of using brittle regex patterns to extract username and then
passing just the description to the LLM, now the LLM parses the entire
trigger line and extracts:
- GitHub username (handles @user, hyphenated names, various formats)
- Contribution type(s)
- Target project (if mentioned)

This handles natural language like:
- '@all-contributors please add @didier-durand to doc in book'
- '@all-contributors @jane-doe fixed typos'
- '@all-contributors @user123 helped verify the fix worked'

Includes fallback regex extraction if LLM fails to find username.

Fixes issue from PR #1133 where 'please add' syntax wasn't recognized.
2026-01-23 14:07:55 -05:00
Vijay Janapa Reddi
8150a1b808 fix(ci): make release run after all stages pass, not standalone 2026-01-23 14:04:29 -05:00
Didier Durand
72adaae229 [Doc]: fixing some typos (#1133) 2026-01-23 14:00:43 -05:00
Vijay Janapa Reddi
906e344ad4 feat(ci): comprehensive CI/CD testing infrastructure
- Rewrite tinytorch-ci.yml with parallel test jobs for each test type
- Add configure job that dynamically selects tests based on trigger:
  * Push to dev: quick (unit + cli)
  * Push to main: standard (unit + cli + integration + e2e)
  * PR: standard tests
  * workflow_call: all tests (pre-release gate)
  * Manual: any selected type
- Add summary job with detailed results table
- Fix publish workflow preflight_level → test_type input mismatch
- Add fresh-install-test.yml workflow for student experience simulation
- Add test-fresh-install.sh script (Docker-based clean environment test)

Test hierarchy from fast to comprehensive:
1. Unit + CLI (~1 min) - Fast feedback
2. Integration (~2 min) - Cross-module validation
3. E2E (~3 min) - User journey validation
4. Inline (~10 min) - Progressive module build from src/
5. Milestone (~5 min) - Historical ML recreations
6. Release (~20 min) - Destructive full validation
2026-01-23 13:47:32 -05:00
Vijay Janapa Reddi
71b754037a feat: apply stashed improvements after merge
Key improvements from local development:
- conftest.py: Add package export validation before tests run
- preflight.py: Stricter Tensor import check (fail if None)
- 06_autograd.py: Set requires_grad manually in tests (progressive disclosure)
- 08_training.py, 09_convolutions.py: Add enable_autograd() calls
- install.sh: Environment variable overrides for testing
- nbdev.py: Fix import path for DevExportCommand

Also syncs CI/publish workflows from origin/dev
2026-01-23 13:31:27 -05:00
Vijay Janapa Reddi
65f67c94e6 Merge origin/dev into feature/tinytorch
Resolve conflicts:
- .github/workflows/contributors/generate_main_readme.py: take dev's width_pct parameter
- .vscode/settings.json: keep worktree-specific orange Peacock color
2026-01-23 13:29:17 -05:00
Vijay Janapa Reddi
b7fa2f8e81 feat(workflow): LLM-powered all-contributors with natural language
- Update all-contributors-add.yml to use Ollama (llama3.1:8b) for parsing
  natural language descriptions instead of requiring exact syntax
- Trim contribution types to 8 actually used: bug, code, doc, design,
  ideas, review, test, tool
- Update generate_main_readme.py and generate_readme_tables.py to match
- Remove unused tito module export subcommand (fixes #1134)
  Students should use tito module complete instead

Now you can write naturally:
  @all-contributors @user helped verify the fix worked
  @all-contributors @user found a bug in the dataloader
2026-01-23 09:01:16 -05:00
Vijay Janapa Reddi
fa04485cbc feat(workflow): LLM-powered all-contributors with natural language
- Update all-contributors-add.yml to use Ollama (llama3.1:8b) for parsing
  natural language descriptions instead of requiring exact syntax
- Trim contribution types to 8 actually used: bug, code, doc, design,
  ideas, review, test, tool
- Update generate_main_readme.py and generate_readme_tables.py to match
- Remove unused tito module export subcommand (fixes #1134)
  Students should use tito module complete instead

Now you can write naturally:
  @all-contributors @user helped verify the fix worked
  @all-contributors @user found a bug in the dataloader
2026-01-23 09:00:42 -05:00
Vijay Janapa Reddi
d98ce8db04 style: update README footer with heart, remove all-contributors instruction
- Remove '@all-contributors please add' instruction from contributors section
- Replace 'Built with dedication' with 'Made with ❤️ for AI learners worldwide'
- Update generate_main_readme.py to not regenerate the removed instruction
2026-01-22 18:14:56 -05:00
Vijay Janapa Reddi
0364727b52 style: make contributor tables more compact (9 cols, 50px avatars)
- Changed from 7 columns to 9 columns per row
- Reduced avatar size from 80px to 50px
- Makes the contributor section more scannable and takes less vertical space
2026-01-22 16:51:25 -05:00
Vijay Janapa Reddi
19277df465 chore: add release.yml for auto-generated release notes
Configures GitHub to automatically categorize PRs by labels when
generating release notes. Categories include:
- 🚀 New Features (feature, enhancement, feat)
- 🐛 Bug Fixes (bug, fix)
- 📚 Documentation (docs, area: book)
- 🧪 Tests
- 🔧 CI/Infrastructure
- 🔥 TinyTorch (area: tinytorch)
- 🌐 Website (area: website)
- 🛠️ Other Changes

Excludes skip-changelog, dependencies, and chore labels.
2026-01-22 16:45:27 -05:00
Vijay Janapa Reddi
b048e2d3cc fix(tests): fix E2E tests and add CI test summary
E2E test fixes:
- Add TITO_ALLOW_SYSTEM=1 env var to run_tito() for tests outside venv
- Fix CLI command naming: 'milestones' → 'milestone' (singular)
- Fix modules directory path: 'modules/' → 'src/'

CI improvements:
- Remove continue-on-error from E2E and CLI test steps
- Add test summary table to job output showing pass/fail for each suite
- Add JUnit XML output for test results

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:34:30 -05:00
Vijay Janapa Reddi
0c5cebfe9d fix(ci): mark E2E/CLI tests as non-blocking temporarily
E2E tests have CLI command naming issues (e.g., 'milestones' vs 'milestone').
These need separate attention to fix. Making them non-blocking until fixed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:26:06 -05:00
Vijay Janapa Reddi
38bebf0479 fix(ci): disable coverage for test suites
Coverage check was failing because the coverage config in pyproject.toml
doesn't apply correctly to the integration/e2e/cli/regression test directories.
These tests don't need coverage tracking.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 13:21:29 -05:00
Vijay Janapa Reddi
bc02dcf14d refactor(ci): combine tests and dev deploy into one workflow
Push to dev now:
1. Runs all tests (student journey, integration, E2E, CLI, regression)
2. Only if tests pass, deploys to dev preview site

Removed separate tinytorch-publish-dev.yml - all in tinytorch-ci.yml now.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:56:36 -05:00
Vijay Janapa Reddi
ae688d66b6 feat(ci): comprehensive test suite
Run all tests on dev pushes:
1. Student journey (20 modules + milestones)
2. Integration tests
3. E2E tests
4. CLI tests
5. Regression tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:54:51 -05:00
Vijay Janapa Reddi
b06ecda7a0 simplify(ci): one workflow, one command
tito dev validate --ci - always runs full test suite.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:54:04 -05:00
Vijay Janapa Reddi
372c2eb78a feat(ci): run tito dev validate on dev pushes
Simple CI: push to dev runs full test suite via tito dev validate.
Tests all 20 modules and all milestones.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:53:08 -05:00
Vijay Janapa Reddi
8e82483f5f feat(workflow): add GitHub Release creation to publish workflow
- Create draft GitHub Release after tag is created
- Auto-generate changelog from commits since last tag
- Release is created as draft for review before publishing
- Updated job name to 'Create Tag & Release'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:31:28 -05:00
Vijay Janapa Reddi
b2a4a9276e refactor(workflow): use pyproject.toml as single source of truth for version
- Remove __init__.py version update step (now reads from pyproject.toml dynamically)
- Update comments to reflect 5 files instead of 6
- pyproject.toml is now the single source of truth for TinyTorch version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 12:24:28 -05:00