Skip to content

Added date argument in prtvol2csv (#712)#850

Merged
lilbe66 merged 1 commit intoequinor:mainfrom
lilbe66:prtvol2csv_dates2
Apr 27, 2026
Merged

Added date argument in prtvol2csv (#712)#850
lilbe66 merged 1 commit intoequinor:mainfrom
lilbe66:prtvol2csv_dates2

Conversation

@lilbe66
Copy link
Copy Markdown
Contributor

@lilbe66 lilbe66 commented Feb 13, 2026

Closes #712

  • Added date argument to prtvol2csv.py, to extract volumes from PRT file at the specified date
  • Included function to search for report date in PRT file
  • Check that a volume report exists at the specified date
  • Check that the date provided has ISO 8601 format, or one of the strings "first" and "last"
  • Updated the ERT forward model for prtvol2csv with a date argument
  • Updated the documentation (Subscript, ERT)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 92.47312% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.51%. Comparing base (e949b0d) to head (5dadeb8).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/subscript/prtvol2csv/prtvol2csv.py 92.39% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #850      +/-   ##
==========================================
+ Coverage   83.52%   84.51%   +0.98%     
==========================================
  Files          49       49              
  Lines        7279     7349      +70     
==========================================
+ Hits         6080     6211     +131     
+ Misses       1199     1138      -61     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

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 pull request adds functionality to extract volumes from PRT files at a specified date by introducing a --date argument to the prtvol2csv tool. The changes allow users to specify either an ISO-8601 formatted date (YYYY-MM-DD) or the strings "first" or "last" to select which BALANCE report to extract volumes from.

Changes:

  • Added date argument support with validation for ISO-8601 format or "first"/"last" keywords
  • Modified function signatures to return additional date information
  • Added helper functions for date parsing and validation from PRT files
  • Enhanced test coverage with new test cases and test data

Reviewed changes

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

Show a summary per file
File Description
src/subscript/prtvol2csv/prtvol2csv.py Core implementation: added date parameter, date parsing functions, and modified return types to include date information
tests/test_prtvol2csv.py Added comprehensive tests for date parsing, validation, and command-line usage with date argument
src/subscript/rmsecl_volumetrics/rmsecl_volumetrics.py Updated to handle new tuple return type from currently_in_place_from_prt
tests/testdata_prtvol2csv/DROGON_NOBAL_FLOW.PRT New test data file for Flow PRT files without BALANCE reports
tests/testdata_prtvol2csv/0readme.txt Documentation of test data files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Copy link
Copy Markdown

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 5 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread tests/test_prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
Comment thread src/subscript/prtvol2csv/prtvol2csv.py
Comment thread src/subscript/prtvol2csv/prtvol2csv.py Outdated
@lilbe66 lilbe66 marked this pull request as ready for review March 16, 2026 13:53
@lilbe66 lilbe66 requested a review from rnyb March 16, 2026 13:54
Comment thread src/subscript/hook_implementations/forward_model_steps.py Outdated
@alifbe alifbe force-pushed the prtvol2csv_dates2 branch from d4c9f2e to c879166 Compare April 22, 2026 10:30
@alifbe alifbe requested review from rnyb and removed request for rnyb April 22, 2026 10:50
Comment thread docs/scripts/prtvol2csv.rst Outdated
@lilbe66 lilbe66 force-pushed the prtvol2csv_dates2 branch from c879166 to 5dadeb8 Compare April 25, 2026 12:19
@lilbe66 lilbe66 requested review from alifbe and rnyb April 25, 2026 12:30
Copy link
Copy Markdown
Collaborator

@rnyb rnyb left a comment

Choose a reason for hiding this comment

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

LGTM

@lilbe66 lilbe66 merged commit 3317bd1 into equinor:main Apr 27, 2026
6 checks passed
@lilbe66 lilbe66 deleted the prtvol2csv_dates2 branch April 27, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prtvol2csv - Allow to specify date in PRT file to extract volume report from

5 participants