From 5c8c74442e56a2cf7d024dbfe66ae36c3af32a6f Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 08:48:22 -0500 Subject: [PATCH 01/12] remove CI from main --- .github/workflows/pr_qc.yml | 19 ------------------- .github/workflows/publish_pypi.yaml | 17 ----------------- 2 files changed, 36 deletions(-) delete mode 100644 .github/workflows/pr_qc.yml delete mode 100644 .github/workflows/publish_pypi.yaml diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml deleted file mode 100644 index 7a46efe..0000000 --- a/.github/workflows/pr_qc.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Pull Request Quality Checks -on: - pull_request: - types: [ opened, synchronize ] - branches: [ main ] -jobs: - run-qa: - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Run qa - run: | - pip install ".[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 From 4aa4fd93ca25a4ab01f50e931e201e2b9f68e527 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 08:50:10 -0500 Subject: [PATCH 02/12] re-add qc --- .github/workflows/pr_qc.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pr_qc.yml diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml new file mode 100644 index 0000000..7a46efe --- /dev/null +++ b/.github/workflows/pr_qc.yml @@ -0,0 +1,19 @@ +name: Pull Request Quality Checks +on: + pull_request: + types: [ opened, synchronize ] + branches: [ main ] +jobs: + run-qa: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - name: Run qa + run: | + pip install ".[dev]" + make qa From 8b9e784239bda3d6272c552230559988a9a0d8a4 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 08:59:02 -0500 Subject: [PATCH 03/12] lint fixes --- uv.lock | 4 ++-- validator/main.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) 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, From e72623b2d1f651dfd76d1fc4993e634fa0973691 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:04:55 -0500 Subject: [PATCH 04/12] use uv in qc workflow --- .github/workflows/pr_qc.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 7a46efe..1a39b66 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -13,7 +13,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.11 + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v7 - name: Run qa run: | - pip install ".[dev]" + make dev make qa From d357335263151ee1d6dcdd989f111a64a0b77deb Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:06:53 -0500 Subject: [PATCH 05/12] debug uv in qc --- .github/workflows/pr_qc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 1a39b66..cd8b29d 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -18,4 +18,6 @@ jobs: - name: Run qa run: | make dev + which ruff + pip show ruff make qa From c9168f564acc9f74bd809d63cd8ac68d0693418d Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:09:26 -0500 Subject: [PATCH 06/12] more debug --- .github/workflows/pr_qc.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index cd8b29d..ce55d35 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -18,6 +18,9 @@ jobs: - name: Run qa run: | make dev - which ruff - pip show ruff + ruff_loc=$(which ruff) + echo "ruff located at $ruff_loc" + ruff_installation=$(pip show ruff) + echo "ruff installation: " + echo "$ruff_installation" make qa From eced9e9f073ae51dedcd8ece19a138f43efda767 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:11:40 -0500 Subject: [PATCH 07/12] use python from uv --- .github/workflows/pr_qc.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index ce55d35..e095a45 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -9,12 +9,14 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 + # - name: Set up Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.11 - name: Install the latest version of uv uses: astral-sh/setup-uv@v7 + with: + python-version: 3.11 - name: Run qa run: | make dev From c49369d8019583d4b31b18f932447265f56bb5cf Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:15:23 -0500 Subject: [PATCH 08/12] wrap quotes --- .github/workflows/pr_qc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index e095a45..32129fe 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -20,9 +20,9 @@ jobs: - name: Run qa run: | make dev - ruff_loc=$(which ruff) + ruff_loc="$(which ruff)" echo "ruff located at $ruff_loc" - ruff_installation=$(pip show ruff) + ruff_installation="$(pip show ruff)" echo "ruff installation: " echo "$ruff_installation" make qa From d7490fcfb6f786a809471019424b078291c42fe6 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:18:22 -0500 Subject: [PATCH 09/12] more debug logs --- .github/workflows/pr_qc.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 32129fe..32445cf 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -19,7 +19,10 @@ jobs: python-version: 3.11 - name: Run qa run: | - make dev + echo "Running uv sync --all-extras --no-cache" + uv sync --all-extras --no-cache + echo "uv sync complete!" + echo "Checking for ruff before running qa..." ruff_loc="$(which ruff)" echo "ruff located at $ruff_loc" ruff_installation="$(pip show ruff)" From bea2e23539ac773975d5670456de426bf86958e2 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:22:34 -0500 Subject: [PATCH 10/12] try using virtual environment --- .github/workflows/pr_qc.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 32445cf..0bdedf1 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -19,13 +19,18 @@ jobs: python-version: 3.11 - name: Run qa run: | + python_loc="$(which python || true)" + echo "python location: $python_loc" + echo "python --version $(python --version || true)" + python -m venv ./.venv + source ./.venv/bin/activate echo "Running uv sync --all-extras --no-cache" uv sync --all-extras --no-cache echo "uv sync complete!" echo "Checking for ruff before running qa..." - ruff_loc="$(which ruff)" + ruff_loc="$(which ruff || true)" echo "ruff located at $ruff_loc" - ruff_installation="$(pip show ruff)" + ruff_installation="$(pip show ruff || true)" echo "ruff installation: " echo "$ruff_installation" make qa From 4063757f11bcce19a52a260d82ad10731c4828c0 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:24:16 -0500 Subject: [PATCH 11/12] cleanup --- .github/workflows/pr_qc.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 0bdedf1..1e6cc79 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -19,18 +19,7 @@ jobs: python-version: 3.11 - name: Run qa run: | - python_loc="$(which python || true)" - echo "python location: $python_loc" - echo "python --version $(python --version || true)" python -m venv ./.venv source ./.venv/bin/activate - echo "Running uv sync --all-extras --no-cache" - uv sync --all-extras --no-cache - echo "uv sync complete!" - echo "Checking for ruff before running qa..." - ruff_loc="$(which ruff || true)" - echo "ruff located at $ruff_loc" - ruff_installation="$(pip show ruff || true)" - echo "ruff installation: " - echo "$ruff_installation" + make dev make qa From 8eca28b94c969447cb6bcc73e121475fa0c9a621 Mon Sep 17 00:00:00 2001 From: Caleb Courier Date: Fri, 24 Oct 2025 09:29:42 -0500 Subject: [PATCH 12/12] more cleanup --- .github/workflows/pr_qc.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pr_qc.yml b/.github/workflows/pr_qc.yml index 1e6cc79..f1ce7b8 100644 --- a/.github/workflows/pr_qc.yml +++ b/.github/workflows/pr_qc.yml @@ -9,10 +9,6 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: 3.11 - name: Install the latest version of uv uses: astral-sh/setup-uv@v7 with: