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.

Parameters:

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

Returns:

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.

Parameters:
Returns:

problem object with fitting information

Return type:

fitbenchmarking.parsing.fitting_problem.FittingProblem