The import's catalog matching and commit read the WebApi's catalog, silver batch and table maps; add_resultado moves here

How: `catalog_matching`, `catalog_commit_service` and the imports blueprint import `Catalogo`,
`catalogo_desde_toml`, `ruta_de_catalogo`, `CatalogoInvalido`, `LotePlata`, `valor_de_observacion` and
`tablas_de` from `webapi.orchestration`; the commit writes through `carga_repository.save_load` and
`catalog_repository.sync`. `add_resultado` and its tests come over unchanged from the indicator kit.

Implications: the import path no longer needs the indicator kit, which isn't a dependency.
This commit is contained in:
rockdrigo
2026-11-13 15:23:45 -06:00
parent f183e495fb
commit 113b792a7b
8 changed files with 127 additions and 16 deletions
+3 -3
View File
@@ -9,8 +9,8 @@ from datetime import date
import pytest
from sqlmodel import select
from indicadores_kit.registry import catalogos
from indicadores_kit.tablas import tablas_de
from webapi.orchestration.reference import catalogs as catalogos
from webapi.orchestration.tables import tablas_de
from extraction import ExtractedRecord
from extraction.nlp import DiscoveredField, Evidence
@@ -27,7 +27,7 @@ def _record(key: str, pairs: list[tuple[str, str]]) -> ExtractedRecord:
@pytest.fixture
def cacu_catalog(tmp_path, monkeypatch):
"""`add_resultado`/`sincronizar` write real rows and a real file:
"""`add_resultado`/`sync` write real rows and a real file:
kept off the checked-in `cacu.toml` and off any other domain's data."""
monkeypatch.setattr(catalogos, "RAIZ_CATALOGOS", tmp_path)
(tmp_path / "cacu.toml").write_text(