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

Simplify tests and remove uncessary config files everest/mathfunc #9434

Conversation

StephanDeHoop
Copy link
Contributor

@StephanDeHoop StephanDeHoop commented Dec 3, 2024

Issue
Resolves #9210

Approach
Simplify tests and remove unnecessary config files in everest/math_func. Since (#9357) was a complete overkill will close that PR and work on this one. For the life of me I am struggling to remove either config_remove_run_path or config_fm_failure since they are completely the same except the fail argument. However, when I try to read config_remove_run_path and replace the config.forward_model with ["toggle_failure --fail simulation_2"] and set the log_level to info the tests keeps failing and I don't understand why.

NOTE: Test coverage should not have changed with this PR, only the number of config files that we check into our repository has been drastically reduced and some tests should be a bit more explicit in what they are testing.

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@StephanDeHoop StephanDeHoop added release-notes:skip If there should be no mention of this in release notes everest labels Dec 3, 2024
@StephanDeHoop StephanDeHoop self-assigned this Dec 3, 2024
Copy link
Collaborator

@oyvindeide oyvindeide left a comment

Choose a reason for hiding this comment

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

This looks like a good direction! Removes a lot of duplication, and makes maintenance easier! I had a comment to one of the tests, we might be able to make some of the tests even more targeted.

tests/everest/test_detached.py Outdated Show resolved Hide resolved
@StephanDeHoop StephanDeHoop force-pushed the simplify_tests_and_remove_uncessary_config_files_everest_mathfunc branch from e7ce1fa to fd02364 Compare December 16, 2024 10:21
Copy link

codspeed-hq bot commented Dec 16, 2024

CodSpeed Performance Report

Merging #9434 will not alter performance

Comparing StephanDeHoop:simplify_tests_and_remove_uncessary_config_files_everest_mathfunc (2f31e1c) with main (9ba5a28)

Summary

✅ 24 untouched benchmarks

@StephanDeHoop StephanDeHoop marked this pull request as ready for review December 17, 2024 13:27
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.85%. Comparing base (bc8be8f) to head (2f31e1c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9434      +/-   ##
==========================================
- Coverage   91.87%   91.85%   -0.02%     
==========================================
  Files         433      433              
  Lines       26778    26788      +10     
==========================================
+ Hits        24601    24607       +6     
- Misses       2177     2181       +4     
Flag Coverage Δ
cli-tests 39.74% <ø> (-0.01%) ⬇️
everest-models-test 34.56% <ø> (-0.02%) ⬇️
gui-tests 72.10% <ø> (-0.05%) ⬇️
integration-test 37.27% <ø> (+0.08%) ⬆️
performance-tests 51.94% <ø> (-0.02%) ⬇️
test 40.63% <ø> (-0.07%) ⬇️
unit-tests 74.19% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@StephanDeHoop StephanDeHoop force-pushed the simplify_tests_and_remove_uncessary_config_files_everest_mathfunc branch from 574f2cf to 006fcd4 Compare December 19, 2024 12:27
@StephanDeHoop
Copy link
Contributor Author

Will squash commits after review.

Copy link
Contributor

@verveerpj verveerpj left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I have one question you may need to resolve before merging?

tests/everest/test_everlint.py Outdated Show resolved Hide resolved
@StephanDeHoop StephanDeHoop force-pushed the simplify_tests_and_remove_uncessary_config_files_everest_mathfunc branch from 0f2eab1 to 2f31e1c Compare December 19, 2024 16:32
@StephanDeHoop StephanDeHoop merged commit e644496 into equinor:main Dec 19, 2024
41 checks passed
@StephanDeHoop StephanDeHoop deleted the simplify_tests_and_remove_uncessary_config_files_everest_mathfunc branch December 19, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
christmas-review everest release-notes:skip If there should be no mention of this in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up math func folder
5 participants