Output Inserter

Functions:

insert_value(top_key, middle_key, ...)

Insert a single output value into dcf_class.inp with validation.

output_inserter_function(output_dict, ...)

Insert all plugin outputs into dcf_class.inp using output specs.

pyH2A.Utilities.IO.output_inserter.insert_value(top_key: str, middle_key: str, bottom_key: str, value_dict: dict, row_dict: dict, plugin_class, dcf_class, plugin_name: str)[source]

Insert a single output value into dcf_class.inp with validation.

This resolves the output value, validates type/dimension, and calls the shared insert helper to write into the DCF input structure.

Parameters:
top_keystr

Table name in dcf_class.inp.

middle_keystr

Row name in dcf_class.inp[top_key].

bottom_keystr

Column key in dcf_class.inp[top_key][middle_key].

value_dictdict

Bottom-level output specification (includes inserted_value).

row_dictdict

Row-level specification (optional flags, path settings).

plugin_classobject

Plugin instance containing computed output attributes.

dcf_classobject

DCF-like object that provides inp and receives inserted values.

plugin_namestr

Name of the plugin used in error messages.

Returns:
None

Writes to dcf_class.inp or skips optional missing values.

pyH2A.Utilities.IO.output_inserter.output_inserter_function(output_dict, plugin_class, dcf_class, plugin_name)[source]

Insert all plugin outputs into dcf_class.inp using output specs.

The output dictionary defines where and how each value should be inserted. Special top-level keys and row-level metadata keys are ignored during iteration.

Parameters:
output_dictdict

Output specification mapping tables and rows to insertion specs.

plugin_classobject

Plugin instance containing computed output attributes.

dcf_classobject

DCF-like object that receives inserted values.

plugin_namestr

Name of the plugin used to prefix error messages.

Returns:
None

Mutates dcf_class.inp by inserting output values.