From 449ff3525ffc22c9f2071d791d16fb5124a83800 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Mon, 30 Oct 2023 10:45:42 +0000 Subject: [PATCH] autoformat: isort & black --- hydrolib/core/dflowfm/net/reader.py | 6 +++--- tests/dflowfm/test_net.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hydrolib/core/dflowfm/net/reader.py b/hydrolib/core/dflowfm/net/reader.py index 8999a8475..946797c9a 100644 --- a/hydrolib/core/dflowfm/net/reader.py +++ b/hydrolib/core/dflowfm/net/reader.py @@ -84,9 +84,9 @@ def read_mesh2d(self, mesh2d: Mesh2d) -> None: # Read mesh1d for meshkey, nckey in self._explorer.mesh2d_var_name_mapping.items(): setattr(mesh2d, meshkey, self._read_nc_attribute(ds[nckey])) - #TODO: replace with xugrid reader - - mesh2d._set_mesh2d() #TODO: we still require this here to sync new attrs with meshkernel instance + # TODO: replace with xugrid reader + + mesh2d._set_mesh2d() # TODO: we still require this here to sync new attrs with meshkernel instance ds.close() diff --git a/tests/dflowfm/test_net.py b/tests/dflowfm/test_net.py index efa25d5c0..b217dc891 100644 --- a/tests/dflowfm/test_net.py +++ b/tests/dflowfm/test_net.py @@ -235,8 +235,8 @@ def test_create_refine_2d(): # check fnc fnc = mesh2d.mesh2d_face_nodes assert fnc.shape == (100, 4) - assert (fnc == -2147483648).sum() == 12 # amount of triangles - + assert (fnc == -2147483648).sum() == 12 # amount of triangles + # TODO: remove plotting # _, ax = plt.subplots() # mesh2d_output = mesh2d.get_mesh2d() @@ -432,12 +432,12 @@ def test_read_net_nc_2d_without_faces(self): assert len(network._mesh2d.mesh2d_face_y) == 0 assert len(network._mesh2d.mesh2d_face_z) == 0 assert network._mesh2d.mesh2d_face_nodes.shape == (0, 0) - + assert len(network._mesh2d.mesh2d_node_x) == 238 assert len(network._mesh2d.mesh2d_node_x) == 238 assert len(network._mesh2d.mesh2d_edge_nodes) == 445 - + # test whether meshkernel instance and hydrolib mesh2d instance are consistent nnodes_internal = network._mesh2d.mesh2d_node_x.size nnodes_mk = network._mesh2d.get_mesh2d().node_x.size