Skip to content

Loader

pipelines.enrichment.shared.loader

Summary

Assemble a hexa-wired enrichment port tree into a runnable dagpipe graph.


Flow (mirrors domain/enrichment/{entity,tags}/pipeline.py#load, but hexa replaces the class-path import/instantiation and the dagpipe spec is consumed for its schema/graph/per-node config):

  1. hexa.build(root_cls) instantiates and wires every stage port slot.
  2. The family resources/patterns/*.yaml files merge into a PatternRegistry.
  3. Each stage port (slot name == dagpipe node id) gets set_registry + set_config from the family resources/pipeline.yaml.
  4. The dagpipe schema: builds a State subclass, graph: builds the Graph, and the Engine is created.
  5. The Engine + State class are attached to the wired root for enrich().

Classes

Functions

load

load(root_cls: type, resources_dir: Path)

Build the wired root + dagpipe runtime; attach engine/state_cls to root.

Parameters:

Name Type Description Default
root_cls type

Composition root class to hexa-build.

required
resources_dir Path

Family resources directory containing pipeline.yaml and patterns/.

required

Returns:

Name Type Description
object

The wired root instance with _engine/_state_cls attached.

Raises:

Type Description
FileNotFoundError

When pipeline.yaml does not exist.