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

[project]
name = "duckguard"
version = "3.2.0"
description = "A Python-native data quality tool with AI superpowers, built on DuckDB for speed"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.10"
authors = [
    { name = "DuckGuard Team" }
]
keywords = [
    "data-quality",
    "data-validation",
    "duckdb",
    "testing",
    "data-engineering",
    "data-profiling",
    "data-contracts",
    "schema-validation",
    "pii-detection",
    "anomaly-detection",
    "dbt",
    "great-expectations",
    "soda",
    "data-observability",
    "data-testing",
    "etl",
    "data-pipeline",
    "airflow",
    "pytest-plugin",
    "data-governance",
    "data-catalog",
    "data-lineage",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Information Technology",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development :: Testing",
    "Topic :: Software Development :: Quality Assurance",
    "Topic :: Database",
    "Topic :: Scientific/Engineering :: Information Analysis",
    "Framework :: Pytest",
    "Environment :: Console",
    "Typing :: Typed",
    "Operating System :: OS Independent",
]

dependencies = [
    "duckdb>=1.0.0",
    "typer>=0.9.0",
    "rich>=13.0.0",
    "pyarrow>=14.0.0",
    "pydantic>=2.0.0",
    "pyyaml>=6.0.0",
    "packaging>=21.0",
]

[project.optional-dependencies]
# Database connectors
postgres = ["psycopg2-binary>=2.9.0"]
mysql = ["pymysql>=1.0.0"]
snowflake = ["snowflake-connector-python>=3.0.0"]
bigquery = ["google-cloud-bigquery>=3.0.0"]
redshift = ["redshift-connector>=2.0.0"]
sqlserver = ["pyodbc>=4.0.0"]
databricks = ["databricks-sql-connector>=2.0.0"]
oracle = ["oracledb>=1.0.0"]
mongodb = ["pymongo>=4.0.0"]
kafka = ["kafka-python>=2.0.0"]
# Note: SQLite is built into DuckDB, no extra dependency needed

# AI/LLM features
llm = ["openai>=1.0.0", "anthropic>=0.18.0"]

# Statistical tests (distributional checks)
statistics = ["scipy>=1.11.0"]

# Report generation (HTML/PDF)
reports = [
    "jinja2>=3.0.0",
    "weasyprint>=60.0",
]

# Apache Airflow integration
airflow = ["apache-airflow>=2.5.0"]

# All database connectors
databases = [
    "duckguard[postgres,mysql,snowflake,bigquery,redshift,sqlserver,databricks,oracle,mongodb,kafka]"
]

# Development dependencies
dev = [
    "pytest>=7.0.0",
    "pytest-cov>=4.0.0",
    "black>=23.0.0",
    "ruff>=0.1.0",
    "mypy>=1.0.0",
    "pandas>=2.0.0",  # Required for tests
    "numpy>=1.24.0",  # Required for tests (also scipy dependency)
    "scipy>=1.11.0",  # Required for distributional check tests
    "psutil>=5.9.0",  # Required for performance benchmark tests
    "jinja2>=3.0.0",  # Required for HTML report template tests
]

# Everything
all = ["duckguard[databases,llm,statistics,reports,airflow]"]

[project.scripts]
duckguard = "duckguard.cli.main:app"

[project.entry-points.pytest11]
duckguard = "duckguard.pytest_plugin.plugin"

[project.urls]
Homepage = "https://github.com/XDataHubAI/duckguard"
Documentation = "https://xdatahubai.github.io/duckguard/"
Repository = "https://github.com/XDataHubAI/duckguard"

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

[tool.hatch.build.targets.sdist]
include = [
    "/src",
    "/tests",
    "/examples",
]

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

[tool.black]
line-length = 100
target-version = ["py310", "py311", "py312"]

[tool.ruff]
line-length = 120
target-version = "py310"

[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = [
    "E501",  # Ignore line-too-long for now
    "N806",  # Allow uppercase variable names for statistical conventions (Q1, Q3, IQR, X)
]

[tool.ruff.lint.per-file-ignores]
# Allow imports in try/except blocks for library availability detection
"src/duckguard/checks/distributional.py" = ["F401"]
"src/duckguard/profiler/*.py" = ["F401"]
"tests/test_*.py" = ["F401"]
# Ignore notebook formatting issues
"*.ipynb" = ["E402", "W291", "W293"]

[tool.mypy]
python_version = "3.10"
strict = true
