cadrumo.domain.calculations.registry.schema_deadlines module

Deadline-window and filing-schedule declarations for registry revisions.

class FilingCadence(*values)[source]

Bases: StrEnum

The filing cadence a deadline window or modelo schedule declares.

Distinct from the period kind in the core package, which shares three member values but names a different axis: that vocabulary describes a period’s shape, including instalment and extended periods, and has no ad-hoc member. Both are referenced from this module, so the names must not collide.

MONTHLY

One filing period per calendar month.

QUARTERLY

One filing period per calendar quarter.

ANNUAL

One filing period covering the ejercicio.

AD_HOC

No fixed cadence; the period is opened by an event rather than a calendar.

class DeadlineWindowDefinition(**data)[source]

Bases: RegistryModel

Declare the applicable opening, closing, and payment dates for a filing.

id: DeadlineWindowId
filing_year: FilingYear
period: Annotated[Period, BeforeValidator(pydantic_validation_boundary(_parse_deadline_window_period))]
period_kind: FilingCadenceField
opens_on: date
closes_on: date
payment_cutoff_on: date | None
applicability_condition_mode: ConditionModeField
applicability_conditions: tuple[ProfilePredicateDefinition, ...]
resultado_scope: Annotated[ResultDisposition, BeforeValidator(lambda value: ResultDisposition(value) if isinstance(value, str) else value)] | None
tipo_renta_scope: tuple[str, ...] | None
legal_refs: LegalRefs
source_refs: SourceRefs
filing_schedule_period_kind_mismatches(period_kind, periods)[source]

Return schedule tokens whose canonical cadence contradicts period_kind.

Return type:

tuple[str, ...]

Parameters:
class ModeloScheduleDefinition(**data)[source]

Bases: RegistryModel

Declare the filing periods and profile conditions for a modelo schedule.

id: str
period_kind: FilingCadenceField
periods: tuple[RegistrySelectorPeriodCode, ...]
profile_condition_mode: ConditionModeField
profile_conditions: tuple[ProfilePredicateDefinition, ...]
legal_refs: LegalRefs
source_refs: SourceRefs