[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "GramPilot"
authors = [{ name = "Marc Mintel", email = "marc@mintel.me" }]
readme = "README.md"
classifiers = [
    "License :: Free for non-commercial use",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3"
]
license = { file = "LICENSE" }
requires-python = ">=3.10"
dynamic = ["version", "description"]
dependencies = [
    "colorama==0.4.4",
    "ConfigArgParse==1.7",
    "PyYAML==6.0.1",
    "uiautomator2>=3.0.0",
    "urllib3>=2.0.0",
    "emoji==2.12.1",
    "langdetect==1.0.9",
    "atomicwrites==1.4.1",
    "spintax==1.0.4",
    "requests>=2.31.0",
    "packaging>=23.0",
    "python-dotenv==1.0.1",
    "qdrant-client>=1.7.0",
]

[project.optional-dependencies]
analytics = ["matplotlib>=3.8.0"]
dev = [
    "flit",
    "pre-commit",
    "ruff",
    "pytest",
    "pytest-mock",
    "pytest-asyncio",
    "pytest-cov",
    "hypothesis",
    "diff-cover",
]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "--strict-markers"
markers = [
    "live: tests requiring a live ADB device",
    "chaos: chaos engineering / corruption tests",
    "property: hypothesis property-based tests",
    "live_llm: tests requiring a live local LLM via Ollama",
]

[tool.coverage.run]
source = ["GramAddict"]
omit = ["GramAddict/plugins/*", "*/test_*"]

[tool.coverage.report]
fail_under = 25
show_missing = true
exclude_lines = [
    "pragma: no cover",
    "if __name__ == .__main__.",
    "raise NotImplementedError",
]

[tool.ruff]
target-version = "py310"
line-length = 120

[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = ["E501"]

[project.urls]
Source = "https://github.com/marcmintel/grampilot"

[project.scripts]
grampilot = "GramAddict.__main__:main"
