Skip to content

Commit 4e36424

Browse files
committed
fixup! Add RFT QC tool
1 parent e76044c commit 4e36424

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/ert/gui/tools/manage_experiments/rft_qc_widget.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,7 +1691,7 @@ def _fmt(v: Any) -> str:
16911691
if v is None:
16921692
return ""
16931693
if isinstance(v, float):
1694-
return f"{v:.4g}"
1694+
return f"{v:.6g}"
16951695
if isinstance(v, list):
16961696
return ", ".join(str(x) for x in v)
16971697
return html.escape(str(v))
@@ -1767,7 +1767,7 @@ def _obs_coords(row: dict[str, Any]) -> str | None:
17671767
)
17681768
if None in obs_location:
17691769
return None
1770-
return ",".join([str(x) for x in obs_location])
1770+
return ",".join([_fmt(x) for x in obs_location])
17711771

17721772
ijk_coordinates = (
17731773
(
@@ -1778,8 +1778,9 @@ def _obs_coords(row: dict[str, Any]) -> str | None:
17781778
if well_connection_cell is not None
17791779
else "Not in grid"
17801780
)
1781-
utm_coordinates = (
1782-
f"{point.get('east')}, {point.get('north')}, {point.get('tvd')}"
1781+
1782+
utm_coordinates = ",".join(
1783+
[_fmt(x) for x in (point.get("east"), point.get("north"), point.get("tvd"))]
17831784
)
17841785

17851786
point_details_html = ""

tests/ert/ui_tests/gui/test_rft_qc_widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ def test_that_selecting_point_shows_point_details(qtbot):
10721072
Observation: 10
10731073
Response: 11
10741074
Response Depth: 1.1
1075-
Observation Coordinates: 1.0,1.0,1.0
1075+
Observation Coordinates: 1,1,1
10761076
Error: 5
10771077
Expected Zone: zone1
10781078
Status: Observation with response
@@ -1093,7 +1093,7 @@ def test_that_selecting_point_shows_point_details(qtbot):
10931093
Observation: 13
10941094
Response: 14
10951095
Response Depth: 2.1
1096-
Observation Coordinates: 1.0,1.0,2.0
1096+
Observation Coordinates: 1,1,2
10971097
Error: 5
10981098
Expected Zone: zone2
10991099
Status: Observation with response

0 commit comments

Comments
 (0)