[project]
name = "4dpocket"
version = "0.2.1"
description = "Self-hosted AI-powered personal knowledge base"
requires-python = ">=3.12"
license = {text = "GPL-3.0"}
dependencies = [
    "fastapi>=0.115.0",
    "uvicorn[standard]>=0.30.0",
    "sqlmodel>=0.0.22",
    "alembic>=1.14.0",
    "pydantic-settings>=2.6.0",
    "PyJWT>=2.9.0",
    "bcrypt>=4.0.0",
    "httpx>=0.27.0",
    "huey>=2.5.0",
    "python-multipart>=0.0.12",
    "email-validator>=2.0.0",
    "readability-lxml>=0.8.1",
    "openai>=1.50.0",
    "lxml>=5.0.0",
    "lxml-html-clean>=0.4.0",
    "mcp>=1.12",
]

[project.scripts]
"4dpocket" = "fourdpocket.cli:main"

[project.optional-dependencies]
postgres = [
    "psycopg2-binary>=2.9.0",
]
semantic = [
    "chromadb>=0.5.0",
    "sentence-transformers>=3.0.0",
]
processors = [
    "yt-dlp>=2024.0.0",
    "youtube-transcript-api>=0.6.0",
    "instaloader>=4.10",
    "gallery-dl>=1.27.0",
    "playwright>=1.40.0",
    "pytesseract>=0.3.10",
    "PyMuPDF>=1.24.0",
    "Pillow>=10.0.0",
]
meilisearch = [
    "meilisearch>=0.31.0",
]
pgvector = [
    "pgvector>=0.3.0",
]
reranker = [
    "sentence-transformers>=3.0.0",
]
all = [
    "4dpocket[postgres,semantic,processors,meilisearch,pgvector,reranker]",
]
dev = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.24.0",
    "pytest-cov>=5.0.0",
    "respx>=0.21.0",
    "ruff>=0.7.0",
    "mypy>=1.13.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/fourdpocket"]

[tool.hatch.build.hooks.custom]

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]

[tool.ruff]
line-length = 100
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
ignore = ["E501", "E402", "N814"]
