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

[project]
name = "insurance-gam"
version = "0.2.0"
description = "Interpretable GAM toolkit for insurance pricing — EBM, Neural Additive Models, and Pairwise Interaction Networks"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [{ name = "Burning Cost", email = "pricing.frontier@gmail.com" }]
keywords = [
    "insurance",
    "pricing",
    "actuarial",
    "GAM",
    "EBM",
    "neural-additive-model",
    "interpretable-ml",
    "pairwise-interactions",
    "ga2m",
    "poisson",
    "tweedie",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Financial and Insurance Industry",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Scientific/Engineering :: Information Analysis",
    "Topic :: Office/Business :: Financial",
]

# Core dependencies shared across all three subpackages
dependencies = [
    "numpy>=2.0",
    "polars>=1.0",
    "matplotlib>=3.7.0",
    "scikit-learn>=1.3.0",
    "pandas>=2.0.0",
    "pyarrow>=14.0.0",
]

[project.optional-dependencies]
# Neural subpackages (anam, pin)
neural = ["torch>=2.0.0"]
# EBM subpackage — interpret pulls in flask/werkzeug/pyasn1 transitively;
# pin them here so the ebm extra enforces known-safe versions.
ebm = [
    "interpret>=0.7.0",
    "pyasn1>=0.6.3",
    "flask>=3.1.3",
    "werkzeug>=3.1.6",
]
# Optional EBM extras
excel = ["openpyxl>=3.0"]
glm = ["statsmodels>=0.14.5"]
# Everything
all = [
    "torch>=2.0.0",
    "interpret>=0.7.0",
    "pyasn1>=0.6.3",
    "flask>=3.1.3",
    "werkzeug>=3.1.6",
    "openpyxl>=3.0",
    "statsmodels>=0.14.5",
]
dev = [
    "pytest>=7.4.0",
    "pytest-cov>=4.0.0",
    "databricks-sdk>=0.97.0",
    "pdoc>=14.0.0",
]

[project.urls]
Homepage = "https://burning-cost.github.io/"
Repository = "https://github.com/burning-cost/insurance-gam"
Changelog = "https://github.com/burning-cost/insurance-gam/releases"
Documentation = "https://burning-cost.github.io/insurance-gam"
"Bug Tracker" = "https://github.com/burning-cost/insurance-gam/issues"

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

[tool.pytest.ini_options]
testpaths = ["tests/ebm", "tests/anam", "tests/pin"]
addopts = "-v --tb=short"

[dependency-groups]
dev = [
    "pytest-cov>=7.0.0",
]
