Currently, the add_pattern method of the parser class has an argument cmd_names, which accepts one or multiple run object names (as, e.g., defined and used here). Storing the names of the runs inside a parser object creates an unnecessary coupling between a parser and the run(s). The parser does not need to know anything about the run(s) it should be used for.
Improvement suggestion: Remove the cmd_names argument from add_pattern and add a parsers argument to the constructor of the run class. This way, each run has an internal list containing the parser(s) to be applied to its output.
Currently, the add_pattern method of the parser class has an argument
cmd_names
, which accepts one or multiple run object names (as, e.g., defined and used here). Storing the names of the runs inside a parser object creates an unnecessary coupling between a parser and the run(s). The parser does not need to know anything about the run(s) it should be used for.Improvement suggestion: Remove the
cmd_names
argument fromadd_pattern
and add aparsers
argument to the constructor of the run class. This way, each run has an internal list containing the parser(s) to be applied to its output.