ae1ee4633f
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.
17 lines
772 B
Python
17 lines
772 B
Python
"""Lo que el ciclo necesita saber de las definiciones del kit para un proyecto."""
|
|
|
|
from pathlib import Path
|
|
|
|
from indicadores_kit.oro.cohortes.definicion import RAIZ
|
|
from indicadores_kit.registry.measures import measures_de
|
|
|
|
|
|
def tipos_de_periodo(proyecto: str) -> list[str]:
|
|
"""Los tipos de periodo que publican las definiciones del proyecto (semestre y, en CaCu y CaMa, mes)."""
|
|
return sorted({t for m in measures_de(proyecto).values() for t in m.extension.publicacion.tipos_periodo})
|
|
|
|
|
|
def definiciones_de_cohorte(proyecto: str) -> list[Path]:
|
|
"""Los TOML de cohortes que el ciclo arma (`<proyecto>/cohortes/*.toml`): hoy solo CaCu (vigilancia). Las de `cohortes/propuestas/` no (T-21h)."""
|
|
return sorted((RAIZ / proyecto / "cohortes").glob("*.toml"))
|