[project]
name = "HospitalAssistantBackend"
version = "1.0.0"
description = "Backend for Hospital Assistant"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
    # Server
    "fastapi==0.116.1",
    "gunicorn==23.0.0",
    "orjson==3.11.3",
    "redis[hiredis]==6.4.0",
    "uvicorn-worker==0.3.0",
    "uvicorn[standard]==0.35.0",
    # Logging
    "python-logging-loki==0.3.1",
    # Requests
    "httpx==0.28.1",
    # Database
    "alembic==1.16.4",
    "psycopg==3.2.9",
    "psycopg-c==3.2.9; sys_platform != 'win32'",
    "asyncpg==0.30.0",
    "sqlmodel==0.0.24",
    # Types
    "pydantic==2.11.7",
    "pydantic-xml==2.18.0",
    "pydantic-settings==2.10.1",
    "pydantic-extra-types==2.10.5",
    "semver==3.0.4",
    "pyjwt==2.10.1",
    "python-multipart==0.0.20",
    # CLI
    "typer-slim==0.16.1",
]

[dependency-groups]
dev = [
    "celery-types==0.23.0",
    "poethepoet==0.34.0",
    "pre-commit==4.2.0",
    "psycopg[binary]==3.2.9",
    "pyright==1.1.401",
    "ruff==0.11.12",
    "types-pyjwt==1.7.1",
    "types-redis==4.6.0.20241004",
]

[tool.poe.tasks]
_git = "git add ."
_lint = "pre-commit run --all-files"

lint = ["_git", "_lint"]
check = "uv pip ls --outdated"
run = "uv run --env-file ../.env --directory ./src/ server.py"
manage = "uv run --env-file ../.env --directory ./src/ manage.py"
migrate = "uv run --env-file ../.env --directory ./src/ alembic revision --autogenerate"

[tool.uv]
required-version = ">=0.7.0"
dependency-metadata = [
    { name = "psycopg-c", version = "3.2.9", requires-python = ">=3.8", requires-dist = [
        "psycopg==3.2.9",
    ] },
]
[tool.typos.files]
extend-exclude = ["**/migrations/versions"]

[tool.pyright]
venvPath = "."
venv = ".venv"
exclude = ["**/migrations/versions"]
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
deprecateTypingAliases = true
typeCheckingMode = "strict"
pythonPlatform = "All"

[tool.ruff]
target-version = "py313"
line-length = 79
fix = true

[tool.ruff.lint]
preview = true
select = [
    "E",
    "W",
    "F",
    "UP",
    "A",
    "B",
    "C4",
    "SIM",
    "I",
    "S",
    "G",
    "FAST",
    "ASYNC",
    "BLE",
    "INT",
    "ISC",
    "ICN",
    "PYI",
    "INP",
    "RSE",
    "PIE",
    "SLOT",
    "TID",
    "LOG",
    "FBT",
    "DTZ",
    "EM",
    "PERF",
    "RUF",
]
ignore = ["RUF029", "S104", "RUF001"]

[tool.ruff.format]
quote-style = "single"
indent-style = "space"
docstring-code-format = true
