Skip to content
Merged
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
25 changes: 0 additions & 25 deletions .devcontainer/devcontainer.json

This file was deleted.

23 changes: 0 additions & 23 deletions .devcontainer/post-install.sh

This file was deleted.

47 changes: 44 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
# Python cache and compiled files
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

# Virtual environments
venv/
env/
ENV/

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# Git
.git/
.gitignore

# Environment variables
.env
.env.*

# Documentation
*.md

# Data directories (created at runtime)
data/
results/

# Temporary files
*.log
*.tmp
.DS_Store
6 changes: 1 addition & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ jobs:
name: Runs on Ubuntu
runs-on: ubuntu-latest

defaults:
run:
working-directory: testworkflows

steps:
- name: Clone the code
uses: 'actions/checkout@v5'
Expand All @@ -35,7 +31,7 @@ jobs:
- name: Setup Python
uses: 'actions/setup-python@v6'
with:
python-version-file: "testworkflows/.python-version"
python-version-file: ".python-version"

- name: Install Dependencies
run: uv sync
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
id: build-and-push
uses: docker/build-push-action@v6
with:
context: ./testworkflows
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Build TestWorkflow Docker Image
run: |
docker build -t local-registry:5000/testworkflows:e2e-test testworkflows/
docker build -t local-registry:5000/testworkflows:e2e-test .
docker push local-registry:5000/testworkflows:e2e-test

- name: Install Tilt
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
permissions:
contents: 'read'

defaults:
run:
working-directory: testworkflows

steps:
- name: Clone the code
uses: 'actions/checkout@v5'
Expand All @@ -37,7 +33,7 @@ jobs:
- name: Setup Python
uses: 'actions/setup-python@v6'
with:
python-version-file: "testworkflows/.python-version"
python-version-file: ".python-version"

- name: Install Dependencies
run: uv sync
Expand Down
52 changes: 0 additions & 52 deletions .golangci.yml

This file was deleted.

22 changes: 18 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://pre-commit.com for more information
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]
Expand All @@ -17,10 +17,24 @@ repos:
- id: requirements-txt-fixer
- id: mixed-line-ending

- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.9.11
hooks:
# Update the uv lockfile
- id: uv-lock

- repo: local
hooks:
- id: make-fmt
name: Run make fmt
- id: python-lint
name: python-lint
language: system
entry: "uv run poe lint"
types_or: [ python ]
pass_filenames: false
- id: python-ruff
name: python-ruff
language: system
entry: "make fmt"
entry: "uv run poe ruff"
types_or: [ python ]
pass_filenames: false
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
66 changes: 33 additions & 33 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Build the manager binary
FROM golang:1.24 AS builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/ internal/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
FROM python:3.13-slim

WORKDIR /app

# Install runtime and build dependencies (git is needed for Gitpython, which is a dependency of Ragas)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*

# Install UV package manager
COPY --from=ghcr.io/astral-sh/uv:0.9 /uv /bin/uv

# Copy dependency files
COPY pyproject.toml uv.lock ./

# Install dependencies using UV
RUN uv sync

# Copy scripts to root dir
COPY scripts/* ./

# Create directories for data and results
RUN mkdir -p data/datasets data/experiments results

# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1

# Make scripts executable
RUN chmod +x *.py

# Set 'uv run python3' entrypoint so we can run scripts directly
ENTRYPOINT ["uv", "run", "python3"]
Loading