From c2f355dbacb707723c5e8fa3166a860d34af516c Mon Sep 17 00:00:00 2001 From: Luca Carniato Date: Mon, 2 Sep 2024 08:33:50 +0200 Subject: [PATCH] Rename metric to property --- meshkernel/meshkernel.py | 4 ++-- meshkernel/py_structures.py | 4 ++-- tests/test_mesh2d_basics.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meshkernel/meshkernel.py b/meshkernel/meshkernel.py index 77f91ac8..391048fd 100644 --- a/meshkernel/meshkernel.py +++ b/meshkernel/meshkernel.py @@ -460,13 +460,13 @@ def mesh2d_get_face_polygons(self, num_edges: int) -> GeometryList: return face_polygons def mesh2d_get_filtered_face_polygons( - self, filter: Mesh2d.Metric, min_value: float, max_value: float + self, filter: Mesh2d.Property, min_value: float, max_value: float ) -> GeometryList: """Gets the polygons matching the metric value within the minimum and maximum value. Args: - filter (Mesh2d.Metric): The metric used to filter the locations + filter (Mesh2d.Property): The metric used to filter the locations min_value(float): The minimum value of the metric. max_value(float): The maximum value of the metric. diff --git a/meshkernel/py_structures.py b/meshkernel/py_structures.py index 74b1c85e..6d240502 100644 --- a/meshkernel/py_structures.py +++ b/meshkernel/py_structures.py @@ -119,8 +119,8 @@ class Mesh2d: """ @unique - class Metric(IntEnum): - """Different filtering metrics on a 2D mesh.""" + class Property(IntEnum): + """Different properties on a 2D mesh.""" ORTHOGONALITY = 0 diff --git a/tests/test_mesh2d_basics.py b/tests/test_mesh2d_basics.py index 0c88ac89..5f8ce196 100644 --- a/tests/test_mesh2d_basics.py +++ b/tests/test_mesh2d_basics.py @@ -2334,7 +2334,7 @@ def test_mesh2d_get_filtered_face_polygons(): input_mesh2d = Mesh2d(node_x, node_y, edge_nodes) mk.mesh2d_set(input_mesh2d) - face_polygons = mk.mesh2d_get_filtered_face_polygons(Mesh2d.Metric.ORTHOGONALITY, 0.04, 1.0) + face_polygons = mk.mesh2d_get_filtered_face_polygons(Mesh2d.Property.ORTHOGONALITY, 0.04, 1.0) expected_coordinates_x = np.array([57.0, 49.1, 58.9, 66.7, 57.0], dtype=np.double) expected_coordinates_y = np.array([23.6, 14.0, 6.9, 16.2, 23.6], dtype=np.double)