refactor: app/api/operator.py split by area into a package

A pure move: the 48 Kanban routes, their code and comments are unchanged,
grouped in session, board, quotes, orders, rework, integrations, stats
and files, with shared helpers in common. The fast CI check now compiles
the package's files too (app/**/*.py does not reach a third level without
globstar).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-09 17:11:19 -03:00
parent a6e4d4cb08
commit f5df5b96e4
12 changed files with 2051 additions and 1921 deletions

View File

@@ -0,0 +1,17 @@
"""Kanban: sign-in, the board, commercial review and card movement, by area.
Each module owns its routes; this package keeps the single `router` app/app.py
includes and the names other modules imported from the old single file.
"""
from fastapi import APIRouter
from . import board, common, files, integrations, orders, quotes, rework, session, stats
from .integrations import tiny_callback
from .stats import speed_figures
router = APIRouter()
# The order the routes first appeared in the old file. Static paths that could
# meet a parameterised one stay ahead of it: /orders/finished before any
# /orders/{uid} GET.
for module in (common, session, integrations, board, quotes, rework, orders, stats, files):
router.include_router(module.router)