Skip to content

Commit

Permalink
fix: corrected file saving method
Browse files Browse the repository at this point in the history
  • Loading branch information
rabii-chaarani committed Aug 27, 2024
1 parent 2a74211 commit 8746bdb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
Binary file modified LoopDataConverter/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified LoopDataConverter/fields/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file not shown.
38 changes: 18 additions & 20 deletions LoopDataConverter/fields/_ntgs/_ntgs_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@

class NtgsConfig:
def __init__(self):
self.fold_config = (
{
"structtype_column": "FoldEvent",
"fold_text": "FeatDesc",
"description_column": "Desc",
"synform_text": "FoldType",
"foldname_column": "FoldName",
"objectid_column": "OBJECTID",
"tightness_column": "IntlimbAng",
"axial_plane_dipdir_column": "AxPlDipDir",
"axial_plane_dip_column": "AxPlDip",
"interp_source_column": "InterpSrce",
},
)
self.fold_config ={
"structtype_column": "FoldEvent",
"fold_text": "FeatDesc",
"description_column": "Desc",
"synform_text": "FoldType",
"foldname_column": "FoldName",
"objectid_column": "OBJECTID",
"tightness_column": "IntlimbAng",
"axial_plane_dipdir_column": "AxPlDipDir",
"axial_plane_dip_column": "AxPlDip",
"interp_source_column": "InterpSrce",
}

self.fault_config = {
"structtype_column": "FaultType",
Expand Down Expand Up @@ -56,21 +54,21 @@ def __init__(self):

self.structure_config = {
"orientation_type": "dip direction",
"dipdir_column": "DipDir",
"dipdir_column": "DipDirectn",
"dip_column": "Dip",
"description_column": "FeatDesc",
"bedding_text": "ObsType",
"overturned_column": "FeatureCodeDesc",
"overturned_column": "FeatDesc",
"overturned_text": "overturned",
"objectid_column": "ObjectID",
"interp_source_column": "InterpSrce",
}

self.config_map = {
Datatype.GEOLOGY: self.geology_config,
Datatype.STRUCTURE: self.structure_config,
Datatype.FAULT: self.fault_config,
Datatype.FOLD: self.fold_config,
"geology": self.geology_config,
"structure": self.structure_config,
"fault": self.fault_config,
"fold": self.fold_config,
}

def __getitem__(self, datatype):
Expand Down
Binary file not shown.
5 changes: 3 additions & 2 deletions LoopDataConverter/file_readers/_file_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,6 @@ def __call__(self):
if self._fileData[Datatype.FOLD] is not None:
self._data[Datatype.FOLD] = self.read(Datatype.FOLD)

def save(self, file_path, file_extension=None):
self._reader.save(file_path, file_extension)
def save(self, datatype, file_path, file_extension=None):
self._reader[datatype].save(file_path, file_extension)

0 comments on commit 8746bdb

Please sign in to comment.