From 0cc9d9c5c4cbf64c5ca098c695178d2bd715149e Mon Sep 17 00:00:00 2001 From: noonghunna <10742901+noonghunna@users.noreply.github.com> Date: Wed, 24 Jun 2026 17:39:47 +0000 Subject: [PATCH] serve-cockpit: declare PyYAML dependency (fixes c3 diagnose-estate crash) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit c3 shells out to the repo's profile scripts (estate_cli.py, weights.py, compat.py, …) which `import yaml`. PyYAML was never declared, so a `uv pip install -e tools/serve-cockpit` venv lacks it — and since c3's python3 subprocess resolves to that venv interpreter, Doctor → diagnose-estate died with `ModuleNotFoundError: No module named 'yaml'` (worked on the maintainer rig only because SYSTEM python3 happened to have it). Reported by @alexpolo1 (discussions/459). Repro'd in a clean venv (import yaml fails) → after this fix the editable install resolves yaml and estate_cli.py report-state/diagnose run clean. PyYAML is the ONLY third-party dep across all scripts c3 shells out to (rest is stdlib). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01EfF565T9eSLaqGzidyJ1Pm --- tools/serve-cockpit/pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/serve-cockpit/pyproject.toml b/tools/serve-cockpit/pyproject.toml index f7fffb2b..8d29132e 100644 --- a/tools/serve-cockpit/pyproject.toml +++ b/tools/serve-cockpit/pyproject.toml @@ -12,6 +12,13 @@ dependencies = [ "club3090-tui-core>=0.1.0", "textual>=0.60", "rich>=13.0", + # The cockpit shells out to the repo's profile scripts (estate_cli.py, + # weights.py, compat.py, classifier.py, patch_attribution.py) which + # `import yaml`. Declaring PyYAML here means a `uv pip install -e` / + # `pip install` venv has it — otherwise `c3`'s python3 subprocess (the + # venv interpreter) hits `ModuleNotFoundError: No module named 'yaml'` + # on Doctor → diagnose-estate (works only if SYSTEM python3 has it). + "pyyaml>=6.0", ] [project.scripts]