Skip to content

Add gather_summary_observations cli command#13625

Merged
SAKavli merged 11 commits into
equinor:mainfrom
SAKavli:create-obs-summary-key-endpoint
May 29, 2026
Merged

Add gather_summary_observations cli command#13625
SAKavli merged 11 commits into
equinor:mainfrom
SAKavli:create-obs-summary-key-endpoint

Conversation

@SAKavli
Copy link
Copy Markdown
Contributor

@SAKavli SAKavli commented May 22, 2026

No description provided.

@SAKavli SAKavli added this to SCOUT May 22, 2026
@SAKavli SAKavli moved this to In Progress in SCOUT May 26, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 26, 2026

Codecov Report

❌ Patch coverage is 23.50000% with 153 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.21%. Comparing base (cc26b7e) to head (91fa806).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/ert/gather_summary_observations.py 23.56% 146 Missing ⚠️
src/ert/__main__.py 25.00% 6 Missing ⚠️
src/ert/services/_storage_main.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13625      +/-   ##
==========================================
- Coverage   89.57%   89.21%   -0.37%     
==========================================
  Files         466      469       +3     
  Lines       32962    33257     +295     
==========================================
+ Hits        29526    29670     +144     
- Misses       3436     3587     +151     
Flag Coverage Δ
cli-tests 35.56% <23.50%> (-0.14%) ⬇️
fuzz 43.76% <23.50%> (-0.16%) ⬇️
gui-tests 59.47% <23.50%> (-0.30%) ⬇️
performance-and-unit-tests 77.83% <23.50%> (-0.26%) ⬇️
test 45.08% <0.00%> (-0.31%) ⬇️

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

Files with missing lines Coverage Δ
src/ert/services/_storage_main.py 44.18% <0.00%> (-0.26%) ⬇️
src/ert/__main__.py 85.90% <25.00%> (-1.65%) ⬇️
src/ert/gather_summary_observations.py 23.56% <23.56%> (ø)

... and 7 files with indirect coverage changes

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 26, 2026

Merging this PR will not alter performance

✅ 36 untouched benchmarks


Comparing SAKavli:create-obs-summary-key-endpoint (91fa806) with main (332dd15)

Open in CodSpeed

@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch 7 times, most recently from 9af1dfa to 2e078e8 Compare May 27, 2026 13:00
@SAKavli SAKavli requested a review from Copilot May 27, 2026 14:01
Copy link
Copy Markdown
Contributor

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

Adds an experimental gather_summary_observations CLI command for extracting summary observations from ERT storage into a CSV file.

Changes:

  • Adds the new CLI command behind ERT_FEATURE_GATHER_OBS.
  • Implements summary-key parsing, storage API startup/access, experiment selection, and CSV export.
  • Adds UI tests for feature-flag behavior, CSV generation, and interactive experiment selection.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
src/ert/__main__.py Registers the experimental gather_summary_observations subcommand.
src/ert/gather_summary_observations.py Implements API startup, observation extraction, summary-key conversion, and CSV output.
src/ert/services/_storage_main.py Logs the served storage directory for API startup discovery.
tests/ert/ui_tests/cli/test_gather_sumary_observations.py Adds CLI tests for the new command.

Comment thread src/ert/gather_summary_observations.py
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread tests/ert/ui_tests/cli/test_gather_sumary_observations.py Outdated
Comment thread tests/ert/ui_tests/cli/test_gather_sumary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py
@SAKavli SAKavli moved this from In Progress to Ready for Review in SCOUT May 27, 2026
@SAKavli SAKavli self-assigned this May 27, 2026
@SAKavli SAKavli added the release-notes:unreleased-feature-changes PR with changes to a feature which is not yet released. Not for introduction of new features! label May 27, 2026
@SAKavli SAKavli marked this pull request as ready for review May 27, 2026 15:10
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py Outdated
Copy link
Copy Markdown
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.

There is a couple of things we should probably fix up a little bit before we merge, but other than that there is no need to delay too much as this is behind a featureflag.

Comment thread src/ert/gather_summary_observations.py Outdated
@SAKavli SAKavli moved this from Ready for Review to In Progress in SCOUT May 28, 2026
@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch 3 times, most recently from b26d668 to 8704133 Compare May 28, 2026 09:00
@SAKavli
Copy link
Copy Markdown
Contributor Author

SAKavli commented May 28, 2026

I am planning on squashing this into a single commit.

To enable distance based localization, this command will help
gather well names from summary keys to streamline an automated
collection of well metadata.
SAKavli added 5 commits May 28, 2026 11:20
On macos there is an issue with the dns where the storage stores
two potential urls for the storage api, where only one works.

This change will ping all listed urls and select the first one with
a 200 response.
We try to avoid that dependency
Also includes small fixups in code
@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch 2 times, most recently from 461fde0 to 6200c69 Compare May 28, 2026 09:31
@SAKavli SAKavli requested a review from Copilot May 28, 2026 10:32
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py
@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch 2 times, most recently from 0d76105 to f93952d Compare May 28, 2026 13:00
@SAKavli SAKavli requested a review from Copilot May 28, 2026 13:01
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread src/ert/gather_summary_observations.py
Comment thread src/ert/gather_summary_observations.py Outdated
Comment thread src/ert/gather_summary_observations.py
@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch 5 times, most recently from aaa4855 to d589bea Compare May 28, 2026 13:48
Also added error handling
@SAKavli SAKavli force-pushed the create-obs-summary-key-endpoint branch from d589bea to d63e3d2 Compare May 28, 2026 13:51
@SAKavli SAKavli moved this from In Progress to Ready for Review in SCOUT May 28, 2026
@SAKavli SAKavli requested a review from eivindjahren May 28, 2026 14:17
Copy link
Copy Markdown
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.

🇨🇻

@github-project-automation github-project-automation Bot moved this from Ready for Review to Reviewed in SCOUT May 28, 2026
@SAKavli SAKavli merged commit 1f514fc into equinor:main May 29, 2026
81 of 83 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in SCOUT May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes:unreleased-feature-changes PR with changes to a feature which is not yet released. Not for introduction of new features!

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants