Utils#

The Utils module contains functions used to provide names to nameless pipeline components inside of a group.

rename_component_incrementing(component, collisions)[source]#

Function for generating new name for a pipeline component, that has similar name with other components in the same group.

The name is generated according to these rules:

  1. Base name is PipelineComponent.computed_name;

  2. After that, _[NUMBER] is added to the resulting name, where _[NUMBER] is number of components with the same name in current service group.

Parameters:
Return type:

str

Returns:

Generated name

finalize_service_group(service_group, path='.')[source]#

Function that iterates through a service group (and all its subgroups), finalizing component’s names and paths in it. Components are renamed only if user didn’t set a name for them. Their paths are also generated here.

Parameters:
  • service_group (ServiceGroup) – Service group to resolve name collisions in.

  • path (str) – A prefix for component paths – path of component is equal to {path}.{component.name}. Defaults to “.”.

Return type:

None