Source code for viiapackage.pictures.result_pictures.helper_functions.read_result_yaml

### ===================================================================================================================
###  FUNCTION: Read result picture yaml-file
### ===================================================================================================================
# Copyright ©VIIA 2024

### ===================================================================================================================
###   1. Import modules
### ===================================================================================================================

# General imports
import yaml
from typing import Optional, Dict


### ===================================================================================================================
###   2. Function viia_load_result_picture_yaml
### ===================================================================================================================

[docs]def viia_load_result_picture_yaml(project: 'ViiaProject') -> Optional[Dict]: """ Helper function to get the data for the result pictures. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. Output: - Return the data read from the yaml file. """ # Result picture YAML file location result_picture_yaml = project.viia_settings.project_specific_package_location / \ 'pictures/result_pictures/helper_functions/viia_result_pictures.yaml' with open(result_picture_yaml) as f: return yaml.load(f, Loader=yaml.FullLoader)
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================