[project]
name = "tiemeasureflow"
version = "2.0.0"
description = "TieMeasureFlow by Tielogic — manual caliper measurement task management for industrial QA stations."
requires-python = ">=3.11"
authors = [
    { name = "Adriano Dal Pastro", email = "adrianodalpastro@tielogic.com" },
]

# Shared core deps used by both backend and the Flask frontend.
dependencies = [
    "pydantic>=2.0.0",
    "pydantic-settings>=2.0.0",
    "python-dotenv>=1.0.0",
]

[project.optional-dependencies]

# Backend (FastAPI + DB + reports).
server = [
    "fastapi>=0.110.0",
    "uvicorn[standard]>=0.30.0",
    "sqlalchemy[asyncio]>=2.0.0",
    "asyncmy>=0.2.0",
    "alembic>=1.13.0",
    "bcrypt>=4.0.0",
    "pillow>=10.0.0",
    "python-multipart>=0.0.6",
    "jinja2>=3.1.0",
    "plotly>=5.0.0",
    "kaleido>=0.2.0",
    "weasyprint>=62.0",
    "pdfplumber>=0.10.0",
    "httpx>=0.27.0",
]

# Frontend (Flask tablet UI).
client = [
    "flask>=3.0.0",
    "flask-babel>=4.0.0",
    "flask-wtf>=1.2.0",
    "requests>=2.31.0",
    "urllib3>=2.0.0",
    "gunicorn>=21.0.0",
]

# Dev / test (covers both server and client tests).
dev = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.23.0",
    "httpx>=0.27.0",
    "aiosqlite>=0.20.0",
    "coverage>=7.0.0",
]

[project.scripts]
# Backend
server = "uvicorn:run"  # placeholder, real CMD lives in Dockerfile

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

[tool.hatch.build.targets.wheel]
# Source layout will be src/backend/ and src/frontend/flask_app/ after the
# folder restructure (Phase 2 of the V2.0.0 plan).
packages = ["src/backend", "src/frontend"]

[tool.uv]
# Pin the resolver to the deps we declared; reproducible builds.
package = false

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["src/backend/tests", "src/frontend/flask_app/tests"]
