cursus.mods.exe_doc.utils

Utility functions for execution document generation.

This module provides common utility functions used across the execution document generation system.

determine_step_type(step_name, config)[source]

Determine the step type for execution document based on step name and config.

Uses the existing registry system to determine step types accurately.

Parameters:
  • step_name (str) – Name of the step

  • config (Any) – Configuration object for the step

Returns:

List of step types for the execution document

Return type:

List[str]

validate_execution_document_structure(execution_document)[source]

Validate that the execution document has the expected structure.

Parameters:

execution_document (Dict[str, Any]) – Execution document to validate

Returns:

True if structure is valid, False otherwise

Return type:

bool

create_execution_document_template(step_names)[source]

Create a basic execution document template with the given step names.

Parameters:

step_names (List[str]) – List of step names to include in the template

Returns:

Basic execution document template

Return type:

Dict[str, Any]

merge_execution_documents(base_doc, additional_doc)[source]

Merge two execution documents, with additional_doc taking precedence.

Parameters:
  • base_doc (Dict[str, Any]) – Base execution document

  • additional_doc (Dict[str, Any]) – Additional execution document to merge

Returns:

Merged execution document

Return type:

Dict[str, Any]