Changeset 93c79b5 in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Apr 25, 2018 6:08:35 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- d4dac80
- Parents:
- 27689dc (diff), 38f838e (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:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/TabbedModelEditor.py
r3b8cc00 r93c79b5 126 126 self.editor_widget.setEnabled(True) 127 127 self.editor_widget.blockSignals(False) 128 self.filename, _ = os.path.splitext(os.path.basename(filename)) 129 130 self.setWindowTitle(self.window_title + " - " + self.filename) 128 self.filename = filename 129 display_name, _ = os.path.splitext(os.path.basename(filename)) 130 131 self.setWindowTitle(self.window_title + " - " + display_name) 131 132 132 133 def onModifiedExit(self): -
src/sas/qtgui/Utilities/GuiUtils.py
rbb57068 r27689dc 10 10 import webbrowser 11 11 import urllib.parse 12 13 import numpy as np 12 14 13 15 warnings.simplefilter("ignore") … … 926 928 input = input.replace(",", "") 927 929 930 def checkModel(path): 931 """ 932 Check that the model save in file 'path' can run. 933 """ 934 # The following return needs to be removed once 935 # the unittest related changes in Sasmodels are commited 936 return True 937 # try running the model 938 from sasmodels.sasview_model import load_custom_model 939 Model = load_custom_model(path) 940 model = Model() 941 q = np.array([0.01, 0.1]) 942 _ = model.evalDistribution(q) 943 qx, qy = np.array([0.01, 0.01]), np.array([0.1, 0.1]) 944 _ = model.evalDistribution([qx, qy]) 945 946 # check the model's unit tests run 947 from sasmodels.model_test import run_one 948 # TestSuite module in Qt5 now deletes tests in the suite after running, 949 # so suite[0] in run_one() in sasmodels/model_test.py will contain [None] and 950 # test.info.tests will raise. 951 # Not sure how to change the behaviour here, most likely sasmodels will have to 952 # be modified 953 result = run_one(path) 954 955 return result 956 928 957 929 958 def enum(*sequential, **named): -
src/sas/qtgui/Utilities/PluginDefinition.py
r8b480d27 r3b8cc00 58 58 59 59 # Validators 60 #rx = QtCore.QRegExp(r'^[\w,\s-]+$')61 #rx = QtCore.QRegExp("[a-z-A-Z_]+")62 60 rx = QtCore.QRegExp("^[A-Za-z0-9_]*$") 63 61 -
src/sas/qtgui/Utilities/PluginManager.py
r8b480d27 r3b8cc00 19 19 """ 20 20 def __init__(self, parent=None): 21 super(PluginManager, self).__init__( )21 super(PluginManager, self).__init__(parent._parent) 22 22 self.setupUi(self) 23 23
Note: See TracChangeset
for help on using the changeset viewer.