Skip to content

yaml_model_data

Module for YamlModelData class

!!! classes YamlModelData

YamlModelData (IModelData)

Implementation of the model data

Source code in entities/yaml_model_data.py
class YamlModelData(IModelData):
    """Implementation of the model data"""

    def __init__(self, name: str, version: List[int]):
        self._name = name
        self._version = version
        self._datasets = []
        self._output_path = Path("")
        self._output_variables = []
        self._rules = []

    @property
    def name(self) -> str:
        """Name of the model"""
        return self._name

    @property
    def version(self) -> List[int]:
        """Version of the model"""
        return self._version

    @property
    def datasets(self) -> List[IDatasetData]:
        """Datasets of the model"""
        return self._datasets

    @datasets.setter
    def datasets(self, datasets: List[IDatasetData]):
        self._datasets = datasets

    @property
    def output_path(self) -> Path:
        """Model path to the output file"""
        return self._output_path

    @output_path.setter
    def output_path(self, output_path: Path):
        self._output_path = output_path

    @property
    def output_variables(self) -> List[str]:
        """Output variables"""
        return self._output_variables

    @output_variables.setter
    def output_variables(self, output_variables: List[str]):
        self._output_variables = output_variables

    @property
    def rules(self) -> List[IRuleData]:
        """Rules of the model"""
        return self._rules

    @rules.setter
    def rules(self, rules: List[IRuleData]):
        self._rules = rules

datasets: List[decoimpact.data.api.i_dataset.IDatasetData] property writable

Datasets of the model

name: str property readonly

Name of the model

output_path: Path property writable

Model path to the output file

output_variables: List[str] property writable

Output variables

rules: List[decoimpact.data.api.i_rule_data.IRuleData] property writable

Rules of the model

version: List[int] property readonly

Version of the model