You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #756, a large refactoring is done to rely on a BaseParser parent class for all the parsers except PwParser, since this is a rather massive beast that is also undergoing a separate refactor in #940. Although there are still several open discussions in #756, it's better to merge this initial refactor, keeping track of these discussions so we can consider them when also integrating the BaseParser class into PwParser. This seems the better approach, since it's likely we will rethink some of our choices when we put them into the context of the PwParser.
Large refactoring of the basic parsing features to remove code duplication and
rely on regular expressions via `re` instead of iterations over lines. The main
changes are:
* The `Parser` class is renamed to `BaseParser` class to avoid confusion with
the `aiida.core` `Parser` class.
* The `BaseParser.parse_stdout_from_retrieved` method can be used by all
subclasses to obtain the `stdout`, basic parsed data and logs from retrieving
and parsing the `stdout`.
* The error and warning messages are defined as class attributes. Base error
messages are defined on the `BaseParser` class, which can be extended on the
subclasses via the `class_[error,warning]_map` attributes.
* A `BaseParser.check_base_errors()` method is added, which checks for basic
errors that indicate the `stdout` cannot be parsed for more data.
* Shared exit codes are moved to the `NamelistsCalculation` spec from that of
the subclasses.
* Several changes in the logic of returning exit codes and emitting the logs.
Some of the discussions on these topics have not been fully concluded, and will
be revisited when integrating the `BaseParser` into the `PwParser`, see:
#953
In #756, a large refactoring is done to rely on a
BaseParser
parent class for all the parsers exceptPwParser
, since this is a rather massive beast that is also undergoing a separate refactor in #940. Although there are still several open discussions in #756, it's better to merge this initial refactor, keeping track of these discussions so we can consider them when also integrating theBaseParser
class intoPwParser
. This seems the better approach, since it's likely we will rethink some of our choices when we put them into the context of thePwParser
.Below is a list of open discussions:
The text was updated successfully, but these errors were encountered: