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

[project]
name = "indonesia-civic-stack"
version = "0.1.0"
description = "Python SDK + 40 MCP tools for 11 Indonesian government data portals"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
    { name = "Surya Setiyaputra" },
]
keywords = [
    "indonesia",
    "civic-tech",
    "government-data",
    "mcp",
    "open-data",
    "sdk",
    "bpom",
    "ojk",
    "bmkg",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed",
]

dependencies = [
    "httpx>=0.27",
    "beautifulsoup4>=4.12",
    "pydantic>=2.0",
    "lxml>=5.0",
]

[project.optional-dependencies]
mcp = [
    "fastmcp>=3.0",
]
api = [
    "fastapi>=0.110",
    "uvicorn>=0.30",
]
browser = [
    "playwright>=1.40",
    "camoufox>=0.4",
]
all = [
    "indonesia-civic-stack[mcp,api,browser]",
]
dev = [
    "pytest>=8.0",
    "pytest-asyncio>=0.23",
    "vcrpy>=6.0",
    "ruff>=0.4",
    "mypy>=1.10",
]

[project.scripts]
civic-stack = "civic_stack.cli:main"
civic-stack-mcp = "civic_stack.server:main"

[project.urls]
Homepage = "https://datarakyat.id"
Documentation = "https://datarakyat.id/docs/"
Repository = "https://github.com/suryast/indonesia-civic-stack"
Issues = "https://github.com/suryast/indonesia-civic-stack/issues"

[tool.hatch.build.targets.wheel]
packages = ["civic_stack"]

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

[tool.ruff.lint]
select = ["E", "F", "I", "W"]

[tool.ruff.lint.per-file-ignores]
"civic_stack/ahu/browser.py" = ["E501"]  # user agent strings
"civic_stack/bpjph/browser.py" = ["E501"]
"civic_stack/shared/http.py" = ["E501"]
"civic_stack/shared/schema.py" = ["E501"]
"civic_stack/*/server.py" = ["E501"]  # tool descriptions
"civic_stack/*/app.py" = ["E501"]  # FastAPI descriptions
"tests/*" = ["E501"]

[tool.mypy]
python_version = "3.11"
strict = false
warn_return_any = true
warn_unused_configs = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
