aeat.domain.calculations.registry._validate_algorithms module¶
Algorithm provider and binding validation helpers.
Validates algorithm provider and binding sections declared on a
ModeloRevision for legal and source
reference closure.
Provider declarations define deterministic callable contracts; binding
declarations connect those contracts to
CasillaId inputs and outputs. Both
must carry LegalReference and
SourceReference grounding enforced by
the EvidenceValidator.
See also
aeat.domain.calculations.registry._validate_revision_sections.validate_revision_definition()Per-revision dispatcher that calls these algorithm validators.
aeat.domain.calculations.registry._validate_reference_sections.check_algorithm_binding_refs()General id-reference checker for algorithm-binding references.
- validate_algorithm_provider_section(failures, *, prefix, revision, legal_refs, source_refs, evidence)[source]¶
Append provider reference and source-tier failures.
The
ModeloRevisioncontributesAlgorithmProviderDefinitionrows. Each provider must cite known legal/source refs and carryofficial_source_guidanceevidence.- Return type:
- Parameters:
prefix (str)
revision (ModeloRevision)
legal_refs (Mapping[str, LegalReference])
source_refs (Mapping[str, SourceReference])
evidence (EvidenceValidator)
- validate_algorithm_binding_section(failures, *, prefix, revision, provider_by_id, casillas, resolvable_values, parameters, legal_refs, source_refs, evidence)[source]¶
Append binding reference, schema-shape, and source-tier failures.
The supplied
ModeloRevisionprovides the algorithm bindings. The validator checks eachAlgorithmBindingDefinitionagainst itsAlgorithmProviderDefinition, declaredCasillaIdvalues, resolvable input values, constants, and evidence-grounding requirements.- Return type:
- Parameters:
prefix (str)
revision (ModeloRevision)
provider_by_id (Mapping[str, AlgorithmProviderDefinition])
casillas (set[CasillaId])
legal_refs (Mapping[str, LegalReference])
source_refs (Mapping[str, SourceReference])
evidence (EvidenceValidator)