cadrumo.adapters.inbound.borrador package¶
Observed Modelo 100 (IRPF / Renta) PDF parsing boundary.
Modelo 100 has three artefact types a taxpayer encounters, all parsed through this package:
Borrador — AEAT’s pre-filing draft, downloaded from Portal Renta. Has pre-populated casillas but no CSV.
Predeclaración / simulación — non-binding simulation from Renta Web Open. Same shape; watermarked “VISTA PREVIA”.
Declaración — post-filing copy with a CSV stamp.
The parser extracts printed casilla/value rows as observed filing data. This
adapter does not resolve RegistrySnapshot
objects or decide filing-grade completeness by itself. Completeness is enforced
only when the caller supplies a
BorradorExtractionProfile
projection and selects registry-profile parsing, which filters to the profile’s
target casillas and raises below its declared minimum coverage. Returned
observations carry a privacy-preserving source reference derived from the PDF
digest, never the operator’s local source path.
Public API:
from cadrumo.adapters.inbound.borrador.parser import parse_borrador
from cadrumo.adapters.inbound.borrador.schema import (
ArtefactKind,
BorradorExtractionProfile,
BorradorParseMode,
InboundBorradorObservation,
)
from cadrumo.adapters.inbound.borrador.errors import (
ArtefactNotRecognisedError,
BorradorParseError,
)
See also
parse_borrador()Single defining entry point that composes artefact detection with the year-keyed extractor registry.
declaracionSibling filed-declaration parser that owns the declaration-PDF surface.
pdfShared PDF extraction helpers used by the Renta parser backend.
ExtractionProfileDefinitionRegistry-side profile shape callers project into the lightweight protocol consumed here.
Subpackages¶
Submodules¶
- cadrumo.adapters.inbound.borrador._detect module
- cadrumo.adapters.inbound.borrador.errors module
- cadrumo.adapters.inbound.borrador.parser module
- cadrumo.adapters.inbound.borrador.schema module
ArtefactKindBorradorParseModeBorradorExtractionTargetBorradorExtractionProfileInboundBorradorObservationInboundBorradorObservation.modeloInboundBorradorObservation.ejercicioInboundBorradorObservation.tax_idInboundBorradorObservation.artefact_kindInboundBorradorObservation.valuesInboundBorradorObservation.registry_extraction_profile_idInboundBorradorObservation.extraction_coverageInboundBorradorObservation.source_pdf_pathInboundBorradorObservation.source_pdf_sha256InboundBorradorObservation.parsed_atInboundBorradorObservation.csvInboundBorradorObservation.warnings