Skip to content
Snippets Groups Projects
Commit a02afcfa authored by Zhou, Wenduo's avatar Zhou, Wenduo
Browse files

Refs #22950. Removed commented out codes and fixed flake8.

parent 5509a694
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ try: ...@@ -14,7 +14,6 @@ try:
import mantidplot # noqa import mantidplot # noqa
IS_IN_MANTIDPLOT = True IS_IN_MANTIDPLOT = True
from mantid.kernel import ConfigService from mantid.kernel import ConfigService
from mantid.api import AlgorithmFactory
except: except:
import sip import sip
sip.setapi('QString',2) sip.setapi('QString',2)
...@@ -109,7 +108,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction): ...@@ -109,7 +108,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction):
# Event connections # Event connections
if not IS_IN_MANTIDPLOT: if not IS_IN_MANTIDPLOT:
self.reduce_button.hide() self.reduce_button.hide()
# TODO - REMOVE LINE self.cluster_button.hide()
self.connect(self.export_button, QtCore.SIGNAL("clicked()"), self._export) self.connect(self.export_button, QtCore.SIGNAL("clicked()"), self._export)
self.connect(self.reduce_button, QtCore.SIGNAL("clicked()"), self.reduce_clicked) self.connect(self.reduce_button, QtCore.SIGNAL("clicked()"), self.reduce_clicked)
self.connect(self.save_button, QtCore.SIGNAL("clicked()"), self._save) self.connect(self.save_button, QtCore.SIGNAL("clicked()"), self._save)
...@@ -180,19 +178,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction): ...@@ -180,19 +178,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction):
else: else:
self.interface_chk.hide() self.interface_chk.hide()
# Show the parallel reduction button if enabled
# TODO - Remove the whole section
# if self._interface.is_cluster_enabled() and IS_IN_MANTIDPLOT \
# and CLUSTER_ENABLED:
# config = ConfigService.Instance()
# if config.hasProperty("cluster.submission") \
# and config.getString("cluster.submission").lower()=='on':
# self.cluster_button.show()
# self.connect(self.cluster_button, QtCore.SIGNAL("clicked()"), self.cluster_clicked)
# else:
# self.cluster_button.hide()
# TODO --- Till here!
if load_last: if load_last:
self._interface.load_last_reduction() self._interface.load_last_reduction()
else: else:
...@@ -267,16 +252,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction): ...@@ -267,16 +252,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction):
self.tools_menu.addAction(instrAction) self.tools_menu.addAction(instrAction)
self.tools_menu.addAction(debugAction) self.tools_menu.addAction(debugAction)
# Cluster submission details
# # TODO - REMOVE THIS SECTION
# if IS_IN_MANTIDPLOT and CLUSTER_ENABLED:
# jobAction = QtGui.QAction("Remote submission details", self)
# jobAction.setShortcut("Ctrl+R")
# jobAction.setStatusTip("Set the cluster information for remote job submission")
# self.connect(jobAction, QtCore.SIGNAL("triggered()"), self._cluster_details_dialog)
# self.tools_menu.addAction(jobAction)
# # END-SECTION
recent_files = [] recent_files = []
for fname in self._recent_files: for fname in self._recent_files:
if fname != self._filename and QtCore.QFile.exists(fname) and fname not in recent_files: if fname != self._filename and QtCore.QFile.exists(fname) and fname not in recent_files:
...@@ -349,41 +324,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction): ...@@ -349,41 +324,6 @@ class ReductionGUI(QtGui.QMainWindow, ui.ui_reduction_main.Ui_SANSReduction):
self.close() self.close()
return False return False
# TODO REMOVE THIS SECTION COMPLETELY
# def _cluster_details_dialog(self):
# """
# Show dialog to get cluster submission details
# """
# class ClusterDialog(QtGui.QDialog, ui.ui_cluster_details_dialog.Ui_Dialog):
# def __init__(self, compute_resources=None):
# QtGui.QDialog.__init__(self)
# self.setupUi(self)
# self.resource_combo.clear()
# for res in compute_resources:
# self.resource_combo.addItem(QtGui.QApplication.translate("Dialog", res, None, QtGui.QApplication.UnicodeUTF8))
#
# # Fill out the defaults
# dialog = ClusterDialog(self._compute_resources)
# if self.general_settings.cluster_user is not None:
# dialog.username_edit.setText(str(self.general_settings.cluster_user))
# dialog.pass_edit.setText(str(self.general_settings.cluster_pass))
#
# dialog.nodes_box.setValue(int(self._number_of_nodes))
# dialog.cores_box.setValue(int(self._cores_per_node))
# for i in range(dialog.resource_combo.count()):
# if dialog.resource_combo.itemText(i)==self.general_settings.compute_resource:
# dialog.resource_combo.setCurrentIndex(i)
# break
#
# dialog.exec_()
# if dialog.result()==1:
# self.general_settings.cluster_user = str(dialog.username_edit.text())
# self.general_settings.cluster_pass = str(dialog.pass_edit.text())
# self._cluster_details_set = True
# self._number_of_nodes = int(dialog.nodes_box.value())
# self._cores_per_node = int(dialog.cores_box.value())
# self.general_settings.compute_resource = dialog.resource_combo.currentText()
def _clear_and_close(self): def _clear_and_close(self):
""" """
Clear all QSettings parameters Clear all QSettings parameters
......
...@@ -38,8 +38,4 @@ class DgsInterface(InstrumentInterface): ...@@ -38,8 +38,4 @@ class DgsInterface(InstrumentInterface):
self.attach(AbsoluteUnitsWidget(settings = self._settings, self.attach(AbsoluteUnitsWidget(settings = self._settings,
data_type = self.data_type)) data_type = self.data_type))
# Powder and Single Crystal conversion return
#self.attach(PdAndScConversionWidget(settings = self._settings,
# data_type = self.data_type))
...@@ -34,4 +34,3 @@ class DiffractionInterface(InstrumentInterface): ...@@ -34,4 +34,3 @@ class DiffractionInterface(InstrumentInterface):
self.attach(FilterSetupWidget(settings = self._settings, data_type = self.data_type)) self.attach(FilterSetupWidget(settings = self._settings, data_type = self.data_type))
return return
...@@ -70,4 +70,3 @@ class EQSANSInterface(InstrumentInterface): ...@@ -70,4 +70,3 @@ class EQSANSInterface(InstrumentInterface):
Returns true if the instrument has simple and advanced views Returns true if the instrument has simple and advanced views
""" """
return False return False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment