Browse Source

Version bump. Yaml changed from pyyaml to ruamel.yaml. This allows for improved mixed flow styles that are more human readable.

tags/1.6.1
Trevor Irons 5 years ago
parent
commit
f044fb0156
3 changed files with 14 additions and 8 deletions
  1. 10
    5
      akvo/gui/akvoGUI.py
  2. 2
    2
      akvo/gui/main.ui
  3. 2
    1
      setup.py

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

34
 import pkg_resources  # part of setuptools
34
 import pkg_resources  # part of setuptools
35
 version = pkg_resources.require("Akvo")[0].version
35
 version = pkg_resources.require("Akvo")[0].version
36
 
36
 
37
-import yaml
37
+from ruamel import yaml
38
+#import ruamel.yaml 
39
+#yaml = ruamel.yaml.YAML()
40
+#yaml.indent(mapping=4)
41
+
42
+#import yaml
38
 # Writes out numpy arrays into Eigen vectors as serialized by Lemma
43
 # Writes out numpy arrays into Eigen vectors as serialized by Lemma
39
 class MatrixXr(yaml.YAMLObject):
44
 class MatrixXr(yaml.YAMLObject):
40
     yaml_tag = u'MatrixXr'
45
     yaml_tag = u'MatrixXr'
614
             self.ui.FIDProcComboBox.setCurrentIndex (0)
619
             self.ui.FIDProcComboBox.setCurrentIndex (0)
615
     
620
     
616
     def ExportPreprocess(self):
621
     def ExportPreprocess(self):
617
-        """ This method export to YAML 
622
+        """ This method exports to YAML 
618
         """
623
         """
619
         try:
624
         try:
620
             with open('.akvo.last.yaml.path') as f: 
625
             with open('.akvo.last.yaml.path') as f: 
686
             #for line in self.logText:
691
             #for line in self.logText:
687
             #    outfile.write(line+"\n")
692
             #    outfile.write(line+"\n")
688
             yaml.dump(self.YamlNode, outfile)   
693
             yaml.dump(self.YamlNode, outfile)   
689
-            yaml.dump(INFO, outfile, default_flow_style=False)   
694
+            yaml.dump(INFO, outfile) #, default_flow_style=False)   
690
  
695
  
691
     def SavePreprocess(self):
696
     def SavePreprocess(self):
692
      
697
      
1010
         #for line in yaml.dump(self.YamlNode, default_flow_style=False):
1015
         #for line in yaml.dump(self.YamlNode, default_flow_style=False):
1011
         #for line in nlogText: 
1016
         #for line in nlogText: 
1012
         #    self.ui.logTextBrowser.append( line )
1017
         #    self.ui.logTextBrowser.append( line )
1013
-        #    self.logText.append( line ) 
1018
+        #    self.logText.append( line )
1014
         self.ui.logTextBrowser.clear()
1019
         self.ui.logTextBrowser.clear()
1015
-        self.ui.logTextBrowser.append( yaml.dump(self.YamlNode)) #, default_flow_style=False)  )
1020
+        self.ui.logTextBrowser.append( yaml.dump(self.YamlNode )) 
1016
 
1021
 
1017
     def disable(self):
1022
     def disable(self):
1018
         self.ui.inputRAWParametersBox.setEnabled(False)
1023
         self.ui.inputRAWParametersBox.setEnabled(False)

+ 2
- 2
akvo/gui/main.ui View File

979
           </widget>
979
           </widget>
980
           <widget class="QWidget" name="NCTab">
980
           <widget class="QWidget" name="NCTab">
981
            <attribute name="title">
981
            <attribute name="title">
982
-            <string>NC</string>
982
+            <string>Noise cancelation</string>
983
            </attribute>
983
            </attribute>
984
            <attribute name="toolTip">
984
            <attribute name="toolTip">
985
             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This tab contains noise cancellation algorithms. The frequency-domain algorithm is often less effective than the time domain approach. We often discourage using the frequency domain algorithm. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
985
             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This tab contains noise cancellation algorithms. The frequency-domain algorithm is often less effective than the time domain approach. We often discourage using the frequency domain algorithm. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1182
 }
1182
 }
1183
 
1183
 
1184
 #lcdH1F2:disabled {
1184
 #lcdH1F2:disabled {
1185
-color: red;
1185
+color: grey;
1186
 background: dark grey;
1186
 background: dark grey;
1187
 }</string>
1187
 }</string>
1188
                  </property>
1188
                  </property>

+ 2
- 1
setup.py View File

21
     long_description = fh.read()
21
     long_description = fh.read()
22
 
22
 
23
 setup(name='Akvo',
23
 setup(name='Akvo',
24
-      version='1.2.5',
24
+      version='1.2.6',
25
       description='Surface nuclear magnetic resonance workbench',
25
       description='Surface nuclear magnetic resonance workbench',
26
       long_description=long_description,
26
       long_description=long_description,
27
       long_description_content_type='text/markdown',
27
       long_description_content_type='text/markdown',
46
           'numpy',
46
           'numpy',
47
           'pyqt5',
47
           'pyqt5',
48
           'pyyaml',
48
           'pyyaml',
49
+          'ruamel.yaml',
49
           'pandas',
50
           'pandas',
50
           'pyqt-distutils',
51
           'pyqt-distutils',
51
           'cmocean'
52
           'cmocean'

Loading…
Cancel
Save