Skip to content

Refactor observation tests to stop using ErtConfig.observations#12761

Merged
eqbech merged 1 commit intoequinor:mainfrom
eqbech:update-tests-to-no-longer-use-ertconfig-observations
Feb 4, 2026
Merged

Refactor observation tests to stop using ErtConfig.observations#12761
eqbech merged 1 commit intoequinor:mainfrom
eqbech:update-tests-to-no-longer-use-ertconfig-observations

Conversation

@eqbech
Copy link
Contributor

@eqbech eqbech commented Feb 2, 2026

Issue
Resolves #12751

Approach
Refactored a couple of tests to utilize make_observation and create_observation_dataframe instead of the ErtConfig.observations property. The helper function make_observation inside test_observations.py has been renamed to ert_config_from_parser and changed to now only parse obs config via parse_observations.

@eqbech eqbech added the release-notes:skip If there should be no mention of this in release notes label Feb 2, 2026
@eqbech eqbech requested a review from yngve-sk February 2, 2026 13:16
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.71%. Comparing base (ee41291) to head (9e317fb).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12761      +/-   ##
==========================================
+ Coverage   90.68%   90.71%   +0.02%     
==========================================
  Files         433      434       +1     
  Lines       30239    30243       +4     
==========================================
+ Hits        27422    27434      +12     
+ Misses       2817     2809       -8     
Flag Coverage Δ
cli-tests 37.16% <100.00%> (+<0.01%) ⬆️
gui-tests 68.54% <100.00%> (+<0.01%) ⬆️
performance-and-unit-tests 77.11% <100.00%> (+0.02%) ⬆️
test 37.47% <50.00%> (+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.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 2, 2026

Merging this PR will not alter performance

✅ 23 untouched benchmarks


Comparing eqbech:update-tests-to-no-longer-use-ertconfig-observations (9e317fb) with main (c598863)

Open in CodSpeed

@eqbech eqbech requested a review from SAKavli February 2, 2026 14:03
@andreas-el andreas-el changed the title Refactor obeservation tests to stop using ErtConfig.observations Refactor observation tests to stop using ErtConfig.observations Feb 2, 2026
Copy link
Contributor

@andreas-el andreas-el left a comment

Choose a reason for hiding this comment

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

Very nice work! 🥇
Please remember to squash the commits, and make sure that any spelling errors and such are removed.

@yngve-sk
Copy link
Contributor

yngve-sk commented Feb 3, 2026

What usages of ErtConfig.observations remain? If none, you can remove the property 🎉 from ErtConfig (double check it is also not used in semeio or in other EQN repos, I'm not seeing any usages from searching our : https://github.com/search?q=org%3Aequinor%20.observations&type=code ) at least.

@andreas-el andreas-el self-requested a review February 3, 2026 12:01
@eqbech eqbech force-pushed the update-tests-to-no-longer-use-ertconfig-observations branch 2 times, most recently from 9d58ee2 to a7ee321 Compare February 3, 2026 13:13
@eqbech eqbech force-pushed the update-tests-to-no-longer-use-ertconfig-observations branch from a7ee321 to b745ea1 Compare February 3, 2026 13:53
@eqbech
Copy link
Contributor Author

eqbech commented Feb 3, 2026

What usages of ErtConfig.observations remain? If none, you can remove the property 🎉 from ErtConfig (double check it is also not used in semeio or in other EQN repos, I'm not seeing any usages from searching our : https://github.com/search?q=org%3Aequinor%20.observations&type=code ) at least.

Have removed observations from ErtConfig and updated associated tests.

@eqbech eqbech requested a review from yngve-sk February 3, 2026 14:10
@eqbech eqbech force-pushed the update-tests-to-no-longer-use-ertconfig-observations branch 5 times, most recently from 8b9b5b4 to 9439198 Compare February 4, 2026 10:58
@eqbech eqbech force-pushed the update-tests-to-no-longer-use-ertconfig-observations branch from 163d3a4 to 9e317fb Compare February 4, 2026 13:39
Copy link
Contributor

@yngve-sk yngve-sk left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

@eqbech eqbech merged commit 58dc63d into equinor:main Feb 4, 2026
35 checks passed
@eqbech eqbech deleted the update-tests-to-no-longer-use-ertconfig-observations branch February 4, 2026 14:31
erlenlh pushed a commit that referenced this pull request Feb 4, 2026
Removed obsolete observations property of ErtConfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Stop using ErtConfig.observations

4 participants