swfunction Add new method for height above FFL and refactoring - #300
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new method for calculating height above free fluid level (FFL) called "truncated_cell_corners_above_ffl" and introduces a breaking change by refactoring the API to return multiple properties instead of just the saturation value.
Key changes:
- Add support for "truncated_cell_corners_above_ffl" method in calculations
- Change
compute()method to return a tuple of 4 properties (SW, HTOP, HBOT, HCENTER) instead of just SW - Remove debug mode functionality and parameters
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/fmu/tools/properties/swfunction.py |
Updated API to return tuple of properties, removed debug functionality, added new method support |
tests/properties/test_swfunction.py |
Updated test calls to use tuple indexing and added test cases for new method |
docs/properties.rst |
Updated documentation example to use new tuple return format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
870ce44 to
f3952a2
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
jcrivenaes
left a comment
There was a problem hiding this comment.
Cf. comment on return a dict in stead of tuple; otherwise LGTM
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| def compute( | ||
| self, compute_method: str = "integrated" | ||
| ) -> dict[str, xtgeo.GridProperty]: |
There was a problem hiding this comment.
This is a breaking change to the public API. The method now returns a dictionary instead of a single GridProperty. Consider documenting this breaking change more prominently or providing a deprecation path for existing users.
swfunctionshould let users handle the properties themselves. Note: This is breaking change.