[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "getstream-connector"
dynamic = ["version"]
description = "Wrapper for official getStream python library."
dependencies = [
    "stream-python==5.3.1",
    "backoff~=2.1",
    "ddtrace>=4.0",
    "aiohttp<4.0"  # strict aiohttp for stream-python
]
requires-python = ">= 3.11"
readme = "README.md"

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
include = ["getstream_connector*"]
exclude = ["tests*"]

[tool.setuptools.dynamic]
version = {attr = "getstream_connector.__version__"}

[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py311"
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".git-rewrite",
    ".hg",
    ".ipynb_checkpoints",
    ".mypy_cache",
    ".nox",
    ".pants.d",
    ".pyenv",
    ".pytest_cache",
    ".pytype",
    ".ruff_cache",
    ".svn",
    ".tox",
    ".venv",
    ".vscode",
    "__pypackages__",
    "_build",
    "buck-out",
    "build",
    "dist",
    "node_modules",
    "site-packages",
    "venv",
]

[tool.ruff.lint]
select = [
    "E",  # pycodestyle
    "D",  # pycodestyle
    "F",  # Pyflakes
    "I",  # Isort
]
ignore = ["D203", "D213"]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.per-file-ignores]
"!getstream_connector/**.py" = ["D"]

[tool.ruff.lint.isort]
lines-after-imports = 2

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.mypy]
files = ["getstream_connector", "tests"]
ignore_missing_imports = true

[tool.coverage.paths]
source = ["getstream_connector/"]

[tool.coverage.report]
exclude_also = [
    "if TYPE_CHECKING:",
    "@abstractmethod"
]
