Commit 83b7472d authored by Srikanth Ravipati's avatar Srikanth Ravipati Committed by Peterson, Peter
Browse files

Revised following review comments

parent dafb754c
......@@ -42,10 +42,6 @@ FacilityInfo::FacilityInfo(const Poco::XML::Element *elem)
m_zeroPadding(0), m_delimiter(), m_extensions(), m_archiveSearch(),
m_instruments(), m_noFilePrefix(), m_multiFileLimit(100),
m_computeResources() {
// if (m_name.empty()) {
// g_log.error("Facility name is not defined");
// throw std::runtime_error("Facility name is not defined");
// }
// Fill the various fields from the XML
fillZeroPadding(elem);
......
......@@ -39,9 +39,6 @@ InstrumentInfo::InstrumentInfo(const FacilityInfo *f,
: m_facility(f) {
m_name = elem->getAttribute("name");
// if (m_name.empty()) {
// throw std::runtime_error("Instrument name is not defined");
// }
// The string to separate the instrument name and the run number.
m_delimiter = elem->getAttribute("delimiter");
......
......@@ -5,7 +5,7 @@
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from mantid.kernel import ConfigService
from mantid.kernel import config
from mantid.api import mtd
from mantid.simpleapi import ReflectometryILLPreprocess
import numpy.testing
......@@ -16,6 +16,20 @@ import math
class ReflectometryILLPreprocessTest(unittest.TestCase):
def setUp(self):
self._facility = config['default.facility']
self._instrument = config['default.instrument']
config['default.facility'] = 'ILL'
config['default.instrument'] = 'D17'
def tearDown(self):
if self._facility:
config['default.facility'] = self._facility
if self._instrument:
config['default.instrument'] = self._instrument
mtd.clear()
def tearDown(self):
mtd.clear()
......@@ -120,8 +134,6 @@ class ReflectometryILLPreprocessTest(unittest.TestCase):
self.assertAlmostEqual(numpy.rad2deg(two_theta_fg), 0., delta=0.1)
def testTwoInputFiles(self):
ConfigService.Instance().setString("default.facility", "ILL")
ConfigService.Instance().setString("default.instrument", "D17")
outWSName = 'outWS'
args = {
'Run': 'ILL/D17/317369, ILL/D17/317370.nxs',
......@@ -134,8 +146,6 @@ class ReflectometryILLPreprocessTest(unittest.TestCase):
outWS = alg.getProperty('OutputWorkspace').value
self.assertEqual(outWS.getAxis(0).getUnit().caption(), 'Wavelength')
self.assertEqual(mtd.getObjectNames(), [])
ConfigService.Instance().setString("default.facility", " ")
ConfigService.Instance().setString("default.instrument", " ")
if __name__ == "__main__":
......
......@@ -1200,7 +1200,7 @@ class MantidFrameworkConfig:
config.reset()
# With the default facility changed from ISIS to nothing (EMPTY),
# the following setting is put in place to avoid failure of tests,
# the following setting is put in place to avoid failure of tests
ConfigService.Instance().setString("default.facility", "ISIS")
# Up the log level so that failures can give useful information
......
......@@ -103,7 +103,7 @@ mantid_init_config_keys = ('datasearch.directories', 'defaultsave.directory', 'd
'default.instrument')
# With the default facility changed from ISIS to nothing (EMPTY),
# the following setting is put in place to avoid failure of tests,
# the following setting is put in place to avoid failure of tests
ConfigService.Instance().setString("default.facility", "ISIS")
mantid_config_reset = [
......
......@@ -11,8 +11,8 @@ New and Improved
- New plot interactions: Double click a legend to hide it, double click a curve to open it in the plot config dialog.
- It is now possible to overplot bin data from the matrix workspace view.
- Improved the performance of the table workspace display for large datasets
- A new empty facility with empty instrument is made default facility now, and
user has to select their choice of facility and instrument for the first time, including ISIS
- A new empty facility with empty instrument is the default facility now, and
user has to select their choice of facility (including ISIS) and instrument for the first time
Bugfixes
--------
......@@ -21,6 +21,8 @@ Bugfixes
- For the elliptical shell of integrated peaks, the background is correct when plotting with varying background thicknesses
- Fixed a bug which occurred when switching to a log scale in sliceviewer with negative data.
- Fixed a bug that use wrong help links in certain interfaces
- First time dialog box will not appear recurrently
- If the facility in Mantid.user.properties is empty, it is consistently reflected as empty in the GUI
- First time dialog box will not appear recurrently, if user selected their choice of facility
and instrument at least once and checked "Do not show again until next version"
:ref:`Release 6.1.0 <v6.1.0>`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment