[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "mcpcap"
dynamic = ["version"]
description = "A modular Python MCP Server for analyzing PCAP files"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.10"
authors = [
    {name = "mcpcap contributors"}
]
keywords = ["pcap", "network", "analysis", "mcp", "dns"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Intended Audience :: System Administrators",
    "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 :: System :: Networking :: Monitoring",
    "Topic :: Security",
]
dependencies = [
    "fastmcp~=2.12.2",      # >=2.12.2,<2.13
    "scapy~=2.6.1",         # >=2.6.1,<2.7
    "requests~=2.32.5",     # >=2.32.5,<2.33
]

[project.optional-dependencies]
test = [
    "pytest",
    "pytest-cov",
    "setuptools-scm[toml]",
]
dev = [
    "setuptools-scm[toml]",
    "build",
    "twine",
    "ruff",
    "mypy",
    "pytest",
    "pytest-cov",
]
docs = [
    "sphinx>=7.0",
    "sphinx-rtd-theme",
    "myst-parser",
    "sphinx-autodoc-typehints",
    "sphinx-copybutton",
    "linkify-it-py",
    "prompt-toolkit",
]

[project.urls]
Homepage = "https://mcpcap.ai"
Repository = "https://github.com/mcpcap/mcpcap"
Issues = "https://github.com/mcpcap/mcpcap/issues"

[project.scripts]
mcpcap = "mcpcap:main"

[tool.setuptools_scm]
write_to = "src/mcpcap/_version.py"
version_scheme = "guess-next-dev"
local_scheme = "node-and-date"

[tool.setuptools.packages.find]
where = ["src"]
include = ["mcpcap*"]

# Ruff configuration
[tool.ruff]
target-version = "py310"
line-length = 88
src = ["src", "tests"]
exclude = ["src/mcpcap/_version.py"]

[tool.ruff.lint]
select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "I",  # isort
    "B",  # flake8-bugbear
    "C4", # flake8-comprehensions
    "UP", # pyupgrade
]
ignore = [
    "E501", # line too long (handled by formatter)
]

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

# MyPy configuration
[tool.mypy]
python_version = "3.10"
mypy_path = "src"
packages = ["mcpcap"]
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
