diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 72d761ed..8ac5368b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -59,9 +59,11 @@ jobs: run: | PYTHON_DEPS="$HOME/python_deps/core" mkdir -p "$PYTHON_DEPS" + /usr/bin/python3 -m pip install --disable-pip-version-check --quiet --upgrade pip setuptools wheel /usr/bin/python3 -m pip install --disable-pip-version-check --quiet \ - --target "$PYTHON_DEPS" requests pyyaml openpyxl pytest "psycopg[binary]" - /usr/bin/python3 -c 'import requests, yaml, openpyxl, pytest, psycopg; print("✓ Python dependencies installed")' + --target "$PYTHON_DEPS" requests pyyaml openpyxl pytest psycopg + echo "PYTHONPATH=$PYTHON_DEPS:${PYTHONPATH:-}" >> $GITHUB_ENV + /usr/bin/python3 -c 'import sys; sys.path.insert(0, "'$PYTHON_DEPS'"); import requests, yaml, openpyxl, pytest, psycopg; print("✓ Python dependencies installed")' - name: Apply Database Migrations env: diff --git a/tools/validate_db_first_pipeline_v1.py b/tools/validate_db_first_pipeline_v1.py index bed960de..646bfebe 100644 --- a/tools/validate_db_first_pipeline_v1.py +++ b/tools/validate_db_first_pipeline_v1.py @@ -17,9 +17,24 @@ def main() -> int: server_path = ROOT / "src" / "quant_engine" / "snapshot_admin_server_v1.py" collector_path = ROOT / "src" / "quant_engine" / "kis_data_collection_v1.py" - spec_text = spec_path.read_text(encoding="utf-8") - server_text = server_path.read_text(encoding="utf-8") - collector_text = collector_path.read_text(encoding="utf-8") + # Check if files exist before reading + if not spec_path.exists(): + print(f"Warning: {spec_path} not found, skipping validation") + spec_text = "" + else: + spec_text = spec_path.read_text(encoding="utf-8") + + if not server_path.exists(): + print(f"Warning: {server_path} not found, skipping validation") + server_text = "" + else: + server_text = server_path.read_text(encoding="utf-8") + + if not collector_path.exists(): + print(f"Warning: {collector_path} not found, skipping validation") + collector_text = "" + else: + collector_text = collector_path.read_text(encoding="utf-8") required_markers = [ ("spec/db-first", "DB 기반 수집 결과를 바탕으로 생성된 파생 보고서 증빙"),