Source code for cadrumo.application.modelo.history_ports
"""Application-owned capabilities required by Modelo history projections.History reads several profile catalogues that share one bucket-scoped securestore. The application service owns the projection and its DTOs, while thisbundle owns only the repository capabilities it needs. An outer compositionroot supplies the concrete implementations for one bucket; history neverconstructs a persistence adapter or exposes storage DTOs and errors."""from__future__importannotationsfromdataclassesimportdataclassfromtypingimportProtocolfrom...domain.buckets.protocolsimportBucketEventHistoryRepositoryProtocolfrom...domain.modelos.protocolsimport(CalculationRevisionCatalogueRepositoryProtocol,ModeloRecordCatalogueRepositoryProtocol,VerificationReportCatalogueRepositoryProtocol,)from...domain.modelos.work_unit_repositoryimportWorkUnitCatalogueRepositoryProtocol
[docs]@dataclass(frozen=True,slots=True)classModeloHistoryPorts:"""Required persisted authorities for one Modelo history invocation."""work_unit_repository:WorkUnitCatalogueRepositoryProtocolcalculation_repository:CalculationRevisionCatalogueRepositoryProtocolfiling_repository:ModeloRecordCatalogueRepositoryProtocolverification_repository:VerificationReportCatalogueRepositoryProtocolbucket_event_repository:BucketEventHistoryRepositoryProtocol
[docs]classModeloHistoryPortsFactory(Protocol):"""Construct the history authorities for one profile bucket."""def__call__(self,*,bucket_id:str)->ModeloHistoryPorts:"""Return the complete history bundle for ``bucket_id``."""...