Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install_from_hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
guardrails-api = "*" # Modified ELSSTIC
pondpond = "1.4.1" # Apache 2.0
30 changes: 30 additions & 0 deletions server_ci/.dockerignore
Original file line number Diff line number Diff line change
@@ -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
14 changes: 4 additions & 10 deletions server_ci/Dockerfile.fastapi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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

Check warning on line 4 in server_ci/Dockerfile.fastapi

View workflow job for this annotation

GitHub Actions / build-test-server (fastapi)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "GUARDRAILS_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG GUARDRAILS_TEMPLATE="guard-template.json"

# Set environment variables to avoid writing .pyc files and to unbuffer Python output
Expand All @@ -19,9 +20,6 @@
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
Expand All @@ -30,13 +28,9 @@

# 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

Expand Down
9 changes: 4 additions & 5 deletions server_ci/Dockerfile.flask
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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

Check warning on line 4 in server_ci/Dockerfile.flask

View workflow job for this annotation

GitHub Actions / build-test-server (flask)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "GUARDRAILS_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG GUARDRAILS_TEMPLATE="guard-template.json"

# Set environment variables to avoid writing .pyc files and to unbuffer Python output
Expand All @@ -19,17 +20,15 @@
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
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

Expand Down