From 44e0fd82294cca30579d8f65feff4156ced022af Mon Sep 17 00:00:00 2001 From: Andrey Epifancev Date: Wed, 28 Oct 2026 12:36:42 +0400 Subject: [PATCH] =?UTF-8?q?scripts/regression:=20=D0=B2=20=D1=81=D0=BD?= =?UTF-8?q?=D0=B8=D0=BC=D0=BA=D0=B5=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=BE=D0=B2=20locator=20OCR=20=D0=B1=D0=B5=D0=B7?= =?UTF-8?q?=20id=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D1=8F=20(#179)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- scripts/regression/stand_scenario.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/regression/stand_scenario.py b/scripts/regression/stand_scenario.py index cd94f3e..ddda2ff 100644 --- a/scripts/regression/stand_scenario.py +++ b/scripts/regression/stand_scenario.py @@ -29,6 +29,8 @@ from pathlib import Path MONEY = ("opening_debit", "opening_credit", "turnover_debit", "turnover_credit", "closing_debit", "closing_credit") PENDING_FILE = {"UPLOADED", "PROCESSING"} +# locator документов из OCR содержит id задания (file:.json;table:0) — в снимке заменяется +UUID_RE = re.compile(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") TO_CONFIRM = {"RECOGNIZED", "NEEDS_CHECK"} @@ -218,7 +220,7 @@ def run_scenario(api: Api, sc: dict, ctx: dict, fixtures: Path, rep: Report, out sorted( [ {k: d.get(k) for k in ("document_type", "osv_account_code", "period_year", "period_quarter", "is_cumulative", "period_check", "counterparty_check", "locator", "issue_counts")} - | {"file": n, "status_after_recognition": d["status"]} + | {"file": n, "status_after_recognition": d["status"], "locator": UUID_RE.sub("", str(d["locator"]))} for n, d in docs ], key=lambda x: (x["file"], str(x["locator"])),