aeat.domain.calculations.registry._validate_relation_periods module

Relation selector helpers for resolving revision and period coverage.

The helpers select source ModeloRevision entries from a ModeloDefinition and verify that their period selectors cover the target relation window.

select_relation_source_revisions(modelo, selector)[source]
Return type:

tuple[tuple[ModeloRevision, ...], list[str]]

Parameters:
relation_filing_year_delta(selector)[source]
Return type:

int

Parameters:

selector (RelationRevisionSelector)

relation_fixed_source_year(selector)[source]
Return type:

int | None

Parameters:

selector (RelationRevisionSelector)

validate_source_year_coverage(scope, *, target_selector, source_revisions, source_periods, filing_year_delta, fixed_source_year=None, source_is_observation_history=False)[source]

Verify source-year coverage, with observation history requiring only shape coverage.

Candidate ModeloRevision entries are filtered by source-period shape before their year intervals are compared with the target selector.

Return type:

list[str]

Parameters:
period_selectors_overlap(left, right)[source]
Return type:

bool

Parameters: