cadrumo.domain.calculations.registry.relation_dependency module

How one modelo’s result depends on another’s, and how that dependency settles.

Three vocabularies describing the same relation, previously spelled out at six fields across four modules. One of those sites already carried a comment noting it was typed to match its siblings rather than widened to a bare string, which is the job a shared definition does and a copied union only approximates: a member added to one spelling leaves the others validating the old set.

class RelationKind(*values)[source]

Bases: StrEnum

What kind of upstream result a relation reaches for.

PREVIOUS_PERIOD

The same modelo’s own prior filing period.

ANNUAL_SUMMARY

The annual declaration that summarises the period filings.

CROSS_MODEL_OUTPUT

A different modelo’s computed output.

class RelationDependencyRole(*values)[source]

Bases: StrEnum

The structural role the upstream result plays for the dependent modelo.

PERIODIC_TO_ANNUAL_SUMMARY

Period filings roll up into an annual summary.

INSTALMENT_TO_FINAL_SETTLEMENT

Instalments paid across the year settle against a final liability.

DIRECT_CALCULATION

The upstream value enters the dependent calculation directly.

FACTUAL_EVIDENCE

The upstream result evidences a fact without entering the arithmetic.

class RelationDependencyTreatment(*values)[source]

Bases: StrEnum

How the dependency is settled once its role is known.

DIRECT_ANNUAL_SETTLEMENT

Settled against the annual declaration.

FACTUAL_EVIDENCE

Carried as evidence rather than settled.

NON_DEPENDENCY

Declared explicitly as not a dependency, rather than left absent.