Remove clutter of configfiles in testdata mathfunc #9357
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
(will) Resolve(s) #9210
DRAFT
Tested that all generated EverestConfigs are still exactly the same as the original config files in the repository (will be removed later of course). Next step is how to replace loading the config files with using the generated EverestConfig instances. The one thing to note is: we need to specify a
config_path
since otherwise the PyDantic validation fails when we validate the model. Right now all the tests that require a config file are copying (recursively) the math_func sub-directory in /test-data/everest. After we remove all the config files except minimal, when we copy we could then overwrite this file with our generated EverestConfig instance and set the config_path? Because as far as I understand the code now, the config file need to exists in order to succeed with the PyDantic validation. Further steps can be (might have been a good starting point too, but with my limited understanding of Everest I found it a bit too abstract to start from there): what are the tests that use the config files actually testing? Can we do away with some of the config files? Or are they necessary to have large testing coverage of all Everest functionality?PS: reason why I didn't go for modifying one existing yaml file and instead building/generating them from dicts was that some configs contain different values for some parameters and it wasn't as simple as just inserting new lines here in there (would have to replace substrings in the existing one as well as adding them). Maybe in retrospect I should have read the yaml as a string and just replace sub-strings and write the final string back to the file? My current solution seemed cleaner, but maybe it is overkill?
Approach
Short description of the approach
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"'
)When applicable