refactor: consolidate deps into pyproject.toml, remove requirements.txt
- All dependencies now in pyproject.toml [project.dependencies] - Dev/test deps in [project.optional-dependencies] dev and [tool.uv] - Dockerfile uses uv pip install . from pyproject.toml - CI uses uv pip install ".[dev]" - Deleted requirements.txt and requirements-dev.txt - Updated README, CLAUDE.md install instructions - Enhanced .dockerignore (exclude tests, docs, infra from image)
This commit is contained in:
parent
fa3aef652f
commit
0279cc06fa
9 changed files with 39 additions and 64 deletions
|
|
@ -1,4 +1,5 @@
|
|||
.git
|
||||
.github
|
||||
.venv
|
||||
venv
|
||||
__pycache__
|
||||
|
|
@ -13,5 +14,11 @@ build/
|
|||
.pytest_cache
|
||||
.mypy_cache
|
||||
.claude/
|
||||
.idea
|
||||
node_modules/
|
||||
tests/
|
||||
docs/
|
||||
dev_docs/
|
||||
infra/
|
||||
server/
|
||||
docs/ZS_PADAK_*
|
||||
|
|
|
|||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv pip install --system -r requirements-dev.txt
|
||||
run: uv pip install --system ".[dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ -v --tb=short
|
||||
|
|
|
|||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
uses: astral-sh/setup-uv@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv pip install --system -r requirements-dev.txt
|
||||
run: uv pip install --system ".[dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ -v --tb=short
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ Table definitions: DuckDB `table_registry` table in `system.duckdb`.
|
|||
```bash
|
||||
# Setup
|
||||
python3 -m venv .venv && source .venv/bin/activate
|
||||
uv pip install -r requirements.txt
|
||||
uv pip install ".[dev]"
|
||||
|
||||
# Run FastAPI locally
|
||||
uvicorn app.main:app --reload
|
||||
|
|
|
|||
|
|
@ -8,13 +8,12 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy dependency files first for layer caching
|
||||
COPY requirements.txt .
|
||||
RUN uv pip install --system --no-cache -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Install production dependencies from pyproject.toml
|
||||
RUN uv pip install --system --no-cache .
|
||||
|
||||
# Default: run FastAPI server
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ curl -X POST http://localhost:8000/api/sync/trigger
|
|||
python3 -m venv .venv && source .venv/bin/activate
|
||||
|
||||
# Install dependencies
|
||||
uv pip install -r requirements.txt
|
||||
uv pip install ".[dev]"
|
||||
|
||||
# Run FastAPI locally with hot reload
|
||||
uvicorn app.main:app --reload
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
[project]
|
||||
name = "data-analyst"
|
||||
name = "agnes-the-ai-analyst"
|
||||
version = "2.0.0"
|
||||
description = "AI Data Analyst — data distribution platform for AI analytical systems"
|
||||
requires-python = ">=3.9"
|
||||
description = "Agnes — AI Data Analyst platform for AI analytical systems"
|
||||
requires-python = ">=3.11"
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
|
||||
dependencies = [
|
||||
# Core database
|
||||
|
|
@ -13,6 +14,7 @@ dependencies = [
|
|||
"uvicorn[standard]>=0.32.0",
|
||||
"python-multipart>=0.0.9",
|
||||
"jinja2>=3.1.0",
|
||||
"starlette>=0.41.0",
|
||||
# Authentication
|
||||
"PyJWT>=2.8.0",
|
||||
"itsdangerous>=2.1.0",
|
||||
|
|
@ -37,19 +39,32 @@ dependencies = [
|
|||
# Profiler visualizations
|
||||
"matplotlib>=3.8.0",
|
||||
"numpy>=1.24.0",
|
||||
# Sample data generation
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=9.0.0",
|
||||
"pytest-timeout>=2.0.0",
|
||||
"faker>=24.0.0",
|
||||
"anthropic>=0.30.0",
|
||||
"openai>=1.30.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
da = "cli.main:app"
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"pytest>=7.0.0",
|
||||
"pytest-mock>=3.0.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["app", "src", "connectors", "cli", "services", "config"]
|
||||
|
||||
[tool.uv]
|
||||
dev-dependencies = [
|
||||
"pytest>=9.0.0",
|
||||
"pytest-timeout>=2.0.0",
|
||||
"faker>=24.0.0",
|
||||
"anthropic>=0.30.0",
|
||||
"openai>=1.30.0",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
-r requirements.txt
|
||||
faker>=24.0.0
|
||||
anthropic>=0.30.0
|
||||
openai>=1.30.0
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
# Core database
|
||||
duckdb>=0.9.0
|
||||
|
||||
# Web framework (FastAPI)
|
||||
fastapi>=0.115.0
|
||||
uvicorn[standard]>=0.32.0
|
||||
python-multipart>=0.0.9
|
||||
jinja2>=3.1.0
|
||||
|
||||
# Authentication
|
||||
PyJWT>=2.8.0
|
||||
itsdangerous>=2.1.0
|
||||
authlib>=1.3.0
|
||||
argon2-cffi>=23.1.0
|
||||
|
||||
# HTTP client
|
||||
httpx>=0.27.0
|
||||
|
||||
# CLI
|
||||
typer>=0.12.0
|
||||
rich>=13.0.0
|
||||
|
||||
# Configuration
|
||||
python-dotenv>=1.0.0
|
||||
pyyaml>=6.0
|
||||
|
||||
# Data processing
|
||||
pandas>=2.0.0
|
||||
pyarrow>=12.0.0
|
||||
pytz>=2024.1
|
||||
|
||||
# Data source connectors
|
||||
kbcstorage>=0.9.0
|
||||
google-cloud-bigquery>=3.0.0
|
||||
google-cloud-bigquery-storage>=2.0.0
|
||||
|
||||
# Profiler visualizations
|
||||
matplotlib>=3.8.0
|
||||
numpy>=1.24.0
|
||||
|
||||
# Testing
|
||||
pytest-timeout>=2.0.0
|
||||
Loading…
Reference in a new issue