Skip to content
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

Activate GLIFTOPT for use in Pyaction and add warning for required keywords #4398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lisajulia
Copy link
Contributor

@lisajulia lisajulia commented Dec 29, 2024

Depends on OPM/opm-simulators#5831 and OPM/opm-tests#1271.

With this PR, the keyword GLIFTOPT is activated for the use in a PYACTION.
Since GLIFTOPT needs the keyword LIFTOPT before, I've added a warning:
When a keywords that requires other keywords is inserted via a PYACTION, the warning
Opm::OpmLog::warning("Attention, the keyword " + keyword.name() + " needs the keyword " + requiredKeyword + " before.");
about the required keywords is added.
I've chosen this, since there is no way to access the keywords that have already been processed from inside the PYACTION.

@lisajulia
Copy link
Contributor Author

jenkins build this opm-simulators=5831 opm-tests=1271 please

Copy link
Member

@blattms blattms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need to discuss his as there might be hard to detect or undetectable input errors.

@@ -1,7 +1,11 @@
#include <ctime>
#include <chrono>
#include <map>
#include <iostream>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed. Please remove.

@@ -151,10 +155,16 @@ namespace {
std::vector<std::unique_ptr<DeckKeyword>> parseKeywords(const std::string& deck_string, const UnitSystem& unit_system)
{
Parser parser;
ParseContext parseContext;
parseContext.update(ParseContext::PARSE_INVALID_KEYWORD_COMBINATION , InputErrorAction::IGNORE );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain how this behaves if there is such an error. Is there any side effect on the python bindings?

I think we should have a test for at least one of those errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants