[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "toolregistry"
dynamic = ["version"]
authors = [{ name = "Oaklight", email = "oaklight@gmx.com" }]
description = "ToolRegistry: a library for easier function calling and tool use in LLMs"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
classifiers = [
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
    "pydantic>=2.7.2,<3.0.0",
    "loguru>=0.7.3",
    "cloudpickle>=3.0.0",
    "httpx>=0.28.1",
]

[project.optional-dependencies]
mcp = ["mcp>=1.0.0,<2.0.0"]
openapi = [
    "PyYAML>=6.0.2",  # safe load both json and yaml
    "jsonref>=1.1.0", # deref $ref in openapi spec
]
langchain = ["langchain-core>=0.3,<0.4", "langchain-community>=0.3,<0.4"]

# dev dependencies
dev = [
    "python-dotenv>=1.0.1",
    "openai>=1.79.0",
    "fastapi>=0.115.12",
    "ty>=0.0.21",
    "ruff>=0.1.0",
    "build>=1.2.2.post1",
    "twine>=6.1.0",
    "deprecated>=1.2.18",
]
test = [
    "pytest>=7.0.0",
    "pytest-cov>=4.0.0",
    "pytest-asyncio>=0.21.0",
    "pytest-mock>=3.10.0",
    "coverage>=7.0.0",
]

[project.urls]
Documentation = "https://toolregistry.readthedocs.io"
Repository = "https://github.com/Oaklight/ToolRegistry"
Issues = "https://github.com/Oaklight/ToolRegistry/issues"

[tool.ruff]
target-version = "py310"

[tool.ruff.lint]
select = ["E", "F", "UP"]
ignore = ["UP007", "E501"]

[tool.ty.environment]
python-version = "3.10"

[tool.ty.src]
include = ["src", "tests"]

[tool.ty.rules]
unresolved-import = "ignore"

[tool.setuptools.dynamic]
version = { attr = "toolregistry.__version__" }

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"toolregistry" = ["py.typed"]
"toolregistry.admin" = ["*.html"]
