diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0129dccfa..f34ac946f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -86,7 +86,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -118,7 +118,7 @@ jobs: runs-on: LargeBois strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # TODO: fix errors so that we can run both `make dev` and `make full` # dependencies: ['dev', 'full'] # dependencies: ["full"] diff --git a/.github/workflows/examples_check.yml b/.github/workflows/examples_check.yml index 6dea3d80c..d0baa49dd 100644 --- a/.github/workflows/examples_check.yml +++ b/.github/workflows/examples_check.yml @@ -36,7 +36,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.11.x + python-version: 3.13.x - name: Install dependencies run: | diff --git a/.github/workflows/install_from_hub.yml b/.github/workflows/install_from_hub.yml index 1ae773e92..caf915b9e 100644 --- a/.github/workflows/install_from_hub.yml +++ b/.github/workflows/install_from_hub.yml @@ -15,9 +15,9 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.11.x + python-version: 3.13.x - name: pip install from main - run: pip install git+https://github.com/guardrails-ai/guardrails.git@main + run: pip install git+https://github.com/guardrails-ai/guardrails.git@py-3.13 - name: Install PII validator run: | guardrails configure --token $GUARDRAILS_API_KEY --disable-metrics --enable-remote-inferencing; diff --git a/poetry.lock b/poetry.lock index 26fba7d00..80476ec13 100644 --- a/poetry.lock +++ b/poetry.lock @@ -11011,4 +11011,4 @@ vectordb = ["faiss-cpu", "numpy"] [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "3912e412bc412f007aa7a7f7a6b7e906fcb50befa48a94c37d03f4f0a2c18883" +content-hash = "130bba3eef87dc36bc7b2a9fc746a3ade7ed64eec8a8ac91e5a088835f0e14d8" diff --git a/pyproject.toml b/pyproject.toml index 6e2f28131..1ae234126 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ "rich>=13.6.0,<15.0.0", "pydantic>=2.0.0, <3.0", "typer>=0.9.0,<0.16", + "click<8.2.0", # TODO: Upgrade typer range and test cli before allowing >=8.2.0 "tenacity>=8.1.0,<10.0.0", "rstr>=3.2.2,<4.0.0", "typing-extensions>=4.8.0,<5.0.0", @@ -206,4 +207,5 @@ dependencies = true # to load [tool.poetry.dependencies] [tool.liccheck.authorized_packages] aiocache = "0.12.3" # BSD 3-Clause aiohappyeyeballs = "2.4.3" # Python Software Foundation -guardrails-api = "*" # Modified ELSSTIC \ No newline at end of file +guardrails-api = "*" # Modified ELSSTIC +pondpond = "1.4.1" # Apache 2.0 \ No newline at end of file diff --git a/server_ci/.dockerignore b/server_ci/.dockerignore new file mode 100644 index 000000000..bab210810 --- /dev/null +++ b/server_ci/.dockerignore @@ -0,0 +1,30 @@ +.coverage +.coverage.MacBook-Pro.local.75130.XUoRtLxx +.dockerignore +.docusaurus +.git +.github +.gitignore +.idea +.pre-commit-config.yaml +.pytest_cache +.python-version +.ruff_cache +.venv +.vscode +build +codecov.yml +CONTRIBUTING.md +docs +docs-build +docs-graveyard +DOCS.md +docusaurus +htmlcov +make.bat +mlartifacts +mlruns +node_modules +package-lock.json +package.json +tests \ No newline at end of file diff --git a/server_ci/Dockerfile.fastapi b/server_ci/Dockerfile.fastapi index f9afb0576..4db17f542 100644 --- a/server_ci/Dockerfile.fastapi +++ b/server_ci/Dockerfile.fastapi @@ -1,4 +1,5 @@ -FROM python:3.12-slim +# New LiteLLM version has a dependency on madoka which requires g++ to build the wheel +FROM python:3.13 ARG GUARDRAILS_TOKEN ARG GUARDRAILS_TEMPLATE="guard-template.json" @@ -19,9 +20,6 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN pipx install poetry - -# Ensure poetry is available in the PATH ENV PATH="/root/.local/bin:$PATH" # Copy the entrypoint script @@ -30,13 +28,9 @@ COPY ../ /app/guardrails # Install guardrails, the guardrails API, and gunicorn # openai optional. only used for integration testing -RUN pip install "uvicorn[standard]" "guardrails-api>=0.1.0a1" "guardrails-api-client>=0.4.0a2" --no-cache-dir - -WORKDIR /app/guardrails - -RUN poetry install +RUN pip install "uvicorn[standard]" --no-cache-dir -RUN pip install ./ +RUN pip install "/app/guardrails[api]" RUN guardrails configure --enable-metrics --enable-remote-inferencing --token $GUARDRAILS_TOKEN diff --git a/server_ci/Dockerfile.flask b/server_ci/Dockerfile.flask index 761fa0ecc..0565dae6a 100644 --- a/server_ci/Dockerfile.flask +++ b/server_ci/Dockerfile.flask @@ -1,4 +1,5 @@ -FROM python:3.12-slim +# New LiteLLM version has a dependency on madoka which requires g++ to build the wheel +FROM python:3.12 ARG GUARDRAILS_TOKEN ARG GUARDRAILS_TEMPLATE="guard-template.json" @@ -19,9 +20,6 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -RUN pipx install poetry - -# Ensure poetry is available in the PATH ENV PATH="/root/.local/bin:$PATH" # Copy the entrypoint script @@ -29,7 +27,8 @@ COPY /server_ci/flask-entry.sh /app/flask-entry.sh # Install guardrails, the guardrails API, and gunicorn # openai optional. only used for integration testing -RUN pip install "gunicorn[gthread]>=22.0.0,<23" "guardrails-api>=0.0.5,<0.1.0" "guardrails-ai==0.5.15" "guardrails-api-client>=0.3.0,<0.4.0" +# Lock click version to what's compatible with typer==0.12.5 +RUN pip install "click==8.1.8" "gunicorn[gthread]>=22.0.0,<23" "guardrails-ai[api]==0.5.15" RUN guardrails configure --enable-metrics --enable-remote-inferencing --token $GUARDRAILS_TOKEN