Commit Graph

1030 Commits

Author SHA1 Message Date
Salman Muin Kayser Chishti
07d2751b6a Upgrade GitHub Actions to latest versions
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-19 09:20:11 +00:00
Vijay Janapa Reddi
53066bf5af feat(site): add version badge to navbar with auto-update on release
Display version number and release date (e.g., "v0.1.8 · Feb 7, 2026")
next to the "Under Construction" badge in the top nav bar. Version and
date are declared as top-of-file constants in wip-banner.js for easy
CI sed updates. Publish workflow now bumps 6 files instead of 5.
2026-02-16 12:43:09 -05:00
Vijay Janapa Reddi
956e7277c8 feat(site): auto-generate team page from .all-contributorsrc
Add generate_team.py script that reads .all-contributorsrc and generates
the team.md page automatically. This keeps the website team page in sync
with the README contributors.

- Add tinytorch/site/scripts/generate_team.py
- Update both deploy workflows to run the script before building
- Contributors added via @all-contributors now appear on the website

The script runs during site build, so team.md stays fresh with each deploy.
2026-02-05 20:25:02 -05:00
Vijay Janapa Reddi
852bc5c2fc fix(ci): download slide decks from release during deployment
Slides were not loading on the live site because the PDFs exist in a
GitHub Release (tinytorch-slides-v0.1.0) but were never downloaded
during the build process. The .gitignore has *.pdf which prevents
slides from being committed to git.

Add a step to both deployment workflows to download all slide PDFs
from the release and inject them into _static/slides/ before deploy.

Fixes harvard-edge/cs249r_book#1162
2026-02-05 15:43:55 -05:00
Vijay Janapa Reddi
3a2b1bf482 fix(ci): use head_ref for PR branch in fresh install test
On PR events, github.ref_name resolves to the merge ref (e.g.
"1159/merge") which doesn't exist on raw.githubusercontent.com,
causing a 404. Use github.head_ref (the actual source branch)
for PRs, falling back to ref_name for push events.

Also adds -f flag to curl so HTTP errors fail immediately with
a clear message instead of silently saving the 404 HTML page.
2026-02-04 10:06:25 -05:00
Vijay Janapa Reddi
0be9325fbe fix(workflow): deterministic project detection in all-contributors
LLM now only parses username + contribution types (strict 2-field JSON).
Project detection is fully deterministic from file paths:
  tinytorch/ → tinytorch, book/ → book, kits/ → kits, labs/ → labs

If project cannot be determined, the bot asks the user instead of
silently defaulting to book. Also removes @AndreaMattiaGaravagno
from book/.all-contributorsrc (was incorrectly added there by the
old workflow — their PR only touched tinytorch/ files).
2026-02-04 10:03:20 -05:00
Vijay Janapa Reddi
83a3ce3712 fix(ci): use pull_request_target for auto-label write permissions
Fork PRs downgrade GITHUB_TOKEN to read-only, causing 403 when
applying labels. pull_request_target runs in the base repo context
and grants the declared write permissions.
2026-02-03 22:08:20 -05:00
Vijay Janapa Reddi
05500f6bc2 refactor(workflow): add site_only option to TinyTorch publish workflow
Instead of a separate workflow, adds a 'site_only' boolean checkbox
to the existing Publish (Live) workflow. When checked:
- Skips version bump (pyproject.toml, badges, installer, announcement)
- Skips PDF generation
- Skips tag creation and GitHub Release

The build & deploy steps still run identically. One workflow, two modes.
Removes the previously added tinytorch-deploy-site-only.yml.
2026-02-03 14:26:14 -05:00
Vijay Janapa Reddi
a143385f86 feat(workflow): add website-only deploy for TinyTorch (no version bump)
Adds a new workflow 'TinyTorch · 🌐 Deploy Site Only' for deploying
website content updates without triggering version bumps, tags, or
releases. Ideal for:
- Typo fixes
- Team page updates
- CSS/styling changes
- Documentation updates

Use 'Publish (Live)' for versioned releases, 'Deploy Site Only' for
quick website-only updates.
2026-02-03 14:22:40 -05:00
Vijay Janapa Reddi
637eea332b refactor(workflows): rename Publish (Dev) to Preview (Dev)
Clearer naming convention:
- Preview (Dev) = deploy to dev preview site (temporary/staging)
- Publish (Live) = deploy to production (permanent/public)

Renamed files:
- tinytorch-publish-dev.yml → tinytorch-preview-dev.yml
- kits-publish-dev.yml → kits-preview-dev.yml
- labs-publish-dev.yml → labs-preview-dev.yml
- book-deploy-preview.yml → book-preview-dev.yml

Updated workflow names to use 👁️ Preview (Dev) icon/naming.
2026-01-29 15:11:01 -05:00
Vijay Janapa Reddi
9e56fc2e2e fix(ci): default to all tests on all platforms + align with CLI naming
- Default test_type: quick → all (run full validation by default)
- Default os: linux → all (test both platforms by default)
- Rename 'release' → 'user-journey' to match CLI --user-journey flag
- Fix 'standard' to correctly stop at stage 5 (was running user-journey)
- Reorder options to show defaults first in dropdown
2026-01-29 12:43:32 -05:00
Vijay Janapa Reddi
08278a8a6b chore(workflows): differentiate Validate and Publish icons
- Change Validate (Dev) icon from 💯 to  for Book and TinyTorch
- Change Update PDFs icon from 📄 to 📑 (bookmark tabs)
- Fix workflow_run references to match exact workflow names

This makes it easier to visually distinguish between Validate and
Publish operations in the GitHub Actions UI.
2026-01-29 07:33:06 -05:00
Vijay Janapa Reddi
9e5ffac705 ci: enable User Journey for 'all' test type (dev/main pushes) 2026-01-28 10:09:10 -05:00
Vijay Janapa Reddi
ede0c5d28e ci: run User Journey on standard test type (dev/main pushes) 2026-01-28 09:48:37 -05:00
Vijay Janapa Reddi
e3ff3f1587 chore: swap Stage 6/7 order - Fresh Install before User Journey 2026-01-28 09:31:49 -05:00
Vijay Janapa Reddi
43010f202d chore: rename Stage 6 from Release to User Journey 2026-01-28 09:30:00 -05:00
Vijay Janapa Reddi
a70c724a02 fix: export failure now blocks progress + add user journey test
Bug Fix:
- Export failures now return early in module complete, preventing
  progress from being updated when export fails. This fixes the issue
  where students could start Module 02 even though tensor.py was
  never exported.

New --user-journey test:
- Simulates exact student flow: module start --no-jupyter → module complete
- Runs milestones at natural unlock checkpoints (not all at end)
- Milestone checkpoints: after modules 03, 08, 09, 13, 19
- Explicit step-by-step output for easy CI debugging

New --no-jupyter flag:
- Added to 'tito module start' for CI/testing
- Creates notebook but skips opening Jupyter

Ref: https://github.com/harvard-edge/cs249r_book/discussions/1147
2026-01-28 09:28:15 -05:00
Vijay Janapa Reddi
c2ecffa772 style(ci): simplify workflow name 2026-01-27 21:18:02 -05:00
Vijay Janapa Reddi
b49615100c feat(ci): add PDF-only update workflow
Allows updating paper and guide PDFs without version bumps or site changes.
2026-01-27 21:16:40 -05:00
Vijay Janapa Reddi
216b70a3ca style(ci): use 100 emoji for dev publish 2026-01-27 10:40:24 -05:00
Vijay Janapa Reddi
f65a85966b style(ci): use check mark for dev publish, rocket for live publish 2026-01-27 10:37:13 -05:00
Vijay Janapa Reddi
1dab173c50 style(ci): use 100 emoji for validate actions 2026-01-27 10:32:04 -05:00
Vijay Janapa Reddi
39324d4176 style(ci): use check mark emoji for validate actions 2026-01-27 10:31:43 -05:00
Vijay Janapa Reddi
0c6fe7c390 style(ci): use rocket emoji for publish actions 2026-01-27 10:26:19 -05:00
Vijay Janapa Reddi
cbf8017a26 style(ci): add action emojis to workflow names for visual scanning
Add separator and action-specific emojis to make it easier to visually
distinguish between workflow types (Build/Publish/Validate) at a glance.

Pattern: Category emoji + Name · Action emoji + Action
- 🔨 Build
- 📤 Publish
- 🔍 Validate
- 🐳 Container
- 🧹 Cleanup
- 🔗 Link Check
- ❤️ Health Check
2026-01-27 10:24:58 -05:00
Vijay Janapa Reddi
5d0ef80aec feat(ci): auto-generate release notes with contributors 2026-01-27 09:02:03 -05:00
Vijay Janapa Reddi
da97497546 Merge branch 'dev' 2026-01-27 08:55:07 -05:00
Vijay Janapa Reddi
2179d07483 fix: improve all-contributors project detection and add config
- Add configuration block at top for easy customization
- Fix project detection to check trigger line first (not just issue context)
- Improve LLM prompt with explicit JSON schema and examples
- Add project aliases support (e.g., 'tito' -> 'tinytorch')
- Fix @ngbolin contribution type (test -> doc)
2026-01-27 08:25:14 -05:00
Vijay Janapa Reddi
827e3b4aac Merge dev: only run validate on dev push 2026-01-26 15:15:06 -05:00
Vijay Janapa Reddi
849ab0befa fix(ci): only run validate workflow on dev push, not main 2026-01-26 15:14:51 -05:00
Vijay Janapa Reddi
450b1db0c9 Merge dev: use windows-2022 for D: drive fix 2026-01-26 15:10:23 -05:00
Vijay Janapa Reddi
dda4326fd3 fix(ci): use windows-2022 to avoid D: drive issue on windows-latest (2025) 2026-01-26 15:10:09 -05:00
Vijay Janapa Reddi
84d46048dc Merge dev: enable debug logging for Windows investigation 2026-01-26 15:02:42 -05:00
Vijay Janapa Reddi
4cc97325a4 debug(ci): enable runner debug logging to investigate Windows D:\a issue 2026-01-26 15:02:28 -05:00
Vijay Janapa Reddi
bb224b7fbc Merge dev: Windows non-blocking CI 2026-01-26 14:50:32 -05:00
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
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