Adding new Options
Default options are set by the class
Options, which is defined in
the file fitbenchmarking/utils/options.py.
To add a new option to one of the five sections
LOGGING, follow the steps below.
We’ll illustrate the steps using
<SECTION>, which could be any of the
Amend the dictionary
Optionsto include any new default options.
If the option amended is to be checked for validity, add accepted option values to the
- Options.read_value(func, option)
Helper function which loads in the value
func (callable) – configparser function
option (str) – option to be read for file
value of the option
- Return type
Add tests in the following way:
Each of the sections has it’s own test file, for example,
test_option_fittinghas tests for the
Add default tests to the class called
Add user defined tests to the class called
User<SECTION>OptionTests. These should check that the user added option is valid and raise an
Add relevant documentation for the new option in FitBenchmarking Options.
Adding new Sections is also possible. To do this you’ll need to extend
VALID_SECTIONS with the new section, and follow the same structure as the