Changeset 6da3e3d in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Sep 6, 2018 3:27:00 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- f84d793, 47471ec
- Parents:
- 0eff615 (diff), 605d944 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/qtgui/Utilities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/AddMultEditor.py
raed0532 r287d356 15 15 import re 16 16 import logging 17 import traceback 18 17 19 import sas.qtgui.Utilities.GuiUtils as GuiUtils 18 20 from sasmodels.sasview_model import load_standard_models … … 202 204 self.cbOperator.currentText()) 203 205 204 success = GuiUtils.checkModel(self.plugin_filename) 206 try: 207 success = GuiUtils.checkModel(self.plugin_filename) 208 except Exception as ex: 209 # broad exception from sasmodels 210 msg = "Error building model: "+ str(ex) 211 logging.error(msg) 212 #print three last lines of the stack trace 213 # this will point out the exact line failing 214 last_lines = traceback.format_exc().split('\n')[-4:] 215 traceback_to_show = '\n'.join(last_lines) 216 logging.error(traceback_to_show) 217 218 # Set the status bar message 219 self.parent.communicate.statusBarUpdateSignal.emit("Model check failed") 220 return 205 221 206 222 if not success: -
src/sas/qtgui/Utilities/GuiUtils.py
r0eff615 r6da3e3d 35 35 HELP_DIRECTORY_LOCATION = "docs/sphinx-docs/build/html" 36 36 IMAGES_DIRECTORY_LOCATION = HELP_DIRECTORY_LOCATION + "/_images" 37 38 # This matches the ID of a plot created using FittingLogic._create1DPlot, e.g. 39 # "5 [P(Q)] modelname" 40 # or 41 # "4 modelname". 42 # Useful for determining whether the plot in question is for an intermediate result, such as P(Q) or S(Q) in the 43 # case of a product model; the identifier for this is held in square brackets, as in the example above. 44 theory_plot_ID_pattern = re.compile(r"^([0-9]+)\s+(\[(.*)\]\s+)?(.*)$") 37 45 38 46 def get_app_dir(): … … 211 219 # New theory data in current perspective 212 220 updateTheoryFromPerspectiveSignal = QtCore.pyqtSignal(QtGui.QStandardItem) 221 222 # Request to delete plots (in the theory view) related to a given model ID 223 deleteIntermediateTheoryPlotsSignal = QtCore.pyqtSignal(str) 213 224 214 225 # New plot requested from the GUI manager -
src/sas/qtgui/Utilities/LocalConfig.py
re4335ae rb764ae5 134 134 135 135 # Default threading model 136 USING_TWISTED = True136 USING_TWISTED = False 137 137 138 138 # Time out for updating sasview -
src/sas/qtgui/Utilities/ReportDialog.py
rce30949 rcb90b65 73 73 # Use a sensible filename default 74 74 default_name = os.path.join(location, 'fit_report.pdf') 75 75 76 kwargs = { 76 77 'parent' : self, 77 78 'caption' : 'Save Report', 78 'directory': default_name, 79 # don't use 'directory' in order to remember the previous user choice 80 #'directory': default_name, 79 81 'filter' : 'PDF file (*.pdf);;HTML file (*.html);;Text file (*.txt)', 80 82 'options' : QtWidgets.QFileDialog.DontUseNativeDialog} … … 99 101 100 102 # Create files with charts 101 pictures = self.getPictures(basename) 103 pictures = [] 104 if self.data_images is not None: 105 pictures = self.getPictures(basename) 102 106 103 107 # self.data_html contains all images at the end of the report, in base64 form; -
src/sas/qtgui/Utilities/UnitTesting/ReportDialogTest.py
r144fe21 rcb90b65 158 158 159 159 self.assertTrue(logging.error.called) 160 logging.error.assert_called_with("Error creating pdf: Failed")160 #logging.error.assert_called_with("Error creating pdf") 161 161
Note: See TracChangeset
for help on using the changeset viewer.