Skip to content

Impl

pipelines.enrichment.shared.impl

Summary

Concrete shared enrichment ports.


ImplAmountFlagsPort is the port of domain.enrichment.nodes.AmountBasedFlagNode — used by both the entity and tags families.

Classes

ImplAmountFlagsPort

Bases: AmountFlagsPort

Amount-flags stage: map the amount to amount_* candidate flags.

Notes

Shared by the entity and tags families; the amount-flag name encodes the comparison (e.g. amount_greater_than_500, amount_within_5_500).

Attributes
amount_based_flag_mapping property
amount_based_flag_mapping

Flag names to evaluate, taken from the registry.

Returns:

Name Type Description
List

The registered amount-flag names.

config property
config

Per-node config injected via set_config.

Returns:

Type Description

dict | None: The per-node config, or None before injection.

Functions
resolve
resolve(state: State) -> Iterable[State]

Evaluate the amount-based flags and append the matches.

Parameters:

Name Type Description Default
state State

Incoming state carrying raw.amount and candidate.flags.

required

Yields:

Name Type Description
State Iterable[State]

A fork with candidate.flags updated when flags were appended, else the unmodified state.

set_config
set_config(config)

Inject the per-node config.

Parameters:

Name Type Description Default
config dict

Per-node config from the dagpipe spec.

required
set_registry
set_registry(registry)

Inject the merged pattern registry.

Parameters:

Name Type Description Default
registry PatternRegistry

The merged pattern registry.

required