cadrumo.domain.calculations.registry.activity_kind_catalogue module

Typed projection of the registry-owned IRPF activity-kind vocabulary.

class IrpfActivityKindDefinition(token, selector_fact_ids)[source]

Bases: object

One registry-declared activity-kind token and its selector owners.

Parameters:
token: IrpfActivityKind
selector_fact_ids: tuple[str, ...]
class IrpfActivityKindCatalogue(definitions)[source]

Bases: object

Typed projection of the activity-kind values carried by fact 0082.

Parameters:

definitions (tuple[IrpfActivityKindDefinition, ...])

definitions: tuple[IrpfActivityKindDefinition, ...]
property all_activity_kinds: frozenset[IrpfActivityKind]

Return every activity-kind token declared by the catalogue.

require(value)[source]

Return a token only when the selected registry fact declares it.

Return type:

IrpfActivityKind

Parameters:

value (object)

semantic_token(value)[source]

Resolve a semantic token through the same authored vocabulary.

Return type:

IrpfActivityKind

Parameters:

value (str)

resolve_irpf_activity_kind_catalogue(*, effective_date=None, authority=None)[source]

Resolve activity-kind membership from the M036 selector catalogue.

Return type:

IrpfActivityKindCatalogue

Parameters:
require_irpf_activity_kind(value, *, effective_date=None, authority=None)[source]

Return an activity-kind token only when fact 0082 declares it.

Return type:

IrpfActivityKind

Parameters:
irpf_activity_kind_profesional_token(*, effective_date=None, authority=None)[source]

Return the registry-declared professional activity-kind token.

Return type:

IrpfActivityKind

Parameters:
irpf_activity_kind_sectorial_token(*, effective_date=None, authority=None)[source]

Return the registry-declared sectorial activity-kind token.

Return type:

IrpfActivityKind

Parameters:
is_irpf_activity_kind_profesional(value, *, effective_date=None, authority=None)[source]

Return whether a value is the registry-declared professional token.

Return type:

bool

Parameters:
is_irpf_activity_kind_sectorial(value, *, effective_date=None, authority=None)[source]

Return whether a value is the registry-declared sectorial token.

Return type:

bool

Parameters: