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

[project]
name = "logquill"
version = "1.0.0"
description = "A structured, leveled logging framework with pluggable transports and a plugin pipeline."
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
authors = [{ name = "Nikhil Arora" }]
keywords = [
    "logging",
    "structured-logging",
    "logger",
    "observability",
    "json-logging",
    "async-logging",
    "transports",
    "plugins",
]
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Topic :: System :: Logging",
    "Typing :: Typed",
]
dependencies = []

[project.optional-dependencies]
http = ["aiohttp>=3.9"]
postgres = ["psycopg2-binary>=2.9"]
mysql = ["pymysql>=1.1"]
mongodb = ["pymongo>=4.6"]
redis = ["redis>=5.0"]
kafka = ["kafka-python>=2.0"]
rabbitmq = ["pika>=1.3"]
pubsub = ["google-cloud-pubsub>=2.21"]
gcp-logging = ["google-cloud-logging>=3.10"]
aws = ["boto3>=1.34"]
presidio = ["presidio-analyzer>=2.2", "presidio-anonymizer>=2.2"]
crypto = ["cryptography>=41"]
langchain = ["langchain-core>=0.3"]
langgraph = ["langgraph>=1.0"]
crewai = ["crewai>=1.0"]
llamaindex = ["llama-index-core>=0.12"]
autogen = ["autogen-core>=0.6"]
yaml = ["PyYAML>=6.0"]
dev = [
    "ruff>=0.6",
    "mypy>=1.11",
    "pytest>=8.0",
    "pytest-asyncio>=0.24",
    "pytest-cov>=5.0",
    "hypothesis>=6.100",
    "build>=1.2",
    "twine>=5.1",
]
hooks = [
    # Separate from "dev": pre-commit dropped Python 3.8 support, but our
    # CI matrix still tests 3.8, and pre-commit is only needed locally.
    "pre-commit>=3.7",
]
docs = [
    # Renders the API reference published to GitHub Pages; not needed to
    # use or develop logquill itself.
    "pdoc>=16",
]

[project.scripts]
logquill = "logquill.cli:main"

[project.urls]
Homepage = "https://github.com/nikhilvdev/logquill-python"
Repository = "https://github.com/nikhilvdev/logquill-python"
Changelog = "https://github.com/nikhilvdev/logquill-python/blob/main/CHANGELOG.md"
Issues = "https://github.com/nikhilvdev/logquill-python/issues"

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

[tool.hatch.build.targets.sdist]
# Explicit allowlist rather than an exclude list: keeps the sdist limited
# to what the package actually needs regardless of what local, untracked
# tool/editor state happens to sit in the working tree at build time.
include = [
    "/logquill",
    "/tests",
    "/README.md",
    "/CHANGELOG.md",
    "/CODE_OF_CONDUCT.md",
    "/CONTRIBUTING.md",
    "/LICENSE",
    "/pyproject.toml",
]

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

[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "C4", "SIM"]

[tool.mypy]
strict = true
python_version = "3.10"
files = ["logquill"]

# `cryptography` (optional, lazily imported for `FileTransport(encrypt_key=...)`)
# is never a direct dev dependency, but `twine` -> `keyring` -> `SecretStorage`
# pulls it in transitively on Linux only (`SecretStorage` is a Linux-only
# keyring backend) — so CI (ubuntu-latest) sees it as genuinely importable and
# flags the `# type: ignore[import-not-found]` as unused, while it's genuinely
# absent (and the ignore genuinely needed) on macOS/Windows. The import's
# resolvability is platform-dependent through no fault of this module, so
# `warn_unused_ignores` is disabled here specifically rather than project-wide.
[[tool.mypy.overrides]]
module = "logquill.transports.file_transport"
warn_unused_ignores = false

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"

[tool.coverage.run]
source = ["logquill"]
