[build-system]
requires = ["maturin>=1.4,<2.0"]
build-backend = "maturin"

[project]
name = "axterminator"
version = "0.2.1"
description = "World's most superior macOS GUI testing framework with background testing"
readme = "README.md"
license = { text = "MIT OR Apache-2.0" }
authors = [{ name = "Mikko", email = "mikko@broa.biz" }]
requires-python = ">=3.9"
keywords = ["macos", "gui", "testing", "accessibility", "automation", "background"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Environment :: MacOS X",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: MacOS :: MacOS X",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Rust",
    "Topic :: Software Development :: Testing",
    "Topic :: Software Development :: Quality Assurance",
]

[project.optional-dependencies]
dev = [
    "pytest>=7.0",
    "pytest-asyncio>=0.21",
    "pytest-cov>=4.0",
    "mypy>=1.0",
    "ruff>=0.1.0",
]
vlm = [
    "mlx-vlm>=0.1.0",
]
vlm-anthropic = [
    "anthropic>=0.25.0",
]
vlm-openai = [
    "openai>=1.0.0",
]
vlm-gemini = [
    "google-generativeai>=0.3.0",
]
vlm-all = [
    "mlx-vlm>=0.1.0",
    "anthropic>=0.25.0",
    "openai>=1.0.0",
    "google-generativeai>=0.3.0",
]

[project.urls]
Homepage = "https://github.com/MikkoParkkola/axterminator"
Documentation = "https://github.com/MikkoParkkola/axterminator#readme"
Repository = "https://github.com/MikkoParkkola/axterminator"
Issues = "https://github.com/MikkoParkkola/axterminator/issues"

[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
module-name = "axterminator"

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["python/tests"]
markers = [
    "background: tests that verify background operation (no focus steal)",
    "requires_app: tests that need a real running application",
    "slow: performance tests that may take longer",
    "integration: tests requiring real macOS accessibility API",
]
addopts = "-v --tb=short"
filterwarnings = [
    "ignore::DeprecationWarning",
]

[tool.coverage.run]
source = ["axterminator"]
branch = true

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING:",
    "raise NotImplementedError",
    "@overload",
]
show_missing = true

[tool.mypy]
python_version = "3.9"
strict = true
ignore_missing_imports = true

[tool.ruff]
line-length = 100
target-version = "py39"

[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)
]
