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

[tool.hatch.build]
include = [
    "qrkey/ui/*",
    "*.py"
]
exclude = [
    "qrkey/ui/node_modules",
]

[tool.hatch.build.targets.sdist.hooks.custom]
path = "utils/hooks/sdist.py"

[tool.hatch.build.targets.wheel.hooks.custom]
path = "utils/hooks/wheel.py"

[project]
name = "qrkey"
dynamic = ["version"]
description = "Swarm robotics deployments made easy."
readme = "README.md"
requires-python = ">=3.11"
license = "BSD-3-Clause"
keywords = ["swarm", "robotics", "ux"]
authors = [
  { name = "Alexandre Abadie", email = "alexandre.abadie@inria.fr" },
]
classifiers = [
  "Development Status :: 4 - Beta",
  "Programming Language :: Python",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
    "cryptography   == 41.0.7",
    "fastapi        == 0.109.0",
    "fastapi-mqtt   == 2.1.0",
    "httpx          == 0.26.0",
    "joserfc        == 0.9.0",
    "pydantic-settings == 2.1.0",
    "segno          == 1.6.0",
    "semver         == 3.0.2",
    "structlog      == 24.1.0",
    "uvicorn        == 0.25.0",
    "websockets     == 12.0",
]

[project.urls]
Documentation = "https://github.com/DotBots/qrkey#readme"
Issues = "https://github.com/DotBots/qrkey/issues"
Source = "https://github.com/DotBots/qrkey"

[tool.hatch.version]
path = "qrkey/__about__.py"

[tool.hatch.envs.default]
dependencies = [
  "codecov",
  "pytest",
  "pytest-asyncio",
  "pytest-cov",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:qrkey}"

[[tool.hatch.envs.all.matrix]]
python = ["3.11", "3.12"]

[tool.hatch.envs.types]
dependencies = [
  "mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:qrkey}"

[tool.isort]
multi_line_output = 3  # Use Vertical Hanging Indent
profile = "black"

[tool.mypy]
disable_error_code = "attr-defined"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = """
-vv -s
--color=yes
--doctest-modules
--cov=qrkey --cov-report=term --cov-report=term-missing --cov-report=xml
"""

[tool.ruff]
select = ["E", "F"]
line-length = 88
ignore = ["E501"]

[tool.ruff.format]
preview = true
quote-style = "single"
