Checker
OperationGenericCheck ¶
Bases: OperationAbstract
Check FMU compliance against the FMI standard XSD schema.
Validates the modelDescription.xml file of an FMU against the official XSD schema for FMI 2.0 or 3.0. Reports validation errors via the logger and indicates whether the FMU is compliant.
This checker is always included by default in the checkers list.
Attributes:
| Name | Type | Description |
|---|---|---|
SUPPORTED_FMI_VERSIONS | tuple[str, ...] | FMI versions supported by this checker ( |
compliant_with_version | str | None | The FMI version the FMU is compliant with after validation, or |
Source code in fmu_manipulation_toolbox/checker.py
closure() ¶
Log the final compliance result.
Called after the FMU descriptor has been fully parsed. Logs whether the FMU is compliant with the detected FMI version.
Source code in fmu_manipulation_toolbox/checker.py
fmi_attrs(attrs) ¶
Validate the FMU descriptor against the appropriate FMI XSD schema.
Called during FMU parsing when the root fmiModelDescription element is encountered.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attrs | dict[str, str] | XML attributes of the | required |
Source code in fmu_manipulation_toolbox/checker.py
add_from_file(checker_filename) ¶
Dynamically load checker classes from a Python file.
Imports the given Python file and registers any class that directly subclasses OperationAbstract into the global checkers list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
checker_filename | str | Path to the Python file containing checker class(es). | required |
Source code in fmu_manipulation_toolbox/checker.py
get_checkers() ¶
Collect all registered FMU checkers.
Returns the built-in checkers combined with any additional checkers discovered via the fmu_manipulation_toolbox.checkers entry point group.
Returns:
| Type | Description |
|---|---|
List[type[OperationAbstract]] | list[type[OperationAbstract]]: List of checker classes, each being a subclass of OperationAbstract. |