Skip to content
This repository was archived by the owner on Mar 15, 2026. It is now read-only.
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
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: "latest"

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-groups

- name: Run ruff linter
run: uv run ruff check src/ tests/

- name: Run ruff formatter check
run: uv run ruff format --check src/ tests/

- name: Run mypy type checker
run: uv run mypy src/

- name: Run smoke tests
run: uv run pytest tests/smoke/ -v --no-cov -m smoke

- name: Run all tests with coverage
run: uv run pytest --cov=src/creative_agent --cov-fail-under=10 --cov-report=term-missing

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- uses: pre-commit/action@v3.0.1
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ cython_debug/
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

Expand All @@ -205,3 +205,8 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

# Local test files with secrets (should use .env instead)
/test_*.py
/test_*.json
/setup_bucket_policy.py
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
repos:
- repo: local
hooks:
# Prevent skipping tests
- id: no-skip-tests
name: No @pytest.mark.skip decorators allowed
entry: sh -c 'if grep -r "@pytest\.mark\.skip[^_]" --include="test_*.py" tests/ 2>/dev/null | grep -v skip_ci; then echo "❌ Found @pytest.mark.skip decorators! Tests must not be skipped."; exit 1; fi'
language: system
pass_filenames: false
always_run: true

# Ensure smoke tests pass
- id: smoke-tests
name: Run smoke tests (critical paths)
entry: uv run pytest tests/smoke/ -v --tb=short -m smoke
language: system
pass_filenames: false
stages: [manual]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-json
- id: check-merge-conflict
- id: check-ast
- id: debug-statements

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
files: ^src/
additional_dependencies:
- pydantic>=2.0.0
- types-pillow>=10.0.0
- boto3-stubs[s3]>=1.35.0
args: [--strict]
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
34 changes: 34 additions & 0 deletions Dockerfile.fly
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Fly.io Dockerfile for AdCP Creative Agent
# syntax=docker/dockerfile:1.4

# Use AWS Public ECR to avoid Docker Hub rate limits
FROM public.ecr.aws/docker/library/python:3.12-slim

# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*

# Install uv for package management
RUN pip install uv

WORKDIR /app

# Copy all files first
COPY . .

# Install dependencies (uv will create .venv)
RUN uv sync

# Add .venv to PATH
ENV PATH="/app/.venv/bin:$PATH"
ENV PYTHONUNBUFFERED=1

# Service port
ENV PORT=8080

# Expose port
EXPOSE 8080

# Run the spec-compliant MCP server
CMD ["python", "-m", "creative_agent.server"]
Loading