[project]
name = "world-anvil-mcp"
version = "0.1.0"
description = "MCP server for World Anvil API integration to assist with D&D world development"
authors = [{name = "Steven Peterson"}]
license = {text = "BSD-3-Clause"}
requires-python = ">=3.11"
dependencies = [
"mcp>=1.0.0",
"pydantic>=2.0.0",
"httpx>=0.27.0",
"python-dotenv>=1.0.0",
"tenacity>=8.0.0",
"cachetools>=5.0.0",
]
[project.optional-dependencies]
dev = [
"ruff>=0.3.0",
"mypy>=1.8.0",
"pre-commit>=3.5.0",
]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"pytest-timeout>=2.2.0",
"respx>=0.20.0",
"faker>=22.0.0",
]
docs = [
"sphinx>=7.2.0",
"sphinx-rtd-theme>=2.0.0",
"sphinx-autodoc-typehints>=1.25.0",
"sphinx-autobuild>=2021.3.14",
"myst-parser>=2.0.0",
]
[project.scripts]
world-anvil-mcp = "world_anvil_mcp.server:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 100
target-version = "py311"
indent-width = 4
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit (security)
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PL", # pylint
"RUF", # ruff-specific rules
]
ignore = [
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
"S104", # Possible binding to all interfaces
"PLR0913", # Too many arguments to function call
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # Use of assert detected (expected in tests)
"ANN201", # Missing return type annotation for public function
"ARG001", # Unused function argument (common in fixtures)
"PLR2004", # Magic value used in comparison
]
[tool.ruff.lint.isort]
known-first-party = ["world_anvil_mcp"]
combine-as-imports = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
check_untyped_defs = true
strict_equality = true
show_error_codes = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "cachetools.*"
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"unit: Unit tests (fast, no I/O)",
"integration: Integration tests (mocked HTTP)",
"e2e: End-to-end tests (live API)",
"asyncio: Async test marker",
"slow: Tests that take >1 second",
]
addopts = [
"--strict-markers",
"--strict-config",
"--showlocals",
"--tb=short",
]
[tool.coverage.run]
source = ["src"]
branch = true
omit = [
"*/tests/*",
"*/__init__.py",
"*/conftest.py",
]
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@abstractmethod",
"@overload",
]
[tool.coverage.html]
directory = "htmlcov"