Repository: fitbenchmarking/fitbenchmarking

Issue:
Rename `sasview` to `bump` in controllers
The controllers name `sasview` should really be called bumps since that is the software package that does the minimization.

Comments:

Patch:
diff --git a/examples/all_softwares.ini b/examples/all_softwares.ini
index 9e2ddec6..37ae1670 100644
--- a/examples/all_softwares.ini
+++ b/examples/all_softwares.ini
@@ -8,6 +8,15 @@
 # entry for the software with a newline separated list of minimizers.
 # default is all available minimizers as follows:
 
+# bumps: available minimizers (amoeba, lm-bumps, newton, de, mp)
+#          for more information see
+#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
+#bumps: amoeba
+#       lm-bumps
+#       newton
+#       de
+#       mp
+
 # dfo: available minimimizers (dfogn, dfols)
 #        for more information see
 #        http://people.maths.ox.ac.uk/robertsl/dfogn/
@@ -64,27 +73,18 @@
 #        hybrid
 #        hybrid_reg
 
-# sasview: available minimizers (amoeba, lm-bumps, newton, de, mp)
-#          for more information see
-#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
-#sasview: amoeba
-#         lm-bumps
-#         newton
-#         de
-#         mp
-
 # scipy: available minimizers (Nelder-Mead, Powell, CG, BFGS, Newton-CG,
 #        L-BFGS-B, TNC, SLSQP)
 #        for more information see scipy.optimize.minimize.html
 #        https://docs.scipy.org/doc/scipy/reference/generated/
-#scipy: Nelder-Mead
-#       Powell
-#       CG
-#       BFGS
-#       Newton-CG
-#       L-BFGS-B
-#       TNC
-#       SLSQP
+scipy: Nelder-Mead
+       Powell
+       CG
+       BFGS
+       Newton-CG
+       L-BFGS-B
+       TNC
+       SLSQP
 
 # scipy_ls: available minimizers (lm-scipy-no-jac, lm-scipy, trf, dogbox)
 #           for more information see scipy.optimize.least_squares.html
@@ -95,10 +95,10 @@
 #       Jacobian evaluation. We do not see significant speed changes or
 #       difference in the accuracy results when running trf or dogbox with
 #       or without problem.eval_j for the Jacobian evaluation
-#scipy_ls: lm-scipy-no-jac
-#          lm-scipy
-#          trf
-#          dogbox
+scipy_ls: lm-scipy-no-jac
+          lm-scipy
+          trf
+          dogbox
 
 
 ##############################################################################
@@ -112,13 +112,13 @@
 
 # software is used to select the fitting software to benchmark, this should be
 # a newline-separated list
-# default is dfo, minuit, sasview, and scipy
-software: dfo
+# default is bumps, dfo, gsl, mantid, minuit, ralfit, and scipy
+software: bumps
+          dfo
           gsl
           mantid
           minuit
           ralfit
-          sasview
           scipy
 
 # use_errors will switch between weighted and unweighted least squares
diff --git a/examples/options_template.ini b/examples/options_template.ini
index f1843f9a..36336bc0 100644
--- a/examples/options_template.ini
+++ b/examples/options_template.ini
@@ -8,6 +8,15 @@
 # entry for the software with a newline separated list of minimizers.
 # default is all available minimizers as follows:
 
+# bumps: available minimizers (amoeba, lm-bumps, newton, de, mp)
+#          for more information see
+#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
+#bumps: amoeba
+#         lm-bumps
+#         newton
+#         de
+#         mp
+
 # dfo: available minimimizers (dfogn, dfols)
 #        for more information see
 #        http://people.maths.ox.ac.uk/robertsl/dfogn/
@@ -64,27 +73,18 @@
 #        hybrid
 #        hybrid_reg
 
-# sasview: available minimizers (amoeba, lm-bumps, newton, de, mp)
-#          for more information see
-#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
-#sasview: amoeba
-#         lm-bumps
-#         newton
-#         de
-#         mp
-
 # scipy: available minimizers (Nelder-Mead, Powell, CG, BFGS, Newton-CG,
 #        L-BFGS-B, TNC, SLSQP)
 #        for more information see scipy.optimize.minimize.html
 #        https://docs.scipy.org/doc/scipy/reference/generated/
-#scipy: Nelder-Mead
-#       Powell
-#       CG
-#       BFGS
-#       Newton-CG
-#       L-BFGS-B
-#       TNC
-#       SLSQP
+scipy: Nelder-Mead
+       Powell
+       CG
+       BFGS
+       Newton-CG
+       L-BFGS-B
+       TNC
+       SLSQP
 
 # scipy_ls: available minimizers (lm-scipy-no-jac, lm-scipy, trf, dogbox)
 #           for more information see scipy.optimize.least_squares.html
@@ -95,10 +95,10 @@
 #       Jacobian evaluation. We do not see significant speed changes or
 #       difference in the accuracy results when running trf or dogbox with
 #       or without problem.eval_j for the Jacobian evaluation
-#scipy_ls: lm-scipy-no-jac
-#          lm-scipy
-#          trf
-#          dogbox
+scipy_ls: lm-scipy-no-jac
+          lm-scipy
+          trf
+          dogbox
 
 
 ##############################################################################
@@ -112,13 +112,13 @@
 
 # software is used to select the fitting software to benchmark, this should be
 # a newline-separated list
-# default is dfo, minuit, sasview, and scipy
-#software: dfo
+# default is bumps, dfo, gsl, mantid, minuit, ralfit, and scipy
+#software: bumps
+#          dfo
 #          gsl
 #          mantid
 #          minuit
 #          ralfit
-#          sasview
 #          scipy
 
 # use_errors will switch between weighted and unweighted least squares
diff --git a/fitbenchmarking/controllers/sasview_controller.py b/fitbenchmarking/controllers/bumps_controller.py
similarity index 89%
rename from fitbenchmarking/controllers/sasview_controller.py
rename to fitbenchmarking/controllers/bumps_controller.py
index 1c11112d..ab1dfa44 100644
--- a/fitbenchmarking/controllers/sasview_controller.py
+++ b/fitbenchmarking/controllers/bumps_controller.py
@@ -1,5 +1,5 @@
 """
-Implements a controller for the SasView fitting software.
+Implements a controller for the Bumps fitting software.
 """
 
 from bumps.fitters import fit as bumpsFit
@@ -10,9 +10,9 @@ import numpy as np
 from fitbenchmarking.controllers.base_controller import Controller
 
 
-class SasviewController(Controller):
+class BumpsController(Controller):
     """
-    Controller for the Sasview fitting software.
+    Controller for the Bumps fitting software.
 
     Sasview requires a model to fit.
     Setup creates a model with the correct function.
@@ -25,7 +25,7 @@ class SasviewController(Controller):
         :param problem: Problem to fit
         :type problem: FittingProblem
         """
-        super(SasviewController, self).__init__(problem)
+        super(BumpsController, self).__init__(problem)
 
         self._param_names = self.problem.param_names
 
@@ -35,9 +35,9 @@ class SasviewController(Controller):
 
     def setup(self):
         """
-        Setup problem ready to run with SasView.
+        Setup problem ready to run with Bumps.
 
-        Creates a Sasview FitProblem for calling in fit()
+        Creates a FitProblem for calling in the fit() function of Bumps
         """
         # Bumps fails with the *args notation
         param_name_str = ', '.join(self._param_names)
@@ -82,7 +82,7 @@ class SasviewController(Controller):
 
     def fit(self):
         """
-        Run problem with SasView.
+        Run problem with Bumps.
         """
         result = bumpsFit(self._fit_problem, method=self.minimizer)
 
diff --git a/fitbenchmarking/utils/default_options.ini b/fitbenchmarking/utils/default_options.ini
index 118ffabb..85f09136 100644
--- a/fitbenchmarking/utils/default_options.ini
+++ b/fitbenchmarking/utils/default_options.ini
@@ -8,6 +8,15 @@
 # entry for the software with a newline separated list of minimizers.
 # default is all available minimizers as follows:
 
+# bumps: available minimizers (amoeba, lm-bumps, newton, de, mp)
+#          for more information see
+#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
+bumps: amoeba
+       lm-bumps
+       newton
+       de
+       mp
+
 # dfo: available minimimizers (dfogn, dfols)
 #        for more information see
 #        http://people.maths.ox.ac.uk/robertsl/dfogn/
@@ -64,15 +73,6 @@ ralfit: gn
         hybrid
         hybrid_reg
 
-# sasview: available minimizers (amoeba, lm-bumps, newton, de, mp)
-#          for more information see
-#          https://bumps.readthedocs.io/en/latest/guide/optimizer.html
-sasview: amoeba
-         lm-bumps
-         newton
-         de
-         mp
-
 # scipy: available minimizers (Nelder-Mead, Powell, CG, BFGS, Newton-CG,
 #        L-BFGS-B, TNC, SLSQP)
 #        for more information see scipy.optimize.minimize.html
@@ -112,13 +112,13 @@ num_runs: 5
 
 # software is used to select the fitting software to benchmark, this should be
 # a newline-separated list
-# default is dfo, minuit, sasview, and scipy
-software: dfo
+# default is bumps, dfo, minuit, and scipy
+software: bumps
+          dfo
 #          gsl
 #          mantid
           minuit
 #          ralfit
-          sasview
           scipy
           scipy_ls
 


Test patch:
diff --git a/fitbenchmarking/controllers/tests/test_default_controllers.py b/fitbenchmarking/controllers/tests/test_default_controllers.py
index 09fb4396..ca6a8ce0 100644
--- a/fitbenchmarking/controllers/tests/test_default_controllers.py
+++ b/fitbenchmarking/controllers/tests/test_default_controllers.py
@@ -6,10 +6,10 @@ from unittest import TestCase
 
 from fitbenchmarking import mock_problems
 from fitbenchmarking.controllers.base_controller import Controller
+from fitbenchmarking.controllers.bumps_controller import BumpsController
 from fitbenchmarking.controllers.controller_factory import ControllerFactory
 from fitbenchmarking.controllers.dfo_controller import DFOController
 from fitbenchmarking.controllers.minuit_controller import MinuitController
-from fitbenchmarking.controllers.sasview_controller import SasviewController
 from fitbenchmarking.controllers.scipy_controller import ScipyController
 from fitbenchmarking.controllers.scipy_ls_controller import ScipyLSController
 
@@ -154,11 +154,11 @@ class ControllerTests(TestCase):
     def setUp(self):
         self.problem = make_fitting_problem()
 
-    def test_sasview(self):
+    def test_bumps(self):
         """
-        SasviewController: Test for output shape
+        BumpsController: Test for output shape
         """
-        controller = SasviewController(self.problem)
+        controller = BumpsController(self.problem)
         controller.minimizer = 'amoeba'
         self.shared_testing(controller)
 
@@ -169,36 +169,6 @@ class ControllerTests(TestCase):
         controller._status = 1
         self.check_diverged(controller)
 
-    def test_scipy_ls(self):
-        """
-        ScipyController: Test for output shape
-        """
-        controller = ScipyLSController(self.problem)
-        controller.minimizer = 'lm'
-        self.shared_testing(controller)
-
-        controller._status = 1
-        self.check_converged(controller)
-        controller._status = 0
-        self.check_max_iterations(controller)
-        controller._status = -1
-        self.check_diverged(controller)
-
-    def test_scipy(self):
-        """
-        ScipyController: Test for output shape
-        """
-        controller = ScipyController(self.problem)
-        controller.minimizer = 'CG'
-        self.shared_testing(controller)
-
-        controller._status = 1
-        self.check_converged(controller)
-        controller._status = 0
-        self.check_max_iterations(controller)
-        controller._status = -1
-        self.check_diverged(controller)
-
     def test_dfo(self):
         """
         DFOController: Tests for output shape
@@ -230,6 +200,37 @@ class ControllerTests(TestCase):
         controller._status = 2
         self.check_diverged(controller)
 
+    def test_scipy(self):
+        """
+        ScipyController: Test for output shape
+        """
+        controller = ScipyController(self.problem)
+        controller.minimizer = 'CG'
+        self.shared_testing(controller)
+
+        controller._status = 1
+        self.check_converged(controller)
+        controller._status = 0
+        self.check_max_iterations(controller)
+        controller._status = -1
+        self.check_diverged(controller)
+
+    def test_scipy_ls(self):
+        """
+        ScipyLSController: Test for output shape
+        """
+        controller = ScipyLSController(self.problem)
+        controller.minimizer = 'lm'
+
+        self.shared_testing(controller)
+
+        controller._status = 1
+        self.check_converged(controller)
+        controller._status = 0
+        self.check_max_iterations(controller)
+        controller._status = -1
+        self.check_diverged(controller)
+
     def shared_testing(self, controller):
         """
         Utility function to run controller and check output is in generic form
@@ -286,13 +287,12 @@ class FactoryTests(TestCase):
         Test that the factory returns the correct class for inputs
         """
 
-        valid = ['scipy_ls', 'mantid', 'sasview', 'ralfit']
-        valid_names = ['scipyls', 'mantid', 'sasview', 'ralfit']
+        valid = ['scipy_ls', 'mantid', 'ralfit']
+        valid_names = ['scipyls', 'mantid', 'ralfit']
         invalid = ['foo', 'bar', 'hello', 'r2d2']
 
         for software, v in zip(valid, valid_names):
             controller = ControllerFactory.create_controller(software)
-            print(controller.__name__.lower())
             self.assertTrue(controller.__name__.lower().startswith(v))
 
         for software in invalid:
diff --git a/fitbenchmarking/systests/expected_results/all_parsers.txt b/fitbenchmarking/systests/expected_results/all_parsers.txt
index 795c3075..9d033b70 100644
--- a/fitbenchmarking/systests/expected_results/all_parsers.txt
+++ b/fitbenchmarking/systests/expected_results/all_parsers.txt
@@ -1,8 +1,8 @@
-                                  dfo                   gsl                 mantid                 minuit                 ralfit                sasview                     scipy              scipy_ls
-                                dfogn                lmsder                   BFGS                 minuit                     gn                 amoeba               Nelder-Mead       lm-scipy-no-jac
-BENNETT5                 inf (inf)[3]  1.639e-05 (1.021)[1]      0.02038 (1269)[2]      2.114e-05 (1.316)          1.606e-05 (1)      1.608e-05 (1.001)         1.653e-05 (1.029)  1.905e-05 (1.186)[1]
-cubic, Start 1  5.244e-14 (1.358e+08)         3.861e-22 (1)   1.85e-12 (4.792e+09)  3.586e-11 (9.288e+10)  6.723e-13 (1.741e+09)  1.119e-14 (2.899e+07)     6.267e-05 (1.623e+17)         3.861e-22 (1)
-cubic, Start 2  2.424e-17 (6.278e+04)         3.861e-22 (1)  3.306e-06 (8.563e+15)  7.579e-06 (1.963e+16)  6.926e-18 (1.794e+04)  1.146e-14 (2.969e+07)  7.176e-11 (1.859e+11)[1]         3.861e-22 (1)
-cubic-fba            7.913e-19 (2049)         3.861e-22 (1)  3.306e-06 (8.563e+15)  7.579e-06 (1.963e+16)   9.768e-18 (2.53e+04)  1.146e-14 (2.969e+07)  7.176e-11 (1.859e+11)[1]         3.861e-22 (1)
-EMU 73673                    1046 (1)       1053 (1.007)[1]        1552 (1.484)[2]            1057 (1.01)           inf (inf)[3]      1.032e+05 (98.62)           1055 (1.009)[1]              1046 (1)
-Problem Def 1           1.299e-10 (1)   0.04153 (3.199e+08)   33.36 (2.569e+11)[2]       4.214e-07 (3245)     0.1119 (8.618e+08)  6.784e+05 (5.225e+15)         3.837e-09 (29.55)   0.03966 (3.055e+08)
+                                bumps                    dfo                   gsl                 mantid                 minuit                 ralfit                     scipy              scipy_ls
+                               amoeba                  dfogn                lmsder                   BFGS                 minuit                     gn               Nelder-Mead       lm-scipy-no-jac
+BENNETT5            1.608e-05 (1.001)           inf (inf)[3]  1.639e-05 (1.021)[1]      0.02038 (1269)[2]      2.114e-05 (1.316)          1.606e-05 (1)         1.653e-05 (1.029)  1.905e-05 (1.186)[1]
+cubic, Start 1  1.119e-14 (2.899e+07)  5.244e-14 (1.358e+08)         3.861e-22 (1)   1.85e-12 (4.792e+09)  3.586e-11 (9.288e+10)  6.723e-13 (1.741e+09)     6.267e-05 (1.623e+17)         3.861e-22 (1)
+cubic, Start 2  1.146e-14 (2.969e+07)  2.424e-17 (6.278e+04)         3.861e-22 (1)  3.306e-06 (8.563e+15)  7.579e-06 (1.963e+16)  6.926e-18 (1.794e+04)  7.176e-11 (1.859e+11)[1]         3.861e-22 (1)
+cubic-fba       1.146e-14 (2.969e+07)       7.913e-19 (2049)         3.861e-22 (1)  3.306e-06 (8.563e+15)  7.579e-06 (1.963e+16)   9.768e-18 (2.53e+04)  7.176e-11 (1.859e+11)[1]         3.861e-22 (1)
+EMU 73673           1.032e+05 (98.62)               1046 (1)       1053 (1.007)[1]        1552 (1.484)[2]            1057 (1.01)           inf (inf)[3]           1055 (1.009)[1]              1046 (1)
+Problem Def 1   6.784e+05 (5.225e+15)          1.299e-10 (1)   0.04153 (3.199e+08)   33.36 (2.569e+11)[2]       4.214e-07 (3245)     0.1119 (8.618e+08)         3.837e-09 (29.55)   0.03966 (3.055e+08)