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

[project]
name = "glyphs-info-mcp"
version = "1.2.2"
description = "Unified MCP server for Glyphs handbook and API queries"
authors = [
    {name = "Glyphs info MCP Contributors", email = "glyphs-info-mcp@example.com"}
]
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.10"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
]

dependencies = [
    "mcp[cli]>=1.9.0",
    "pydantic>=2.10.0",
    "pydantic-settings>=2.8.0",
    "httpx[http2]>=0.28.0",
    "typer>=0.15.0",
    "rich>=13.9.0",
    "python-dotenv>=1.0.0",
    "markdown-it-py>=3.0.0",
    "pathlib2>=2.3.7; python_version < '3.9'",
    "typing-extensions>=4.12.0",
    "markdownify>=1.1.0",
    "readabilipy>=0.3.0",  # brings beautifulsoup4 and lxml as transitive deps
    "platformdirs>=4.0.0",
    "pyyaml>=6.0.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0.0",
    "pytest-cov>=4.0.0",
    "pytest-asyncio>=0.23.0",
    "black>=24.0.0",
    "ruff>=0.1.0",
    "mypy>=1.8.0",
    "pre-commit>=3.6.0",
    "types-PyYAML>=6.0.0",
    "types-beautifulsoup4>=4.12.0",
]

test = [
    "pytest>=8.0.0",
    "pytest-cov>=4.0.0",
    "pytest-asyncio>=0.23.0",
    "pytest-mock>=3.12.0",
]

docs = [
    "mkdocs>=1.5.0",
    "mkdocs-material>=9.0.0",
    "mkdocstrings[python]>=0.24.0",
]

[project.scripts]
glyphs-info-mcp = "glyphs_info_mcp.server:main"

[project.urls]
Homepage = "https://github.com/yintzuyuan/glyphs-info-mcp"
Repository = "https://github.com/yintzuyuan/glyphs-info-mcp"
Issues = "https://github.com/yintzuyuan/glyphs-info-mcp/issues"

[tool.hatch.build.targets.wheel]
packages = ["src/glyphs_info_mcp"]

[tool.black]
line-length = 88
target-version = ['py310']
extend-exclude = '''
/(
  # Exclude official Glyphs SDK files
  .*/GlyphsSDK/.*
)/
'''

[tool.ruff]
target-version = "py310"
line-length = 88
select = ["E", "W", "F", "I", "B", "C4", "UP"]
ignore = ["E501", "B008", "C901"]
extend-exclude = [
    "**/GlyphsSDK/**",  # Exclude official Glyphs SDK files
]

[tool.mypy]
python_version = "3.10"
check_untyped_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
show_error_codes = true
exclude = [
    "GlyphsSDK/",  # Exclude official Glyphs SDK files
    "data/official/",  # Exclude all official data files
]

[tool.pytest.ini_options]
minversion = "8.0"
addopts = ["--strict-markers", "--cov=src"]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
    "requires_glyphs_app: Tests that require Glyphs 3 app installed",
    "requires_repositories: Tests that require Glyphs Repositories directory",
    "requires_network: Tests that require network access",
]
