@@ -95,12 +95,27 @@ def __post_init__(self, parameters: Mapping[str, Any]) -> None:
9595
9696 @property
9797 def _stream_config (self ) -> List [Dict [str , Any ]]:
98- def resolve_path (pointer : List [Union [InterpolatedString , str ]]) -> List [str ]:
98+ """
99+ Builds a list of stream configuration dictionaries.
100+
101+ Each resulting config represents a unique combination of configurations
102+ defined by the `configs_pointer` and any provided `default_values`.
103+ """
104+
105+ def resolve_path (pointer : List [Union ["InterpolatedString" , str ]]) -> List [str ]:
106+ """
107+ Resolves a list of JSON pointer elements by evaluating interpolated strings
108+ or using the raw strings directly.
109+ """
99110 return [
100111 node .eval (self .config ) if not isinstance (node , str ) else node for node in pointer
101112 ]
102113
103114 def prepare_streams () -> Iterable [List [Tuple [int , Any ]]]:
115+ """
116+ Prepares all stream configs to an iterable where each item
117+ is a list of (index, config) pairs for a particular stream.
118+ """
104119 for stream_config in self .stream_configs :
105120 path = resolve_path (stream_config .configs_pointer )
106121 stream_configs = dpath .get (dict (self .config ), path , default = [])
@@ -110,6 +125,9 @@ def prepare_streams() -> Iterable[List[Tuple[int, Any]]]:
110125 yield [(i , item ) for i , item in enumerate (stream_configs )]
111126
112127 def merge_combination (combo : Iterable [Tuple [int , Any ]]) -> Dict [str , Any ]:
128+ """
129+ Merges a combination of indexed config items into a single config dict.
130+ """
113131 result = {}
114132 for config_index , (elem_index , elem ) in enumerate (combo ):
115133 if isinstance (elem , dict ):
0 commit comments