Skip to content

Allow concat of history and summary obs#12674

Merged
SAKavli merged 5 commits intoequinor:mainfrom
SAKavli:allow-concat-of-history-and-summary-obs
Jan 20, 2026
Merged

Allow concat of history and summary obs#12674
SAKavli merged 5 commits intoequinor:mainfrom
SAKavli:allow-concat-of-history-and-summary-obs

Conversation

@SAKavli
Copy link
Contributor

@SAKavli SAKavli commented Jan 19, 2026

Issue
Resolves #12620

Will squash partially or completely

This applies to Summary and History observations - as these are
strictly speaking the same type.
As they are concatinated, we need their dataframe to be of same
width.
This allows SummaryObservations and HistoryObservations
to be concatinated to a single table - as this requires
the same column-type.
@SAKavli SAKavli force-pushed the allow-concat-of-history-and-summary-obs branch from 8c88bd1 to 2b9b7a4 Compare January 19, 2026 14:47
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.64%. Comparing base (f0d9de4) to head (e5d51b0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12674      +/-   ##
==========================================
- Coverage   90.68%   90.64%   -0.04%     
==========================================
  Files         429      430       +1     
  Lines       29808    29814       +6     
==========================================
- Hits        27030    27026       -4     
- Misses       2778     2788      +10     
Flag Coverage Δ
cli-tests 37.55% <23.07%> (-0.02%) ⬇️
gui-tests 69.34% <23.07%> (-0.02%) ⬇️
performance-and-unit-tests 73.93% <100.00%> (-0.01%) ⬇️
test 38.06% <7.69%> (-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 Jan 19, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing SAKavli:allow-concat-of-history-and-summary-obs (e5d51b0) with main (f0d9de4)

Summary

✅ 22 untouched benchmarks

@SAKavli SAKavli requested a review from Copilot January 20, 2026 07:14
@SAKavli SAKavli added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Jan 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds location-related fields (location_x, location_y, location_range) to observation dataframes to enable concatenation of history and summary observations. The changes include a storage migration (to version 22), updates to observation creation logic, and comprehensive test coverage.

Changes:

  • Adds three location fields with Float32 dtype and None defaults to both history and summary observations
  • Implements storage migration to22 for backward compatibility
  • Updates observation creation to consistently include location fields
  • Adds tests for migration and new functionality

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ert/storage/migration/to22.py New migration adding location fields to existing summary observations
src/ert/storage/local_storage.py Storage version bump to 22 and migration registration
src/ert/config/_create_observation_dataframes.py Updated observation creation to include location fields
tests/ert/unit_tests/storage/migration/test_to22.py Migration tests covering various scenarios
tests/ert/unit_tests/config/test_summary_config.py Tests for location field handling
Snapshot files (3 files) Updated snapshots with new location fields

@SAKavli SAKavli force-pushed the allow-concat-of-history-and-summary-obs branch from d65c0c2 to e5d51b0 Compare January 20, 2026 07:48
@SAKavli SAKavli requested a review from eivindjahren January 20, 2026 08:25
Copy link
Contributor

@eivindjahren eivindjahren 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! Difficult to be sure about these snapshots, but they only add location info so it is rather minor.

@SAKavli SAKavli merged commit 7238d60 into equinor:main Jan 20, 2026
35 checks passed
@scout-team-app
Copy link

Backport failed for version-19.0, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin version-19.0
git worktree add -d .worktree/backport-12674-to-version-19.0 origin/version-19.0
cd .worktree/backport-12674-to-version-19.0
git switch --create backport-12674-to-version-19.0
git cherry-pick -x 7238d60a03af865889e22d8d61f62471e103a450

github-actions bot pushed a commit that referenced this pull request Jan 27, 2026
* Add default Null localization values

This applies to Summary and History observations - as these are
strictly speaking the same type.
As they are concatinated, we need their dataframe to be of same
width.

* Consistently use pl.Float32 for localization

This allows SummaryObservations and HistoryObservations
to be concatinated to a single table - as this requires
the same column-type.

* Update snapshots

* Create storage migration

(cherry picked from commit 7238d60)
@scout-team-app
Copy link

Successfully created backport PR for version-19.0:

SAKavli added a commit that referenced this pull request Jan 27, 2026
* Add default Null localization values

This applies to Summary and History observations - as these are
strictly speaking the same type.
As they are concatinated, we need their dataframe to be of same
width.

* Consistently use pl.Float32 for localization

This allows SummaryObservations and HistoryObservations
to be concatinated to a single table - as this requires
the same column-type.

* Update snapshots

* Create storage migration

(cherry picked from commit 7238d60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport version-19.0 release-notes:bug-fix Automatically categorise as bug fix in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot have some summary/history observations with location keywords if others don't

4 participants