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

[project]
name = "databridge-ai"
version = "0.39.0"
description = "DataBridge AI Community Edition - An open-source, MCP-native data reconciliation engine with tools for hierarchy management, data quality, and analytics"
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE"}
authors = [
    {name = "DataBridge AI Team", email = "support@databridge.ai"}
]
keywords = [
    "data", "reconciliation", "analytics", "hierarchy", "mcp",
    "data-quality", "etl", "fuzzy-matching", "ai", "csv", "json",
    "data-comparison", "dbt", "data-profiling"
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Financial and Insurance Industry",
    "Intended Audience :: Information Technology",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Database",
    "Topic :: Office/Business :: Financial",
    "Topic :: Scientific/Engineering :: Information Analysis",
]

dependencies = [
    "fastmcp>=2.0.0",
    "pydantic>=2.0.0",
    "pydantic-settings>=2.0.0",
    "pandas>=2.0.0",
    "sqlalchemy>=2.0.0",
    "rapidfuzz>=3.0.0",
]

[project.optional-dependencies]
pdf = [
    "pypdf>=3.0.0",
]
ocr = [
    "pytesseract>=0.3.10",
    "Pillow>=10.0.0",
]
dbt = [
    "dbt-core>=1.5.0",
]
all = [
    "pypdf>=3.0.0",
    "pytesseract>=0.3.10",
    "Pillow>=10.0.0",
    "dbt-core>=1.5.0",
]
dev = [
    "pytest>=7.0.0",
    "pytest-cov>=4.0.0",
    "pytest-asyncio>=0.21.0",
    "ruff>=0.1.0",
    "mypy>=1.0.0",
    "build>=1.0.0",
    "twine>=4.0.0",
]

[project.urls]
Homepage = "https://github.com/tghanchidnx/databridge-ai"
Documentation = "https://github.com/tghanchidnx/databridge-ai/wiki"
Repository = "https://github.com/tghanchidnx/databridge-ai.git"
Issues = "https://github.com/tghanchidnx/databridge-ai/issues"
Changelog = "https://github.com/tghanchidnx/databridge-ai/blob/main/CHANGELOG.md"

[project.scripts]
databridge = "src.server:main"
databridge-mcp = "src.server:mcp.run"
databridge-ui = "run_ui:main"

[project.entry-points."mcp.servers"]
databridge = "src.server:mcp"

[tool.hatch.build.targets.sdist]
include = [
    "/src",
    "/plugins",
    "/ui",
    "/templates",
    "/skills",
    "/knowledge_base",
    "/README.md",
    "/LICENSE",
    "/CHANGELOG.md",
]
exclude = [
    "*.pyc",
    "__pycache__",
    ".git",
    ".pytest_cache",
    "*.egg-info",
    "/tests",
    "/data",
    "/docs",
]

[tool.hatch.build.targets.wheel]
packages = ["src", "plugins", "ui"]

# Ruff configuration (linting)
[tool.ruff]
line-length = 120
target-version = "py310"
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "UP",  # pyupgrade
]
ignore = [
    "E501",  # line too long (handled by formatter)
    "B008",  # do not perform function calls in argument defaults
    "C901",  # too complex
]

# MyPy configuration
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true

# Pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q"
testpaths = ["tests"]
asyncio_mode = "auto"

# Coverage configuration
[tool.coverage.run]
source = ["src"]
branch = true

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "raise AssertionError",
    "raise NotImplementedError",
    "if __name__ == .__main__.:",
]
