Files
AI/ontology_platform/pyproject.toml
2026-05-20 13:21:08 +09:00

148 lines
4.9 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ontology-platform"
version = "0.0.1"
description = "Universal ontology construction platform integrating OntoCast (RDF core), Crawl4AI, Trafilatura, Guardrails, and Neo4j GraphRAG"
readme = "README.md"
requires-python = ">=3.12"
authors = [
{ name = "Ontology Platform Team" },
]
# Phase별로 필요할 때 주석을 해제하여 활성화한다.
# 통합설계서 §5 단계별 통합 로드맵 참조.
dependencies = [
# ─── Phase 0: Base (OntoCast 의존성) ──────────────────────────────
# 통합설계서 §11 기술 스택 요약 + OntoCast 분석 §2.2
"fastapi>=0.115.0",
"uvicorn[standard]>=0.32.0",
"python-multipart>=0.0.12",
"pydantic>=2.9.0",
"pydantic-settings>=2.6.0",
"python-dotenv>=1.0.1",
"click>=8.1.7",
# LangGraph 워크플로우 (OntoCast 코어 의존성)
"langgraph>=0.2.40",
"langchain>=0.3.7",
"langchain-openai>=0.2.8",
"langchain-ollama>=0.1.0",
# RDF 처리 (OntoCast 코어 의존성)
"rdflib>=7.1.0",
"owlready2>=0.46",
"pyld>=2.0.4",
"oxrdflib>=0.4.0",
# 문서 처리
"docling>=2.0.0",
"pypdf>=5.1.0",
# 청킹/임베딩 (OntoCast Phase 0에서 사용)
"langchain-experimental>=0.3.3",
"sentence-transformers>=3.3.0",
# 엔티티 군집화 (OntoCast Entity Aggregation)
"hdbscan>=0.8.39",
"umap-learn>=0.5.7",
"rapidfuzz>=3.10.0",
# ─── Phase 1: Trafilatura 통합 ─────────────────────────────────────
# 통합설계서 §5 Phase 1
# PHASE0 Acceptance Gate 통과 후 활성화
"trafilatura[all]>=2.0.0",
# ─── Phase 2: Crawl4AI 통합 ────────────────────────────────────────
# 통합설계서 §5 Phase 2
# PHASE1 Acceptance Gate 통과 후 활성화
# "crawl4ai>=0.4.0",
# ─── Phase 3: Guardrails 통합 ──────────────────────────────────────
# 통합설계서 §5 Phase 3
# PHASE2 Acceptance Gate 통과 후 활성화
# Hub/telemetry 비활성화 환경변수 사용 필수 (§10 리스크)
# "guardrails-ai>=0.5.0",
# ─── Phase 4: Neo4j GraphRAG 통합 ──────────────────────────────────
# 통합설계서 §5 Phase 4
# PHASE3 Acceptance Gate 통과 후 활성화
# 버전 고정: experimental API 변경 위험 (Neo4j GraphRAG 분석 §13.1)
# "neo4j-graphrag[openai,experimental]==1.16.0",
# "neo4j>=5.18.1,<7",
# ─── 운영 인프라 ───────────────────────────────────────────────────
# Job Queue
"arq>=0.26.3",
"redis>=5.2.0",
# Postgres (메타데이터)
"asyncpg>=0.30.0",
"sqlalchemy[asyncio]>=2.0.36",
"alembic>=1.14.0",
# Object Storage
"boto3>=1.35.0",
# HTTP
"httpx>=0.27.2",
"aiohttp>=3.10.10",
# 관측
"structlog>=24.4.0",
"prometheus-client>=0.21.0",
"opentelemetry-api>=1.28.0",
"opentelemetry-sdk>=1.28.0",
# 인증
"authlib>=1.3.2",
"python-jose[cryptography]>=3.3.0",
"passlib[bcrypt]>=1.7.4",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"ruff>=0.7.4",
"mypy>=1.13.0",
"ipython>=8.29.0",
"httpx>=0.27.2", # TestClient
]
[project.scripts]
ontology-platform = "ont_platform.api.main:cli"
[tool.hatch.build.targets.wheel]
packages = ["ont_platform", "crawler_platform"]
# ─── Ruff (linter + formatter) ────────────────────────────────────────
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["ont_platform", "crawler_platform", "tests"]
extend-exclude = ["vendored"] # vendored OntoCast 등은 원본 유지
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "RUF"]
ignore = ["E501"] # line length는 formatter가 처리
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
# ─── Mypy ────────────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.12"
strict = true
exclude = ["vendored/"]
# ─── Pytest ──────────────────────────────────────────────────────────
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
filterwarnings = ["ignore::DeprecationWarning"]