aeat.adapters.inbound.borrador._extractors.modelo_100_summary_v2025 module¶
Modelo 100 (IRPF / Renta) observed-value extractor implementation.
The extractor reads printed casilla/value rows from a Renta artefact using the
year-stable NNNN label amount grammar used by the supported 2021-2025
extractor registrations and exercised by the checked 2021-2023 fixture PDFs
plus the generated 2025 parser tests. The class name records the original 2025
implementation point, but adapters.inbound.borrador._extractors
deliberately maps every supported year to this implementation while the observed
row grammar remains stable.
This is a read-only inbound adapter. It does not define Modelo 100
completeness, resolve a
RegistrySnapshot, or make
filing-grade authority decisions. When callers pass a
BorradorExtractionProfile, the
extractor filters to that profile and fails hard if observed coverage is
insufficient.
Rows are extracted from the concatenated text stream, so
ExtractedCasilla records preserve the
printed value and confidence but do not capture per-row bounding boxes.
- class Modelo100ObservedV2025Extractor[source]¶
Bases:
objectConcrete Modelo 100 observed-value extractor implementation.
Reads the printed text via the backend facade’s
extract_pages_textprimitive, locates printed casilla rows, and returns a strictInboundBorradorObservation.- Variables:
año – The original implementation year. The extractor registry may map additional years to this class while the observed row grammar stays compatible.
- extract(pdf_path, artefact_kind, extraction_profile=None)[source]¶
Parse
pdf_pathinto aInboundBorradorObservation.- Parameters:
pdf_path (
Path) – Path to the Modelo 100 PDF.artefact_kind (
ArtefactKind) – The artefact kind discovered bydetect_artefact_kind()(or supplied by the caller as an override).extraction_profile (
BorradorExtractionProfile|None) – Optional caller-supplied registry-profile projection that declares target casillas and minimum coverage for this parse.
- Return type:
- Returns:
The strict
InboundBorradorObservationwith observed casillas extracted.- Raises:
BorradorParseError – When required header fields are missing, when a
DECLARACIONartefact lacks a CSV stamp, or when a supplied registry-profile projection does not meet its minimum coverage.