mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[PR #1421] [CLOSED] fix(ci): prepend mlsysim/ to container PYTHONPATH so Quarto can find the package #6540
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1421
Author: @profvjreddi
Created: 4/20/2026
Status: ❌ Closed
Base:
dev← Head:fix/quarto-build-pythonpath-mlsysim📝 Commits (1)
956c474fix(ci): prepend mlsysim/ to container PYTHONPATH so Quarto can find the package📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
.github/workflows/book-build-container.yml(+6 -6)📄 Description
Summary
Final fix in the chain of three (#1419 → #1420 → this). The book build workflow sets
`PYTHONPATH` at the runner-step level for Linux and via `docker run -e PYTHONPATH` for
Windows, both pointing at the repo root. That override wins over the Quarto config change
in #1420 and runs into the exact same packaging issue exposed by #1397: the actual
`mlsysim` package lives at `<repo_root>/mlsysim/mlsysim/`, not at `<repo_root>/mlsysim/`.
Without this fix, `book-validate-dev` stays red on every Container Build Matrix job
(6 Linux + 6 Windows = 12 jobs) with `ModuleNotFoundError: No module named 'mlsysim.core'`.
Fix
Prepend `<repo_root>/mlsysim/` to `PYTHONPATH` in all 6 places it's set in
`book-build-container.yml`:
Path separators per OS: `:` on Linux, `;` on Windows. The original repo-root entry is
preserved.
Why three PRs instead of one
Same root cause, three surfaces. I cut them small so each one's blast radius is obvious
in review and the bisect history stays useful:
Together they restore `book-validate-dev` to green for the first time since 2026-04-17.
Verification
Linux fix using `;` separator and backslash paths to match the existing template.
What this unblocks
`book-validate-dev` green → `infra-publish-guard.yml` re-armed → `book-publish-live`
becomes triggerable for vol1 v0.6.0 / vol2 v0.1.0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.