From 97cb4093eafa958d329e915e432a7391d1d39078 Mon Sep 17 00:00:00 2001 From: Caleb Courier <13314870+CalebCourier@users.noreply.github.com> Date: Fri, 24 Oct 2025 09:30:23 -0500 Subject: [PATCH] Remove publish script from main and fix install in pr_qc workflow (#2) * remove CI from main * re-add qc * lint fixes * use uv in qc workflow * debug uv in qc * more debug * use python from uv * wrap quotes * more debug logs * try using virtual environment * cleanup * more cleanup --- .github/workflows/pr_qc.yml | 8 +++++--- .github/workflows/publish_pypi.yaml | 17 ----------------- uv.lock | 4 ++-- validator/main.py | 2 -- 4 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/publish_pypi.yaml diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 7a46efe..f1ce7b8 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -9,11 +9,13 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v7 with: python-version: 3.11 - name: Run qa run: | - pip install ".[dev]" + python -m venv ./.venv + source ./.venv/bin/activate + make dev make qa diff --git a/.github/workflows/publish_pypi.yaml b/.github/workflows/publish_pypi.yaml deleted file mode 100644 index 18574a2..0000000 --- a/.github/workflows/publish_pypi.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Publish to Guardrails Hub - -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: Build & Deploy - uses: guardrails-ai/guardrails/.github/actions/validator_pypi_publish@main - with: - guardrails_token: ${{ secrets.PRIV_PYPI_PUBLISH_TOKEN }} - validator_id: mlcube/rag_retrieval diff --git a/uv.lock b/uv.lock index be1b535..b4ccf02 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 2 +revision = 3 requires-python = ">=3.10, <=3.13" resolution-markers = [ "python_full_version >= '3.13'", @@ -1959,7 +1959,7 @@ wheels = [ [[package]] name = "rag-context-evaluator" -version = "0.0.1" +version = "0.0.2" source = { virtual = "." } dependencies = [ { name = "guardrails-ai" }, diff --git a/validator/main.py b/validator/main.py index 703e0a3..c3344b5 100644 --- a/validator/main.py +++ b/validator/main.py @@ -1,6 +1,4 @@ from typing import Any, Callable, Dict, Optional -from guardrails import Guard -import openai import logging from guardrails.validator_base import ( FailResult,