aeat.domain.calculations.registry._workbook_parity_models module¶
Workbook parity data contracts exposed through the parity facade.
- class WorkbookParityModel(**data)[source]¶
Bases:
BaseModelStrict frozen base for workbook parity records.
- class WorkbookCellRef(**data)[source]¶
Bases:
WorkbookParityModelA cell participating in official workbook parity evidence.
- sheet: str¶
- coordinate: str¶
- formula: str | None¶
- class WorkbookArtefactReport(**data)[source]¶
Bases:
WorkbookParityModelDiscovery report for one AEAT workbook artefact.
- Parameters:
path (str)
modelo (str | None)
extension (Literal['.xlsx', '.xls'])
bytes (int)
sha256 (str)
formula_cells (int)
input_candidates (tuple[WorkbookCellRef, ...])
output_candidates (tuple[WorkbookCellRef, ...])
workbook_kind (WorkbookKind)
evidence_tier (Literal['legal_authority', 'official_source_guidance', 'executable_parity_evidence', 'layout_authority'] | None)
not_evidence_for (tuple[Literal['legal_authority', 'official_source_guidance', 'executable_parity_evidence', 'layout_authority'], ...])
scan_status (WorkbookScanStatus)
error (str | None)
elapsed_seconds (Decimal)
- path: str¶
- modelo: str | None¶
- extension: _WorkbookExtension¶
- bytes: int¶
- sha256: str¶
- sheets: tuple[str, ...]¶
- formula_cells: int¶
- input_candidates: tuple[WorkbookCellRef, ...]¶
- output_candidates: tuple[WorkbookCellRef, ...]¶
- workbook_kind: WorkbookKind¶
- evidence_tier: EvidenceTier | None¶
- not_evidence_for: tuple[EvidenceTier, ...]¶
- scan_status: WorkbookScanStatus¶
- error: str | None¶
- elapsed_seconds: Decimal¶
- class WorkbookConversionReport(**data)[source]¶
Bases:
WorkbookParityModelSafe isolated conversion report for one binary XLS artefact.
- Parameters:
path (str)
modelo (str | None)
bytes (int)
sha256 (str)
converted_extension (Literal['.xlsx'] | None)
formula_cells (int)
input_candidates (tuple[WorkbookCellRef, ...])
output_candidates (tuple[WorkbookCellRef, ...])
workbook_kind (WorkbookKind)
evidence_tier (Literal['legal_authority', 'official_source_guidance', 'executable_parity_evidence', 'layout_authority'] | None)
not_evidence_for (tuple[Literal['legal_authority', 'official_source_guidance', 'executable_parity_evidence', 'layout_authority'], ...])
conversion_status (Literal['converted', 'failed'])
error (str | None)
elapsed_seconds (Decimal)
- path: str¶
- modelo: str | None¶
- bytes: int¶
- sha256: str¶
- converted_extension: _ConvertedExtension | None¶
- sheets: tuple[str, ...]¶
- formula_cells: int¶
- input_candidates: tuple[WorkbookCellRef, ...]¶
- output_candidates: tuple[WorkbookCellRef, ...]¶
- workbook_kind: WorkbookKind¶
- evidence_tier: EvidenceTier | None¶
- not_evidence_for: tuple[EvidenceTier, ...]¶
- conversion_status: WorkbookConversionStatus¶
- error: str | None¶
- elapsed_seconds: Decimal¶
- class SyntheticInputValue(**data)[source]¶
Bases:
WorkbookParityModelOne synthetic value shared by registry and workbook parity execution.
- Parameters:
- id: str¶
- value: Decimal | int | str | bool¶
- workbook_cell: WorkbookCellRef | None¶
- registry_binding: BindingId | CasillaId | None¶
- class SyntheticInputSet(**data)[source]¶
Bases:
WorkbookParityModelSynthetic parity fixture applied to both registry and workbook execution.
- Parameters:
id (str)
modelo (str)
revision (str)
values (tuple[SyntheticInputValue, ...])
- id: str¶
- modelo: str¶
- revision: str¶
- values: tuple[SyntheticInputValue, ...]¶
- class WorkbookRunnerAvailability(**data)[source]¶
Bases:
WorkbookParityModelAvailability of a local workbook recalculation runner.
- Parameters:
- status: WorkbookRunnerStatus¶
- engine: WorkbookRunnerEngine | None¶
- executable: str | None¶
- detail: str¶
- class WorkbookParityComparison(**data)[source]¶
Bases:
WorkbookParityModelOne registry-vs-workbook output comparison.
- Parameters:
- output_id: WorkbookOutputId¶
- workbook_cell: WorkbookCellRef¶
- expected_workbook_value: Decimal | int | str | bool | None¶
- actual_registry_value: Decimal | int | str | bool | None¶
- status: ParityStatus¶
- tolerance: Decimal¶
- legal_refs: tuple[LegalRefId, ...]¶
- source_refs: tuple[SourceRefId, ...]¶
- detail: str | None¶
- class WorkbookParityRunReport(**data)[source]¶
Bases:
WorkbookParityModelTrace report for one parity execution attempt.
- Parameters:
synthetic_input_id (str)
registry_snapshot_id (str | None)
workbook (WorkbookArtefactReport)
runner (WorkbookRunnerAvailability)
comparisons (tuple[WorkbookParityComparison, ...])
status (Literal['match', 'mismatch', 'not_run'])
- synthetic_input_id: str¶
- registry_snapshot_id: str | None¶
- workbook: WorkbookArtefactReport¶
- runner: WorkbookRunnerAvailability¶
- comparisons: tuple[WorkbookParityComparison, ...]¶
- status: ParityStatus¶
- class WorkbookModeloCoverage(**data)[source]¶
Bases:
WorkbookParityModelPer-modelo workbook coverage summary for model-law ledgers.
- Parameters:
- modelo: str¶
- workbook_count: int¶
- formula_workbook_count: int¶
- unsupported_xls_count: int¶
- failed_count: int¶
- class WorkbookBackendVerificationReport(**data)[source]¶
Bases:
WorkbookParityModelBackend-level verification report for workbook calculation coverage.
- Parameters:
root (str)
workbook_count (int)
scanned_count (int)
formula_workbook_count (int)
unsupported_xls_count (int)
failed_count (int)
runner (WorkbookRunnerAvailability)
reports (tuple[WorkbookArtefactReport, ...])
modelo_coverage (tuple[WorkbookModeloCoverage, ...])
- root: str¶
- workbook_count: int¶
- scanned_count: int¶
- formula_workbook_count: int¶
- unsupported_xls_count: int¶
- failed_count: int¶
- runner: WorkbookRunnerAvailability¶
- reports: tuple[WorkbookArtefactReport, ...]¶
- modelo_coverage: tuple[WorkbookModeloCoverage, ...]¶