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

[project]
name = "golf-mcp"
version = "0.2.0"
description = "Framework for building MCP servers"
authors = [
    {name = "Antoni Gmitruk", email = "antoni@golf.dev"}
]
readme = "README.md"
requires-python = ">=3.8"
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
    "Programming Language :: Python :: 3",
    "Operating System :: OS Independent",
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12"
]
dependencies = [
    "typer>=0.15.4",
    "rich>=14.0.0",
    "fastmcp>=2.11.0,<3.0.0",
    "pydantic>=2.11.0",
    "pydantic-settings>=2.0.0",
    "python-dotenv>=1.1.0",
    "black>=24.10.0",
    "pyjwt>=2.0.0",
    "httpx>=0.28.1",
    "posthog>=4.1.0",
    "opentelemetry-api>=1.33.1",
    "opentelemetry-sdk>=1.33.1",
    "opentelemetry-instrumentation-asgi>=0.40b0",
    "opentelemetry-exporter-otlp-proto-http>=0.40b0",
    "wrapt>=1.17.0"
]

[project.optional-dependencies]
metrics = [
    "prometheus-client>=0.22.1"
]

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

[project.urls]
"Homepage" = "https://golf.dev"
"Repository" = "https://github.com/golf-mcp/golf"

[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
include = ["golf*"]
exclude = ["golf.tests*"] # Example: if you have tests inside src/golf/tests
[tool.setuptools.package-data]
golf = ["examples/**/*"]

[tool.poetry]
name = "golf-mcp"
version = "0.1.20"
description = "Framework for building MCP servers with zero boilerplate"
authors = ["Antoni Gmitruk <antoni@golf.dev>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/golf-mcp/golf"
homepage = "https://golf.dev"
packages = [{include = "golf", from = "src"}]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12"
]

[tool.poetry.dependencies]
python = ">=3.8" # Match requires-python
fastmcp = ">=2.11.0,<3.0.0"
typer = {extras = ["all"], version = ">=0.15.4"}
pydantic = ">=2.11.0"
pydantic-settings = ">=2.0.0"
rich = ">=14.0.0"
python-dotenv = ">=1.1.0"
black = ">=24.10.0"
pyjwt = ">=2.0.0"
httpx = ">=0.28.1"
posthog = ">=4.1.0"
opentelemetry-api = ">=1.33.1"
opentelemetry-sdk = ">=1.33.1"
opentelemetry-instrumentation-asgi = ">=0.40b0"
opentelemetry-exporter-otlp-proto-http = ">=0.40b0"
wrapt = ">=1.17.0"
prometheus-client = {version = ">=0.22.1", optional = true}

[tool.poetry.extras]
metrics = ["prometheus-client"]

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-asyncio = "^0.23.0"
ruff = "^0.1.0"
mypy = "^1.6.0"
pytest-cov = "^4.1.0"

[tool.black]
line-length = 120

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

[tool.ruff.lint]
select = ["E", "F", "B", "C4", "C90", "UP", "N", "ANN", "SIM", "TID"]
ignore = [
    "ANN401",  # Disallow Any (too strict for dynamic code)
    "B008",    # Function call in defaults (common in CLI frameworks like Typer)
]

[tool.ruff.format]
# Use Black-compatible formatting
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.mypy]
python_version = "3.11"
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unused_configs = true

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = [
    "-v",
    "--strict-markers",
    "--tb=short",
    "--cov=golf",
    "--cov-report=term-missing",
    "--cov-report=html",
]
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
    "integration: marks tests as integration tests",
] 