Source code for viiapackage.reporting.viia_create_evva_report_engineering_input

### ===================================================================================================================
###   VIIA create EVVA report input from engineering
### ===================================================================================================================
# Copyright ©VIIA 2024

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

# General imports
from __future__ import annotations
from typing import TYPE_CHECKING
from pathlib import Path

# References for functions and classes in the viiaPackage
if TYPE_CHECKING:
    from viiapackage.viiaStatus import ViiaProject


### ===================================================================================================================
###   2. Functions to create report with data for EVVA from engineering
### ===================================================================================================================

[docs]def viia_create_evva_report_engineering_input( project: ViiaProject, template_file: Path, output_file: Path, report_data: dict) -> Path: """ This function creates a document with inputs from engineering for the EVVA report. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. - template_file (Path): File reference for the template to be used. - output_file (Path): File reference for the generated output, this includes the folder, file name and suffix, as path. - report_data (dict): Optional input to pass the general info (if already collected). If not provided this general info will be collected first. Output: - The requested report is generated with the information of the object in py-memory, databases and local (image-) files. It is saved in the 'EVVA' folder of the working folder. - Returns the path of the created document with information from engineering for the 'Beoordelings' report. """ # Generate report generated_report = project.create_report( template_file=template_file, data=report_data, output_file=output_file, render_images=True) project.write_log( f"The document with the engineering input for the EVVA is generated and saved in '{output_file.as_posix()}'.") return generated_report.output_file
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================