With this PR, in case for an observation either rel_error or min_error is missing an error message is given:
e.g:
data_source:
simulation:
input_case: ../input_model/egg/EGG_MODEL_ECL
vectors:
WBHP:
rel_error: 0.005
WOPR:
min_error: 1
gives the error:
_ValueError: Both min_error and relerror must be set. This requirement is not satisfied for ['WBHP', 'WOPR'] observations
In case both rel_error and min_error are absent flownet gives an error as the configuration file does not satisfy the template requirements as defined in _config_parser.py (using the configsuite module). The error message is however not very insightful:
ValueError: The configuration is not valid:Is x a dictionary is false on input 'None'.
To fix this would require to dig into the configsuite module which I park for now as it may have not a high priority.
The most important aspect of this PR is that observations are not silently skipped anymore in case of incomplete input specification.
Contributor checklist
[ ] :tada: This PR closes #409
[ ] :scroll: I have broken down my PR into the following tasks:
[ ] Task 1
[ ] Task 2
[ ] :robot: I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR.
[ ] :book: I have considered adding a new entry in CHANGELOG.md.
[ ] :books: I have considered updating the documentation.
With this PR, in case for an observation either rel_error or min_error is missing an error message is given: e.g: data_source: simulation: input_case: ../input_model/egg/EGG_MODEL_ECL vectors: WBHP: rel_error: 0.005 WOPR: min_error: 1
gives the error:
_ValueError: Both min_error and relerror must be set. This requirement is not satisfied for ['WBHP', 'WOPR'] observations
In case both rel_error and min_error are absent flownet gives an error as the configuration file does not satisfy the template requirements as defined in _config_parser.py (using the configsuite module). The error message is however not very insightful: ValueError: The configuration is not valid:Is x a dictionary is false on input 'None'. To fix this would require to dig into the configsuite module which I park for now as it may have not a high priority. The most important aspect of this PR is that observations are not silently skipped anymore in case of incomplete input specification.
Contributor checklist
CHANGELOG.md
.