absorb Orquestacion into webapi.orquestacion

Orquestacion was a separate uv package with exactly one consumer
(webapi.indicadores_vivos) and no independent deployment: the Dockerfile
already copied it straight into this image and ran one uv sync for
everything. Folding it in removes a redundant pyproject.toml/uv.lock/venv
without losing the standalone CLI (python -m webapi.orquestacion ciclo/
confirmar-riesgos) or its test suite, which now runs as part of this
project's own pytest run.

417 tests pass (416 unchanged + the merged orquestacion suite); verified
live in a built image, where the indicadores worker completed a full
cacu/cama/tea cycle against webapi.orquestacion.ejecutor.
This commit is contained in:
Roberto Treviño Cervantes
2026-10-31 00:51:41 -06:00
parent 2b2c290f58
commit ae1ee4633f
19 changed files with 1422 additions and 33 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
A successful import asks for a recomputation (`ColaDeRecalculo.solicitar`),
which only drops a marker file. A separate process (`python -m
webapi.indicadores_vivos`, the `indicadores` compose service) picks the
markers up and runs that domain's cycle (`orquestacion.correr`): catalogs ->
markers up and runs that domain's cycle (`webapi.orquestacion.correr`): catalogs ->
staging to facts -> views -> registry -> definitions -> reports.
Requests that arrive while a domain is running are folded into one more run.
@@ -98,7 +98,7 @@ class ColaDeRecalculo:
def correr(self, dominio: str, *, desde: int | None = None, hasta: int | None = None) -> dict[str, Any]:
"""Runs the domain's graph (without `migrar`: the API migrates on startup)."""
from orquestacion import Contexto, correr, pasos_de
from webapi.orquestacion import Contexto, correr, pasos_de
desde = desde or int(os.environ.get("INDICADORES_DESDE", date.today().year - 5))
hasta = hasta or int(os.environ.get("INDICADORES_HASTA", date.today().year))