aeat.core.resources._repos.manuals module¶
ManualRepository: composite-keyed Manual catalogue.
The composite key is (manual_id, year, part) modelled as a
frozen ManualKey record. The ManualRepository
wraps the existing loader chain in aeat.domain.manuals;
the Settings env-override for AEAT_MANUALS_ROOT is preserved
verbatim by passing the operator-resolved root through the
constructor.
- class ManualKey(**data)[source]¶
Bases:
TypedResourceKeyComposite key (manual_id, year, part) for a
Manualrecord.- manual_id: str¶
- year: int¶
- part: str¶
- class ManualRepository(root=None)[source]¶
Bases:
ResourceCacheRepository[Manual,ManualKey]Composite-key repository for the bundled Manual catalogue.
Wraps
aeat.domain.manuals.load_manual()and stays in lockstep with the env-override seam onSettings.aeat_manuals_root. The repository returnsManualrecords keyed byManualKey.- Parameters:
root (Path | None)
- catalogue(specs)[source]¶
Return a
ManualCatalogueaggregate forspecs.- Return type:
- Parameters:
specs (Iterable[tuple[ManualId, int, ManualPart]])
- find_rules(catalogue, *, casilla_reference=None, kind=None, lang=None)[source]¶
Delegate to
aeat.domain.manuals.find_rules()for rule queries.Yields each matching
Rulefrom the catalogue in encounter order.- Return type:
- Parameters:
catalogue (ManualCatalogue)
casilla_reference (ManualCasillaReference | None)
kind (Literal['computation', 'applicability', 'valuation', 'deductibility', 'formal_obligation', 'procedural', 'other'] | None)
lang (str | None)