nicetoolbox.utils.dependency_sort

Functions

sort_detectors_order

Sort detectors algorithms in topological order.

nicetoolbox.utils.dependency_sort.sort_detectors_order(detectors_config: DetectorsConfig, selected_algorithms: List[str], strict: bool = True) List[str][source]

Sort detectors algorithms in topological order.

Parameters:
  • detectors_config – All detectors configurations containing input_detector_names.

  • selected_algorithms – Algorithm names to order.

  • strict – If True, raise on missing dependencies. If False, log a warning and skip them.

Raises:
  • KeyError – On missing dependencies (only when strict mode).

  • ValueError – On circular dependencies.