Commit Graph

1077 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
4f44655224 Grant actions read permission to dev validation workflow.
Allow reusable container workflow status queries from the caller and fix a stylesheet spelling issue required by pre-commit checks.
2026-03-05 17:35:07 -05:00
Vijay Janapa Reddi
72d714ead8 Improve container preflight diagnostics and docs references.
Add explicit per-check preflight logging and matrix failure instance reporting in the container build workflow, and update stale documentation links and workflow/file path references.
2026-03-05 16:03:00 -05:00
Vijay Janapa Reddi
7992c8ff13 Switch book validation to container-only fail-fast builds.
Remove baremetal workflow usage and add explicit Linux/Windows preflight toolchain checks so missing dependencies fail immediately before render.
2026-03-05 15:33:19 -05:00
Vijay Janapa Reddi
9314128cf7 Fix Windows python3 availability in container build paths.
Preserve container PATH during Windows docker-run steps and create/verify a python3 alias from Scoop Python so Quarto/Jupyter kernels that invoke python3 work reliably in both install-time and final verification checks.
2026-03-05 07:42:29 -05:00
Vijay Janapa Reddi
9ff63264cf Fix Linux baremetal TeX install permissions.
Install TeX Live under the runner user home instead of /usr/local and resolve tlmgr from that location so direct install-tl succeeds without root write access.
2026-03-04 20:07:21 -05:00
Vijay Janapa Reddi
887fc9eb81 Harden final Windows tool checks for existence and exit status.
Update Dockerfile and workflow final verification steps to normalize native command exit detection and fail explicitly on non-zero exits, avoiding false positives and false negatives in PowerShell checks.
2026-03-04 19:46:38 -05:00
Vijay Janapa Reddi
160922f50a Fix Linux TeX installer cleanup glob in baremetal workflow.
Avoid deleting /tmp/install-tl-unx.tar.gz before extraction by restricting cleanup to extracted install-tl directories.
2026-03-04 19:43:17 -05:00
Vijay Janapa Reddi
e015846c3e Harden baremetal TeX Live installs with mirror fallback.
Replace Linux action-based and Windows Chocolatey-based TeX installation with direct install-tl flows that retry across multiple CTAN mirrors and pin tlmgr to a stable repository.
2026-03-04 18:57:50 -05:00
Vijay Janapa Reddi
3fdae4a365 Defer Ghostscript runtime checks to final verification.
Keep fail-fast installation checks for Ghostscript command presence, but defer executing Ghostscript until the final verification phase where full runtime dependencies and PATH are in place.
2026-03-04 18:03:23 -05:00
Vijay Janapa Reddi
77a37a7707 Harden Windows build tool installation and verification flow.
Add immediate per-tool post-install checks with explicit command resolution and exit handling, keep end-of-job final verification with isolated per-tool reporting, and ensure rsvg-convert is installed/verified for Quarto PDF SVG conversion.
2026-03-04 17:21:20 -05:00
Vijay Janapa Reddi
12268748b2 Overhaul Windows container build for PATH and tool reliability
- Add explicit ENV PATH directive (Phase 15) so Docker layers
  inherit tool paths instead of relying on registry writes
- Reorder phases: TeX Live moved last (slowest, fail last)
- Create stable symlink C:\texlive\bin\windows for year-agnostic PATH
- Skip pip self-upgrade to avoid WinError 3 shim lock
- Use gswin64c (correct Scoop binary name) instead of gs
- Add rsvg-convert fallback to Chocolatey if Scoop fails
- Replace fragile verification loop with Test-Tool function
- Relax ErrorActionPreference for Chocolatey TeX Live in baremetal
2026-03-04 17:16:34 -05:00
Vijay Janapa Reddi
226b68ad1f Fix CI tool verification and switch Quarto to Scoop install
- Baremetal workflow: verification step now tracks failures and exits
  non-zero when tools are missing (previously always reported success)
- Baremetal workflow: R.exe --version replaced with Rscript --version
  to avoid PowerShell Invoke-History alias collision
- Windows Dockerfile: Quarto install switched from direct zip download
  (C:\quarto-1.9.27\bin) to scoop install extras/quarto for consistent
  PATH handling via Scoop shims
- Windows Dockerfile: final verification rewritten with failure tracking
  and exit 1 on missing tools
2026-03-04 13:52:02 -05:00
Vijay Janapa Reddi
ddfa753aa5 pwsh 2026-03-04 13:11:33 -05:00
Vijay Janapa Reddi
d9c2906e40 Adds Windows book builds and refines Quarto content
Introduces Windows HTML, PDF, and EPUB build configurations for both Volume I and Volume II in the GitHub Actions workflow, expanding the available output formats for the book.

Updates Quarto callout and figure syntax from `::::` to `:::` across numerous content files for consistency and compatibility.

Removes unreferenced `war_stories.bib` and `data_engineering.bib` bibliography files and their corresponding entries in Quarto configuration.

Standardizes internal references to the 'Responsible AI' chapter by updating `@sec-responsible-engineering` to `@sec-responsible-ai` for improved linking accuracy throughout the text.
2026-03-03 14:50:20 -05:00
Vijay Janapa Reddi
2349e63094 fix(ci): consolidate black version — drop workflow pin, floor to >=24.0.0
The CI workflow hard-pinned black==24.10.0 separately from requirements.txt
(which said >=23.0.0), causing version skew that reformatted 11 QMD files
on every CI run. Remove the override and let requirements.txt be the single
source of truth, bumped to >=24.0.0 to align with current latest.
2026-03-03 07:39:31 -05:00
Vijay Janapa Reddi
6cb39f40ab fix(build): set PYTHONPATH for mlsysim, move output-file to book:, add volume to job name 2026-03-03 07:32:40 -05:00
Vijay Janapa Reddi
213a9cf3b5 fix: remove empty env block from book-preview-dev workflow 2026-03-02 20:27:47 -05:00
Vijay Janapa Reddi
88e6922c56 fix: pin black in pre-commit CI workflow
Pin Black in the dev validation workflow so book-format-python produces deterministic output across local and CI environments, preventing first-pass auto-format churn from failing pre-commit.
2026-03-02 20:24:30 -05:00
Vijay Janapa Reddi
8129e4b31f Improves artifact verification and output naming
Updates the book publishing workflow to conditionally verify downloaded artifacts based on the `deploy_target` input, preventing failures during partial deployments.

Explicitly sets the output filenames for EPUB and PDF builds in Quarto configurations, ensuring consistent naming for generated book artifacts.
2026-03-02 17:51:04 -05:00
Vijay Janapa Reddi
96fa7ac5e5 chore: bump Quarto to 1.9.27 and R to 4.5.2
- Quarto 1.9.27: Linux (.deb), Windows (direct download; Scoop Extras has 1.8.27)
- R 4.5.2: Linux (CRAN jammy-cran40), Windows (Scoop main/r)
- Baremetal: quarto-actions/setup for both Linux and Windows
- Remove ggrepel version pin (R 4.5.x supports ggrepel 0.9.7)
- Update docs: BUILD.md, CONTAINER_BUILDS.md, docker READMEs
2026-03-02 17:36:35 -05:00
Vijay Janapa Reddi
5c19052d2a Add pandas fallback for pre-commit hooks
Include pandas in validate-dev fallback dependencies to satisfy mlsysim.sim imports during book-mlsys-test-units when base requirements install partially fails.
2026-03-02 10:35:21 -05:00
Vijay Janapa Reddi
fdd90ce139 Stabilize dev pre-commit workflow
Add fallback hook dependencies in validate-dev and apply trailing-whitespace fixes to lab plan files so pre-commit no longer fails on auto-modifications.
2026-03-02 10:22:41 -05:00
Vijay Janapa Reddi
a342170b67 Fix pre-commit fallback dependency install
Install rich in validate-dev pre-commit step so book hooks still run when full requirements install partially fails.
2026-03-02 10:16:09 -05:00
Vijay Janapa Reddi
1052b2be31 Update book workflows for volume-only builds
Switch container/baremetal/validate/preview/live flows to vol1+vol2 artifacts, keep baremetal in dev validation, and add stable single-book navbar link.
2026-03-02 09:45:40 -05:00
Vijay Janapa Reddi
a7f9367e42 Merge dev into feature/book-volumes: CI, contributors, workflows
# Conflicts:
#	README.md
2026-03-02 09:38:47 -05:00
Vijay Janapa Reddi
48b519c42e Merge feature/tinytorch-core into feature/book-volumes
# Conflicts:
#	README.md
#	tinytorch/src/01_tensor/01_tensor.py
#	tinytorch/src/15_quantization/ABOUT.md
2026-03-02 09:38:08 -05:00
Vijay Janapa Reddi
0ae4545bbc Enables multi-project contributor additions
Allows a single `@all-contributors` comment to add or update a contributor across multiple projects simultaneously.

Updates the workflow to:
- Detect multiple projects from explicit mentions in the trigger comment.
- Iterate over all detected projects to update their respective `.all-contributorsrc` files and project `README.md` tables.
- Adapt commit messages and bot replies to reflect multi-project changes.

This improves efficiency for managing contributors in multi-project repositories by reducing repetitive commands.
2026-03-02 09:27:59 -05:00
Vijay Janapa Reddi
8abbf533d8 fix(ci): bump R package cache to fix missing ggrepel on Linux builds
- Add -v2 to cache key to invalidate stale R package cache
- Add ggrepel to verification step to catch missing packages early
- Fixes hw_acceleration.qmd build failure (fig-processor-trends chunk)
2026-03-02 08:49:07 -05:00
Vijay Janapa Reddi
7e6cbc96ca Merge remote-tracking branch 'origin/dev' into dev 2026-03-01 18:43:22 -05:00
Vijay Janapa Reddi
7994f91e0e Merge pull request #1178 from salmanmkc/upgrade-github-actions-node24
Upgrade GitHub Actions for Node 24 compatibility
2026-03-01 11:36:51 -05:00
Vijay Janapa Reddi
a78f5dd893 Merge pull request #1201 from harvard-edge/fix/ch15 and resolve README conflict 2026-02-25 08:27:02 -05:00
Vijay Janapa Reddi
ecb3af7fd2 fix(ci): pull before push in all-contributors workflow; add @salmanmkc to tinytorch and kits
- Add git pull --rebase before push so concurrent comment-triggered runs
  don't reject each other (only one of three runs had succeeded for PR 1179).
- Manually add @salmanmkc as code contributor to tinytorch and kits
  (labs was already added by the single successful run).
2026-02-22 14:05:31 -05:00
Vijay Janapa Reddi
7df97bd1a4 Merge pull request #1179 from salmanmkc/upgrade-github-actions-node24-general
Upgrade GitHub Actions to latest versions
2026-02-22 13:44:58 -05:00
Vijay Janapa Reddi
7a5da798dd fix(ci): extract contributor username via regex instead of LLM
The LLM (llama3.1:8b) was hallucinating usernames — e.g. returning
"pipmea" instead of "pipme". Since the username is always present as
an @mention in the trigger line, extract it deterministically via regex
in Step 1 and only use the LLM to classify contribution types.
2026-02-19 12:05:23 -05:00
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
Salman Muin Kayser Chishti
4cf7a3aca8 Upgrade GitHub Actions for Node 24 compatibility
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-19 09:19:52 +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
9d840fc1a0 Merge branch 'dev' into feature/book-volumes 2026-02-10 13:12:34 -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