Browse Source

More tweaks to Yaml...directly using pyyaml rather than hand rolled solution.

HEAD
T-bone 6 years ago
parent
commit
107d08746c
2 changed files with 11 additions and 9 deletions
  1. 10
    8
      akvo/gui/akvoGUI.py
  2. 1
    1
      setup.py

+ 10
- 8
akvo/gui/akvoGUI.py View File

@@ -528,7 +528,9 @@ class ApplicationWindow(QtWidgets.QMainWindow):
528 528
         INFO["transFreq"] = self.RAWDataProc.transFreq
529 529
         INFO["headerstr"] = str(self.headerstr)
530 530
         INFO["log"] = yaml.dump( self.YamlNode )  #self.logText  #MAK 20170127
531
-
531
+        
532
+        print ("YAML NODE", yaml.dump( self.YamlNode ) )
533
+    
532 534
         self.RAWDataProc.DATADICT["INFO"] = INFO 
533 535
 
534 536
         pickle.dump(self.RAWDataProc.DATADICT, save)
@@ -581,20 +583,20 @@ class ApplicationWindow(QtWidgets.QMainWindow):
581 583
         self.RAWDataProc.dt = 1./self.RAWDataProc.samp 
582 584
 
583 585
         self.dataChan = self.RAWDataProc.DATADICT[ self.RAWDataProc.DATADICT["PULSES"][0] ]["chan"]
584
-        #To keep backwards compatibility with prior saved pickles
585
-        try:
586
-            self.logText = self.RAWDataProc.DATADICT["INFO"]["log"] # YAML 
587
-            #self.ui.logTextBrowser.clear() 
586
+        # Keep backwards compatibility with prior saved pickles???
587
+        #self.ui.logTextBrowser.clear() 
588 588
             #self.ui.logTextBrowser.append( yaml.dump(self.YamlNode)) #, default_flow_style=False)  )
589 589
             #for a in self.logText:
590 590
             #    self.ui.logTextBrowser.append(str(a))
591 591
             #self.ui.logTextBrowser
592 592
             #self.ui.logTextBrowser.clear()
593 593
             #print ( self.RAWDataProc.DATADICT["INFO"]["log"] )
594
-            #self.YamlNode = yaml.load( self.logText ) 
594
+        
595
+        self.logText = self.RAWDataProc.DATADICT["INFO"]["log"] # YAML 
596
+        self.YamlNode = yaml.load( self.logText ) 
595 597
             #self.ui.logTextBrowser.append( yaml.dump(self.YamlNode)) #, default_flow_style=False)  )
596
-        except KeyError:
597
-            pass
598
+        #except KeyError:
599
+        #    pass
598 600
        
599 601
         if "Loaded" not in self.YamlNode.Processing.keys():
600 602
             self.YamlNode.Processing["Loaded"] = []

+ 1
- 1
setup.py View File

@@ -34,7 +34,7 @@ except ImportError:
34 34
 #from distutils.core import setup
35 35
 
36 36
 setup(name='Akvo',
37
-      version='1.0.4',
37
+      version='1.0.5',
38 38
       description='Surface nuclear magnetic resonance workbench',
39 39
       author='Trevor P. Irons',
40 40
       author_email='Trevor.Irons@lemmasoftware.org',

Loading…
Cancel
Save