cadrumo.application.aggregation.modelo_bindings_retenciones module¶
Per-perceptor retenciones source resolver for modelo calculation bindings.
- class RetencionesAggregationSourceResolver(*, ports)[source]¶
Bases:
objectSource mesh resolver for the dedicated per-perceptor retención store.
Reads the bucket-scoped per-perceptor retención observations (
RetencionObservationRepository) for the modelo’s period and materialises the declared retenciones aggregation bindings through the matching validated aggregator. Modelo 115 consumes the quarterly URBAN_RENTAL count/base; annual summary modelos consume the same family store for their distinct-NIF count. Modelo 190’s percepciones count is handled byWithholdingSourceResolver.- Parameters:
ports (RetencionObservationPorts)
-
owned_sources:
ClassVar[tuple[BindingSourceKind,...]]¶
- static aggregate(modelo, observations, *, period)[source]¶
Aggregate per-perceptor retención observations for
modelo.The ONE canonical retenciones aggregation entry point. Both this resolver’s live calculate path (
resolve()) and the per-modelo aggregation service (aggregate_per_modelo(), the CLIaggregate/ pull surface) route through this single method over the shared_RETENCIONES_AGGREGATORSdispatch, so the calculate and pull surfaces produce byte-identical aggregation and cannot drift (aeat-calculation-aggregation). RaisesKeyErrorfor a non-retenciones modelo, matching the prior service dispatch.- Return type:
- Parameters:
modelo (str)
observations (tuple[RetencionObservation, ...])
period (Period)
- static supports_modelo(modelo)[source]¶
Return whether this canonical retenciones dispatcher owns
modelo.
- resolve(context)[source]¶
Resolve the retenciones binding values for the declared modelo context.
- Return type:
- Parameters:
context (CalculationSourceContext)