From f32e3f2351f20f3d1b67cd58718eb8a24a6c309c Mon Sep 17 00:00:00 2001 From: rabii-chaarani Date: Mon, 8 Jul 2024 13:46:37 +0930 Subject: [PATCH] chore: added dataclass for input data --- LoopDataConverter/input/input_data.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LoopDataConverter/input/input_data.py diff --git a/LoopDataConverter/input/input_data.py b/LoopDataConverter/input/input_data.py new file mode 100644 index 0000000..2fa7cdc --- /dev/null +++ b/LoopDataConverter/input/input_data.py @@ -0,0 +1,22 @@ +from dataclasses import dataclass +from ..datatypes import Datatype + + + +@dataclass +class InputData: + geology: Datatype.GEOLOGY = None + structure: Datatype.STRUCTURE = None + fault: Datatype.FAULT = None + fold: Datatype.FOLD = None + + + def __getitem__(self, datatype: Datatype): + + return self.__dict__[datatype] + +@dataclass +class OutputData(InputData): + + def __getitem__(self, datatype: Datatype): + return super().__getitem__(datatype) \ No newline at end of file