From 8746bdb523416df38a64820462ccb0ae0496d258 Mon Sep 17 00:00:00 2001 From: rabii-chaarani Date: Wed, 28 Aug 2024 09:20:52 +0930 Subject: [PATCH] fix: corrected file saving method --- .../__pycache__/__init__.cpython-311.pyc | Bin 437 -> 437 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 239 -> 239 bytes .../__pycache__/_ntgs_config.cpython-311.pyc | Bin 3032 -> 2916 bytes .../fields/_ntgs/_ntgs_config.py | 38 +++++++++--------- .../__pycache__/_file_readers.cpython-311.pyc | Bin 10175 -> 10210 bytes .../file_readers/_file_readers.py | 5 ++- 6 files changed, 21 insertions(+), 22 deletions(-) diff --git a/LoopDataConverter/__pycache__/__init__.cpython-311.pyc b/LoopDataConverter/__pycache__/__init__.cpython-311.pyc index 50ccf9f449a272dcb9fc39eb0ddeadbb4886f255..3b2692f1fbbac84be88a0c16d84e9c75816c30d9 100644 GIT binary patch delta 50 mcmdnWyp@@EIWI340}woZb~>$ZBX2LGwA=*-EU1VVs0aXu4GvcT delta 50 mcmdnWyp@@EIWI340}x2xIGxtNk++voTK)n97F5IwR0IHM(hZ6L diff --git a/LoopDataConverter/fields/__pycache__/__init__.cpython-311.pyc b/LoopDataConverter/fields/__pycache__/__init__.cpython-311.pyc index 21657940c18b03f994ca8cd07eed4806c04057cc..6b5bd5176234759791f27f9bbdcc3aae5e6b6558 100644 GIT binary patch delta 21 bcmaFQ_@0q>IWI340}woZb~;UNBJU#rN+btS delta 21 bcmaFQ_@0q>IWI340}zPZIGrXtk@pb*Lq-O3 diff --git a/LoopDataConverter/fields/_ntgs/__pycache__/_ntgs_config.cpython-311.pyc b/LoopDataConverter/fields/_ntgs/__pycache__/_ntgs_config.cpython-311.pyc index 28eb4593998ad34ac245404c7e6215e89d6195fa..e3e52cedce5ca72569b263f11dad3e2bfed34890 100644 GIT binary patch delta 459 zcmca1{zQy-IWI340}vGQpGk9`$h$>OgOPz@IztL$3R4Pm3QG!W3R?<$3P%cO3RepE z9IlBESErh$hyx|ffY?060w`=bhqHzuo*85c2-GlSF+o^hHnKR-Xb1qRfiW3Utmd!) z^|QbPQW%06G_5zgGtFZW;d03=aLFu6O)km1#qOU}98y`3I{6=4rV7g~_Vm>Joc#34 zTb#uuMWx9lrA4W?Skn?qb4qTpq~+(NXtGYuV7HxonthsSAJE+T_lCoDM^=^ntUJ+HhAtG@_MCAh~t29vI vlr~Ki4Ss{%{X`%c~x&n$=^`Yxgn!^L(yomKc|G=S1ATw z(JMSMGg7X|8Q$d)xxyp2faQvUDUjLYH^b$Mj4p`fJHzCPwDt$i$sL@N7=0#7b5#hr kGO}`gU_c`MCNJe`u=iwS)cnAJo%{$E|AIrdC=wVD0L3kUVE_OC diff --git a/LoopDataConverter/fields/_ntgs/_ntgs_config.py b/LoopDataConverter/fields/_ntgs/_ntgs_config.py index 9361566..bbfc799 100644 --- a/LoopDataConverter/fields/_ntgs/_ntgs_config.py +++ b/LoopDataConverter/fields/_ntgs/_ntgs_config.py @@ -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", @@ -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): diff --git a/LoopDataConverter/file_readers/__pycache__/_file_readers.cpython-311.pyc b/LoopDataConverter/file_readers/__pycache__/_file_readers.cpython-311.pyc index af65ee1031234418df1cf8939b33540e121e6120..cdbc76611b6b1eeb033165a889342ce9a2dc4d54 100644 GIT binary patch delta 223 zcmdn*|Hz+rIWI340}$9Vok=U%$eX1i&jR8?0f@~E#GgHY#B_!lhAf838{|YLvx|x| zGu1Fp-l3w(r^!;p2b3+!0}-l|{|bvw{-7eOsS4yaFx=qa>EW3WafL(fI*0Nl4&?=& yE9x$C*j?eUy8uIz4OOp8*?(YQWW`EsR#MAiGzLl;FrpJ5L1JI9NE8VIEe8MrlQ+iz delta 207 zcmaFlzu%vCIWI340}!|zKAjf6kvB_4jv2&-0u~?*;(xXQ64M!K7_ufWR8g3mE-pCv zl8X3bLotcTtP1?P#ffF9i-0PM6@Wwo!wn9e9-iwQl9xCnXJ{^nyU1a3g~Q|m3{4JE ky)I??fq{_~E3w&CEsN0@C}qHiPJ9H3eZeA8BnY$@0JP3DLI3~& diff --git a/LoopDataConverter/file_readers/_file_readers.py b/LoopDataConverter/file_readers/_file_readers.py index 225228c..350b650 100644 --- a/LoopDataConverter/file_readers/_file_readers.py +++ b/LoopDataConverter/file_readers/_file_readers.py @@ -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) +