fitbenchmarking.parsing.parser_factory module

This file contains a factory implementation for the parsers. This is used to manage the imports and reduce effort in adding new parsers.

class fitbenchmarking.parsing.parser_factory.ParserFactory

Bases: object

A factory for creating parsers. This has the capability to select the correct parser, import it, and generate an instance of it. Parsers generated from this must be a subclass of base_parser.Parser

static create_parser(filename)

Inspect the input and create a parser that matches the required file.


filename (string) – The path to the file to be parsed


Parser for the problem

Return type

fitbenchmarking.parsing.base_parser.Parser subclass

fitbenchmarking.parsing.parser_factory.parse_problem_file(prob_file, options)

Loads the problem file into a fitting problem using the correct parser.


problem object with fitting information

Return type