From a1535463358ba93673317c819f1973480b318df8 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 1 Apr 2026 13:22:06 -0700 Subject: [PATCH] fix(ci): replace local -e path with Forgejo VCS URL for circuitforge-core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI checks out only the peregrine repo — ../circuitforge-core doesn't exist, causing 'pip install -r requirements.txt' to fail. requirements.txt now uses git+https://...@main as the fallback for CI and bare pip installs. Dockerfile.cfcore installs cfcore from the local COPY first (skipping the requirements.txt line) to avoid a redundant network fetch during Docker builds. --- Dockerfile.cfcore | 9 ++++++--- requirements.txt | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile.cfcore b/Dockerfile.cfcore index 86fecff..6387c2a 100644 --- a/Dockerfile.cfcore +++ b/Dockerfile.cfcore @@ -20,12 +20,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libffi-dev curl libsqlcipher-dev \ && rm -rf /var/lib/apt/lists/* -# Copy circuitforge-core first so pip can resolve the -e ../circuitforge-core -# reference in requirements.txt (installed editable at /circuitforge-core) +# Copy circuitforge-core and install it from the local path before requirements.txt. +# requirements.txt has a git+https:// fallback URL for CI (where circuitforge-core +# is not a sibling directory), but Docker always has the local copy available here. COPY circuitforge-core/ /circuitforge-core/ +RUN pip install --no-cache-dir /circuitforge-core COPY peregrine/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +# Skip the cfcore line — already installed above from the local copy +RUN grep -v 'circuitforge-core' requirements.txt | pip install --no-cache-dir -r /dev/stdin # Install Playwright browser (cached separately from Python deps so requirements # changes don't bust the ~600–900 MB Chromium layer and vice versa) diff --git a/requirements.txt b/requirements.txt index 8d9b611..76b9cb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,11 @@ # Keep in sync with environment.yml # ── CircuitForge shared core ─────────────────────────────────────────────── --e ../circuitforge-core +# Local dev / Docker (parent-context build): path install works because +# circuitforge-core/ is a sibling directory. +# CI / fresh checkouts: falls back to the Forgejo VCS URL below. +# To use local editable install run: pip install -e ../circuitforge-core +git+https://git.opensourcesolarpunk.com/Circuit-Forge/circuitforge-core.git@main # ── Web UI ──────────────────────────────────────────────────────────────── streamlit>=1.35