Skip to content

Commit 44aae47

Browse files
authored
Scaffold packaging for search-enrichment-agent service (#385)
* Scaffold packaging for search-enrichment-agent service * Add missing lockfile for search-enrichment-agent
1 parent 93f3753 commit 44aae47

File tree

4 files changed

+2867
-0
lines changed

4 files changed

+2867
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.venv/
2+
*.egg-info/
3+
__pycache__/
4+
uv.lock
5+
Dockerfile
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Generated for search-enrichment-agent
2+
ARG PYTHON_VERSION=3.13-slim
3+
4+
FROM python:${PYTHON_VERSION} AS base
5+
ENV PYTHONDONTWRITEBYTECODE=1 \
6+
PYTHONUNBUFFERED=1 \
7+
PIP_NO_CACHE_DIR=1 \
8+
APP_NAME=search-enrichment-agent
9+
WORKDIR /app/src
10+
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libpq-dev git curl \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
FROM base AS dev
14+
ENV APP_ENV=dev
15+
COPY pyproject.toml ./pyproject.toml
16+
COPY . ./
17+
ENV PYTHONPATH=/app/src
18+
RUN python -m pip install --upgrade pip && \
19+
python -m pip install --no-cache-dir -e .[dev,test,lint]
20+
CMD ["uvicorn", "search_enrichment_agent.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
21+
22+
FROM base AS prod
23+
ENV APP_ENV=prod
24+
COPY pyproject.toml ./pyproject.toml
25+
COPY . ./
26+
ENV PYTHONPATH=/app/src
27+
RUN python -m pip install --upgrade pip && \
28+
python -m pip install --no-cache-dir .
29+
CMD ["uvicorn", "search_enrichment_agent.main:app", "--host", "0.0.0.0", "--port", "8000"]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[project]
2+
name = "search-enrichment-agent"
3+
version = "0.1.0"
4+
description = "Search Enrichment service — search-optimized product enrichment"
5+
authors = [{name = "Ricardo Cataldi", email = "rcataldi@microsoft.com"}]
6+
requires-python = ">=3.13"
7+
dependencies = ["fastapi", "fastapi-mcp", "uvicorn", "pydantic>=2", "agent-framework", "azure-ai-projects>=2.0.0b4", "azure-identity", "azure-search-documents", "azure-cosmos", "azure-storage-blob", "azure-eventhub", "redis", "asyncpg", "holiday-peak-lib @ git+https://github.com/Azure-Samples/holiday-peak-hub.git@v1.0.0#subdirectory=lib/src"]
8+
9+
[project.optional-dependencies]
10+
dev = ["faker", "pre-commit", "python-dotenv", "debugpy"]
11+
test = ["pytest", "pytest-cov", "pytest-asyncio", "httpx", "requests"]
12+
lint = ["pylint", "isort", "black[jupyter]>=25.1.0"]
13+
14+
[tool.pytest.ini_options]
15+
addopts = "-ra -q -s --cov=search_enrichment_agent --cov-report=term-missing"
16+
testpaths = ["tests"]
17+
18+
[build-system]
19+
requires = ["setuptools>=68", "wheel"]
20+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)