Skip to content

module myna.core.workflow.load_input


function validate_required_input_keys

validate_required_input_keys(settings)

Validates the settings dictionary to ensure it has the necessary keys for a Myna input dictionary

Args:

  • settings: (dict) input settings

Returns: (dict) validated input settings


function normalize_input_layer_lists

normalize_input_layer_lists(settings: dict[str, typing.Any])  dict[str, Any]

Expand layer range shorthand in Myna build settings.


function get_validated_input_filetype

get_validated_input_filetype(filename)

Returns the validate input filetype ("yaml" or "json") and throws an error if the input type is not valid.

Args:

  • filename: (str) the name or path of the input file

function is_yaml_type

is_yaml_type(filetype)

Boolean of if file_type if Myna-accepted YAML format


function is_json_type

is_json_type(filetype)

Boolean of if file_type if Myna-accepted JSON format


function resolve_input_paths

resolve_input_paths(
    settings: dict[str, typing.Any],
    filename: str
)  dict[str, Any]

Resolve runtime and build paths relative to the loaded input file.


function relativize_runtime_paths

relativize_runtime_paths(
    settings: dict[str, typing.Any],
    filename: str
)  dict[str, Any]

Relativize runtime-local paths against the written file location.


function load_input

load_input(filename)

Load input file into dictionary

Args:

  • filename: path to input file (str) to load

Returns:

  • settings: dictionary of input file settings

function write_input

write_input(settings, filename, relative_paths=False)

Write Myna input dictionary to file

Args:

  • settings: (dict) Myna input dictionary
  • filename: (str) path to file to write
  • relative_paths: (bool) write runtime-local paths relative to the file location

This file was automatically generated via lazydocs.