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
4 changes: 2 additions & 2 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ runs:
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements-dev.txt'
cache-dependency-path: 'pyproject.toml'

- name: Instalar dependencias
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e '.[dev]'
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-reco
gcc \
&& rm -rf /var/lib/apt/lists/*

# Copiar requirements e instalar dependencias
COPY requirements.txt .
# Copiar pyproject y usarlo para instalar dependencias
COPY pyproject.toml .
RUN pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
pip install --no-cache-dir .

# Stage 2: Runtime
FROM python:3.11-slim-bookworm
Expand Down
6 changes: 2 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ python -m venv .venv
# Unix
source .venv/bin/activate
# Instalar dependencias

pip install -r requirements.txt
# o
pip install -r requirements-dev.txt
python -m pip install --upgrade pip
pip install -e '.[dev]'

# Levantar Redis para desarrollo
docker run -d -p 6379:6379 redis:7-alpine
Expand Down
43 changes: 43 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "modelrouter"
version = "0.1.0"
description = "API asíncrona para orquestación multi-proveedor de LLM con streaming y fallback automático."
readme = "README.md"
license = { text = "Apache-2.0" }
authors = [
{ name = "HC-ONLINE" }
]
requires-python = ">=3.11"
dependencies = [
"fastapi==0.115.6",
"uvicorn[standard]==0.34.0",
"pydantic==2.10.6",
"pydantic-settings==2.7.1",
"httpx==0.26.0",
"redis==5.0.1",
"hiredis==2.3.2",
"prometheus-client==0.19.0",
"python-json-logger==2.0.7",
"python-dotenv==1.0.0",
"python-multipart==0.0.22",
]

[project.optional-dependencies]
dev = [
"black==24.10.0",
"flake8==7.1.1",
"pre-commit==4.0.1",
"mypy==1.13.0",
"types-redis==4.6.0.20240425",
"types-requests==2.31.0.20240125",
"typing-extensions==4.12.2",
"pytest==8.3.4",
"pytest-asyncio==0.24.0",
"pytest-cov==6.0.0",
"pytest-mock==3.14.0",
]

[tool.black]
line-length = 88
target-version = ['py311']
Expand Down
25 changes: 0 additions & 25 deletions requirements-dev.txt

This file was deleted.

20 changes: 0 additions & 20 deletions requirements.txt

This file was deleted.