Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
f044fb0156
3 mainītis faili ar 14 papildinājumiem un 8 dzēšanām
  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 Parādīt failu

@@ -34,7 +34,12 @@ from akvo.tressel import mrsurvey
34 34
 import pkg_resources  # part of setuptools
35 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 43
 # Writes out numpy arrays into Eigen vectors as serialized by Lemma
39 44
 class MatrixXr(yaml.YAMLObject):
40 45
     yaml_tag = u'MatrixXr'
@@ -614,7 +619,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
614 619
             self.ui.FIDProcComboBox.setCurrentIndex (0)
615 620
     
616 621
     def ExportPreprocess(self):
617
-        """ This method export to YAML 
622
+        """ This method exports to YAML 
618 623
         """
619 624
         try:
620 625
             with open('.akvo.last.yaml.path') as f: 
@@ -686,7 +691,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
686 691
             #for line in self.logText:
687 692
             #    outfile.write(line+"\n")
688 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 696
     def SavePreprocess(self):
692 697
      
@@ -1010,9 +1015,9 @@ class ApplicationWindow(QtWidgets.QMainWindow):
1010 1015
         #for line in yaml.dump(self.YamlNode, default_flow_style=False):
1011 1016
         #for line in nlogText: 
1012 1017
         #    self.ui.logTextBrowser.append( line )
1013
-        #    self.logText.append( line ) 
1018
+        #    self.logText.append( line )
1014 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 1022
     def disable(self):
1018 1023
         self.ui.inputRAWParametersBox.setEnabled(False)

+ 2
- 2
akvo/gui/main.ui Parādīt failu

@@ -979,7 +979,7 @@ background: dark grey;
979 979
           </widget>
980 980
           <widget class="QWidget" name="NCTab">
981 981
            <attribute name="title">
982
-            <string>NC</string>
982
+            <string>Noise cancelation</string>
983 983
            </attribute>
984 984
            <attribute name="toolTip">
985 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,7 +1182,7 @@ background: black;
1182 1182
 }
1183 1183
 
1184 1184
 #lcdH1F2:disabled {
1185
-color: red;
1185
+color: grey;
1186 1186
 background: dark grey;
1187 1187
 }</string>
1188 1188
                  </property>

+ 2
- 1
setup.py Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt