chore: uv 적용

This commit is contained in:
zephyrdark 2026-02-04 22:26:19 +09:00
parent 926958c15a
commit bfcb155a4f
4 changed files with 1818 additions and 11 deletions

View File

@ -4,17 +4,18 @@ Integrated Quant Portfolio Management Application
## Tech Stack
- **Backend:** FastAPI, Python 3.14, SQLAlchemy, PostgreSQL
- **Backend:** FastAPI, Python 3.12, SQLAlchemy, PostgreSQL
- **Frontend:** Next.js 15, React 19, TypeScript, Tailwind CSS
- **Infrastructure:** Docker, Docker Compose
- **Infrastructure:** Docker, Docker Compose, uv
## Development
### Prerequisites
- Docker & Docker Compose
- Python 3.14
- Python 3.12
- Node.js 24
- [uv](https://docs.astral.sh/uv/) (Python package manager)
### Quick Start
@ -24,10 +25,8 @@ docker-compose up -d
# Backend only (development)
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload
uv sync
uv run uvicorn app.main:app --reload
# Frontend only (development)
cd frontend

View File

@ -3,15 +3,17 @@ FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
# Install system dependencies and uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install Python dependencies with uv
COPY pyproject.toml .
RUN uv pip install --system --no-cache -r pyproject.toml
# Copy application code
COPY . .

37
backend/pyproject.toml Normal file
View File

@ -0,0 +1,37 @@
[project]
name = "galaxy-po-backend"
version = "1.0.0"
description = "Galaxy Portfolio Optimization Backend"
requires-python = ">=3.12"
dependencies = [
"fastapi==0.115.6",
"uvicorn[standard]==0.34.0",
"sqlalchemy==2.0.36",
"alembic==1.14.0",
"psycopg2-binary==2.9.10",
"pydantic==2.10.4",
"pydantic-settings==2.7.1",
"python-jose[cryptography]==3.3.0",
"passlib[bcrypt]==1.7.4",
"python-multipart==0.0.20",
"apscheduler==3.10.4",
"pykrx==1.0.45",
"requests==2.32.3",
"beautifulsoup4==4.12.3",
"lxml==5.3.0",
"pandas==2.2.3",
"numpy==2.2.1",
"httpx==0.28.1",
]
[project.optional-dependencies]
dev = [
"pytest==8.3.4",
"pytest-asyncio==0.25.2",
]
[tool.uv]
dev-dependencies = [
"pytest==8.3.4",
"pytest-asyncio==0.25.2",
]

1769
backend/uv.lock generated Normal file

File diff suppressed because it is too large Load Diff