Skip to content

Commit b7bf4d9

Browse files
authored
GRIDEDIT-1343: remove macOS 12, use macOS 14 in GitHub workflows (#200)
1 parent ecf73ad commit b7bf4d9

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

.github/workflows/build-and-test-feature-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
platform:
23-
- macos-12 # x86_64 (free)
23+
- macos-13 # x86_64 (free)
2424
- macos-14 # arm64 (free)
2525
build_type:
2626
- Release

.github/workflows/build-and-test-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
platform:
22-
- macos-12 # x86_64 (free)
2322
- macos-13 # x86_64 (free)
2423
- macos-13-xlarge # arm64 (billable)
2524
- macos-14 # arm64 (free)

meshkernel/meshkernel.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,40 +1648,36 @@ def mesh2d_get_orthogonality(self) -> GeometryList:
16481648

16491649
return geometry_list_out
16501650

1651-
def mesh2d_get_property(self, property: Mesh2d.Property) -> GeometryList:
1651+
def mesh2d_get_property(
1652+
self, mesh2d_location: Mesh2dLocation, property: Mesh2d.Property
1653+
) -> GeometryList:
16521654
"""Gets the polygons matching the metric value within the minimum and maximum value.
1653-
16541655
Args:
1655-
1656+
mesh2d_location (Mesh2dLocation): Location of the property
16561657
property (Mesh2d.Property): The property to retrieve
1657-
16581658
Returns:
16591659
GeometryList: The resulting geometry list containing the value of the properties
16601660
"""
1661-
16621661
c_geometry_list_dimension = c_int()
1663-
16641662
self._execute_function(
16651663
self.lib.mkernel_mesh2d_get_property_dimension,
16661664
self._meshkernelid,
16671665
c_int(property),
16681666
byref(c_geometry_list_dimension),
16691667
)
1670-
16711668
n_coordinates = c_geometry_list_dimension.value
16721669
x_coordinates = np.empty(n_coordinates, dtype=np.double)
16731670
y_coordinates = np.empty(n_coordinates, dtype=np.double)
16741671
values = np.empty(n_coordinates, dtype=np.double)
1675-
16761672
property_list = GeometryList(
16771673
x_coordinates=x_coordinates, y_coordinates=y_coordinates, values=values
16781674
)
16791675
c_property_list = CGeometryList.from_geometrylist(property_list)
1680-
16811676
self._execute_function(
16821677
self.lib.mkernel_mesh2d_get_property,
16831678
self._meshkernelid,
16841679
c_int(property),
1680+
c_int(mesh2d_location.value),
16851681
byref(c_property_list),
16861682
)
16871683

scripts/install_deps.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ scl enable "${DEVTOOLSET}" bash || error "[scl] Failed to enable ${DEVTOOLSET}"
5151
# install boost
5252
BOOST_LIB=boost_"${BOOST_VERSION//./_}"
5353
# Official mirror
54-
BOOST_MIRROR=https://boostorg.jfrog.io/artifactory/main/release/"${BOOST_VERSION}"/source/"${BOOST_LIB}".tar.gz
54+
# BOOST_MIRROR=https://boostorg.jfrog.io/artifactory/main/release/"${BOOST_VERSION}"/source/"${BOOST_LIB}".tar.gz
5555
# Alternative mirror to use if the official mirror is down
5656
# BOOST_MIRROR=https://mirror.bazel.build/boostorg.jfrog.io/artifactory/main/release/"${BOOST_VERSION}"/source/"${BOOST_LIB}".tar.gz
57+
# sourceforge
58+
BOOST_MIRROR=https://sourceforge.net/projects/boost/files/boost/"${BOOST_VERSION}"/"${BOOST_LIB}".tar.gz
5759
wget "${BOOST_MIRROR}" || error "[boost] ${BOOST_LIB}.tar.gz download failed"
5860
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64:"$LD_LIBRARY_PATH"
5961
tar -xzf "${BOOST_LIB}".tar.gz || error "[boost] ${BOOST_LIB}.tar.gz extraction failed"

tests/test_curvilinear_basics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ def test_curvilinear_line_attraction_repulsion():
548548
# Get the result
549549
curvilinear_grid = mk.curvilineargrid_get()
550550

551-
# Test a node on the third grid line was shifted from 20 to 15
552-
assert curvilinear_grid.node_x[2] == 15.0
551+
# Test a node on the third grid line was shifted from 20 to 25
552+
assert curvilinear_grid.node_x[2] == 25.0
553553

554554

555555
def test_curvilinear_line_mirror():

tests/test_mesh2d_basics.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ def test_mesh2d_make_global():
660660
mk.mesh2d_make_global(num_longitude_nodes, num_latitude_nodes)
661661
mesh2d = mk.mesh2d_get()
662662

663-
assert mesh2d.edge_x.size == 1233
664-
assert mesh2d.node_x.size == 629
663+
assert mesh2d.edge_x.size == 1225
664+
assert mesh2d.node_x.size == 621
665665

666666

667667
def test_mesh2d_make_global_with_cartesian_coordinates_should_throw():
@@ -2311,6 +2311,7 @@ def test_mesh2d_deletion_and_get_orthogonality(
23112311
cases_get_property = [
23122312
(
23132313
Mesh2d.Property.ORTHOGONALITY,
2314+
Mesh2dLocation.EDGES,
23142315
np.array(
23152316
[
23162317
-999.0,
@@ -2343,6 +2344,7 @@ def test_mesh2d_deletion_and_get_orthogonality(
23432344
),
23442345
(
23452346
Mesh2d.Property.EDGE_LENGTHS,
2347+
Mesh2dLocation.EDGES,
23462348
np.array(
23472349
[
23482350
100.0,
@@ -2377,20 +2379,21 @@ def test_mesh2d_deletion_and_get_orthogonality(
23772379

23782380

23792381
@pytest.mark.parametrize(
2380-
"property, expected_values",
2382+
"property, location, expected_values",
23812383
cases_get_property,
23822384
)
23832385
def test_mesh2d_get_property(
23842386
meshkernel_with_mesh2d: MeshKernel,
23852387
property: Mesh2d.Property,
2388+
location: Mesh2dLocation,
23862389
expected_values: ndarray,
23872390
):
23882391
"""Test mesh2d_get_property,
23892392
getting the mesh2d property values
23902393
"""
23912394
mk = meshkernel_with_mesh2d(rows=3, columns=3, spacing_x=50.0, spacing_y=100.0)
23922395

2393-
property_list = mk.mesh2d_get_property(property)
2396+
property_list = mk.mesh2d_get_property(location, property)
23942397

23952398
assert property_list.values == approx(expected_values, abs=1e-6)
23962399

0 commit comments

Comments
 (0)