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

[project]
name = "geo-seo-optimizer"
version = "0.1.0"
description = "结合 SEO 与 GEO 技术的内容优化工具"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.11"
authors = [
    {name = "GEO-SEO Team", email = "team@geo-seo.dev"}
]
keywords = ["seo", "geo", "content", "optimization", "ai"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Internet :: WWW/HTTP",
]

dependencies = [
    "pydantic>=2.0.0",
    "pydantic-settings>=2.0.0",
    "typer>=0.9.0",
    "rich>=13.0.0",
    "jinja2>=3.1.0",
    "aiosqlite>=0.19.0",
    "aiohttp>=3.8.0",
    "pyyaml>=6.0",
    "python-dotenv>=1.0.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0.0",
    "pytest-asyncio>=0.21.0",
    "pytest-cov>=4.0.0",
    "mypy>=1.5.0",
    "black>=23.0.0",
    "ruff>=0.1.0",
    "pre-commit>=3.0.0",
]

[project.scripts]
geo-seo = "cli:main"

[project.urls]
Homepage = "https://github.com/geo-seo/optimizer"
Documentation = "https://docs.geo-seo.dev"
Repository = "https://github.com/geo-seo/optimizer.git"
Issues = "https://github.com/geo-seo/optimizer/issues"

[tool.mypy]
python_version = "3.11"
strict = false
warn_return_any = false
warn_unused_configs = false
warn_unused_ignores = false
warn_redundant_casts = false
warn_no_return = true
warn_unreachable = false
ignore_missing_imports = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false

[tool.black]
target-version = ["py311", "py312", "py313"]
line-length = 100
include = "\\.pyi?$"
extend-exclude = '''
/(
    \\.git
  | \\.venv
  | \\.cache
  | build
  | dist
)/
'''

[tool.ruff]
target-version = "py311"
line-length = 100
select = [
    "E",   # pycodestyle errors
    "F",   # Pyflakes
    "W",   # pycodestyle warnings
    "I",   # isort
    "N",   # pep8-naming
    "D",   # pydocstyle
    "UP",  # pyupgrade
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "SIM", # flake8-simplify
]
ignore = [
    "D100", # Missing docstring in public module
    "D104", # Missing docstring in public package
    "D101", # Missing docstring in public class
    "D102", # Missing docstring in public method
    "D103", # Missing docstring in public function
    "D105", # Missing docstring in magic method
    "D107", # Missing docstring in __init__
]

[tool.ruff.pydocstyle]
convention = "google"

[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = [
    "-v",
    "--tb=short",
    "--strict-markers",
    "--cov=src",
    "--cov-report=term-missing",
    "--cov-report=html:coverage_html",
    "--cov-fail-under=80",
]
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
    "integration: marks tests as integration tests",
    "unit: marks tests as unit tests",
]

[tool.coverage.run]
source = ["src"]
omit = [
    "*/tests/*",
    "*/test_*",
    "*/__pycache__/*",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "def __str__",
    "raise AssertionError",
    "raise NotImplementedError",
    "if __name__ == .__main__.:",
    "if TYPE_CHECKING:",
]

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