This repository has been archived on 2026-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
Andrey Epifancev 29198ddc44 feat: шаг 6 и конвейер кандидата — тип по кодам, вариант формы, пояснения, предупреждения файла
normalize_candidate / normalize; __init__ экспортирует уже реализованный публичный API.
DISCLOSURE: шапка не проверяется, предупреждений шапки нет, статус done (P1-6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJKMLHdxMwSUeYcdkwqX4W
2026-10-18 14:01:56 +04:00

120 lines
3.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Общий код нормализации форм ББ/ОФР.
Публичный API — только имена `__all__` (раздел «Публичный API пакета» плана 1). Имена задач 18–19
(`recompute`, `Stored*`, `to_contract`, `warning_to_contract`, `status_input_from_contract`) добавляются ими.
"""
from arm_statements.amounts import parse_amount
from arm_statements.codes import parse_code, sheet_joins
from arm_statements.columns import amount_columns
from arm_statements.dates import parse_date, resolve_relative
from arm_statements.header import continuation_type, is_continuation, parse_header, type_hint
from arm_statements.issues import WarningCode, make_warning
from arm_statements.layout import code_column
from arm_statements.loader import Rules, default_rules, load_rules
from arm_statements.model import (
HEADER_FIELDS,
CandidateResult,
Cell,
CellValue,
DateField,
DocStatus,
DocumentType,
Edition,
EnvelopeStatus,
Evidence,
FailedRelation,
FormCandidate,
FormVariant,
HeaderCells,
HeaderField,
LineStatus,
NormalizationResult,
PeriodKind,
Severity,
SignForm,
Source,
StatementChecks,
StatementColumn,
StatementDocument,
StatementHeader,
StatementLine,
StatementValue,
StatementWarning,
)
from arm_statements.pipeline import normalize, normalize_candidate
from arm_statements.serialize import candidate_from_dict, to_jsonable
from arm_statements.status import (
StatusInput,
StatusLine,
StatusValue,
document_status,
envelope_status,
status_input,
)
from arm_statements.structure import choose_edition
from arm_statements.text import fix_lookalikes, normalize_caption, normalize_label
from arm_statements.version import statements_version
__all__ = [
"HEADER_FIELDS",
"CandidateResult",
"Cell",
"CellValue",
"DateField",
"DocStatus",
"DocumentType",
"Edition",
"EnvelopeStatus",
"Evidence",
"FailedRelation",
"FormCandidate",
"FormVariant",
"HeaderCells",
"HeaderField",
"LineStatus",
"NormalizationResult",
"PeriodKind",
"Rules",
"Severity",
"SignForm",
"Source",
"StatementChecks",
"StatementColumn",
"StatementDocument",
"StatementHeader",
"StatementLine",
"StatementValue",
"StatementWarning",
"StatusInput",
"StatusLine",
"StatusValue",
"WarningCode",
"amount_columns",
"candidate_from_dict",
"choose_edition",
"code_column",
"continuation_type",
"default_rules",
"document_status",
"envelope_status",
"fix_lookalikes",
"is_continuation",
"load_rules",
"make_warning",
"normalize",
"normalize_candidate",
"normalize_caption",
"normalize_label",
"parse_amount",
"parse_code",
"parse_date",
"parse_header",
"resolve_relative",
"sheet_joins",
"statements_version",
"status_input",
"to_jsonable",
"type_hint",
]