-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added dataclass for input data
- Loading branch information
1 parent
fb2b6d7
commit f32e3f2
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |