From b6c9b20c13939529147e9af047ae7f64d9e1a866 Mon Sep 17 00:00:00 2001 From: BillSenior Date: Mon, 10 Aug 2026 17:03:37 +0200 Subject: [PATCH 1/3] GRIDEDIT-2298 Added a test with some output to determine behaviour --- tests/test_mesh2d_basics.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_mesh2d_basics.py b/tests/test_mesh2d_basics.py index 645a2c2a..5aa90f79 100644 --- a/tests/test_mesh2d_basics.py +++ b/tests/test_mesh2d_basics.py @@ -2595,3 +2595,25 @@ def test_mesh2d_casulli_refinement_based_on_depths(): # new mesh has more nodes and edges than the starting mesh, it has been refined assert len(mesh2d_not_refined.node_x) == 121 assert len(mesh2d_refined.node_x) == 253 + +def test_mesh2d_compute_orthogonality(): + lon_min, lon_max, lat_min, lat_max = 1, 2, 48.5, 49.2 + dxy = 0.7 + make_grid_parameters = MakeGridParameters( + origin_x=lon_min, + origin_y=lat_min, + upper_right_x=lon_max, + upper_right_y=lat_max, + block_size_x=dxy, + block_size_y=dxy, + ) + mk = MeshKernel(projection=ProjectionType.SPHERICAL) + mk.curvilinear_compute_rectangular_grid_on_extension(make_grid_parameters) + mk.curvilinear_convert_to_mesh2d() #convert to ugrid/mesh2d + + edge_orthogonality = mk.mesh2d_get_property(mesh2d_location=Mesh2dLocation.EDGES, property=Mesh2d.Property.ORTHOGONALITY) + + # xy coordinates of orthogonality property contains invalid values + print(edge_orthogonality.x_coordinates) + print(edge_orthogonality.y_coordinates) + print(edge_orthogonality.values) From 999c9bef227f9c40abb8065bd191683858c6e057 Mon Sep 17 00:00:00 2001 From: Bill Senior Date: Tue, 11 Aug 2026 09:50:48 +0200 Subject: [PATCH 2/3] GRIDEDIT-2298 Added flag to print all output during test --- .github/workflows/build-and-test-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-workflow.yml b/.github/workflows/build-and-test-workflow.yml index 52f99d9b..782bc620 100644 --- a/.github/workflows/build-and-test-workflow.yml +++ b/.github/workflows/build-and-test-workflow.yml @@ -102,7 +102,7 @@ jobs: run: | wheel_name=$(find ./dist -name "meshkernel-*-macosx_*.whl") python -m pip install $wheel_name - pytest ./tests + pytest -s ./tests # Step: Upload artifact - name: Upload artifact From a69982772ad4bbb541b7d29dc3143d881c54f6ff Mon Sep 17 00:00:00 2001 From: Bill Senior Date: Tue, 11 Aug 2026 10:22:01 +0200 Subject: [PATCH 3/3] GRIDEDIT-2298 Added flag to print all output during test --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index aa7e7666..1372e264 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,5 @@ [tool.isort] profile = "black" multi_line_output = 3 +[tool.pytest.ini_options] +addopts = "-s"