Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Raise userwarning if workflows can't be run #520

Conversation

lars-petter-hauge
Copy link
Contributor

@lars-petter-hauge lars-petter-hauge commented Feb 27, 2019

Issue
If a workflow configuration was invalid, libres would not raise any warning.

This does not completely solve issue: equinor/ert#194, but it improves.

Handling issue 194 involves a bit more, e.g. if the config file is to include a stdout/stderror like the forward models, then parsing the file must be updated. It remains to find out if that is worth doing in c (as it is now), or if we should implement parsing yml config in python while retaining the old parsing for backwards compatibility.

@ghost ghost added the in progress label Feb 27, 2019
@lars-petter-hauge lars-petter-hauge changed the title Raise userwarning if workflows can't be run WIP: Raise userwarning if workflows can't be run Feb 27, 2019
@lars-petter-hauge
Copy link
Contributor Author

lars-petter-hauge commented Feb 27, 2019

Need to do some more checking before this is merged; e.g. if a workflow raises error in between iterations, do we want complete stop? Believe so, but not completely sure.

@lars-petter-hauge
Copy link
Contributor Author

So, new suggestion for the implementation -> write to sys.stderror instead, so similar error handling as if the runpath_list_file does not exist.

@lars-petter-hauge
Copy link
Contributor Author

So now I think this is in the proper place. I moved it from HookManager, as it's more suited within the workflow itself, closer to where it actually happends.

Also if one wants to use Workflow on it's own it should be able to raise the warning.

@lars-petter-hauge lars-petter-hauge changed the title WIP: Raise userwarning if workflows can't be run Raise userwarning if workflows can't be run Feb 28, 2019
Copy link
Contributor

@ManInFez ManInFez left a comment

Choose a reason for hiding this comment

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

LGTM

@lars-petter-hauge lars-petter-hauge merged commit 516fbf7 into equinor:master Mar 1, 2019
@ghost ghost removed the in progress label Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants