windkit.io.windio.resolve_includes#

windkit.io.windio.resolve_includes(path)[source]#

Parse a windIO YAML file and resolve all !include directives.

Parameters:

path (str or pathlib.Path) – Path to windIO YAML file with potential !include directives.

Returns:

Fully resolved/merged dictionary with all includes expanded.

Return type:

dict

Raises:
  • FileNotFoundError – If the main file or any included file does not exist.

  • yaml.YAMLError – If YAML parsing fails.

Notes

Resolves includes relative to the directory containing the YAML file. Handles nested includes recursively.

Examples

>>> from windkit.io.windio import resolve_includes
>>> # If site.yaml contains: turbine: !include turbine.yaml
>>> data = resolve_includes("site.yaml")
>>> # data["turbine"] now contains the full turbine.yaml contents