-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revisit BaseParser
when integrating into PwParser
#953
Comments
mbercx
added a commit
that referenced
this issue
Jun 10, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: