From 41dea00128466eecb12e72a4834d8943fadfb8af Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Wed, 23 Oct 2024 14:49:29 +0200 Subject: [PATCH] replaced logger by hydromt --- hydromt_delft3dfm/gis_utils.py | 2 +- hydromt_delft3dfm/graph_utils.py | 2 +- hydromt_delft3dfm/mesh_utils.py | 2 +- hydromt_delft3dfm/workflows/boundaries.py | 2 +- hydromt_delft3dfm/workflows/branches.py | 2 +- hydromt_delft3dfm/workflows/crosssections.py | 2 +- hydromt_delft3dfm/workflows/dem.py | 2 +- hydromt_delft3dfm/workflows/manholes.py | 2 +- hydromt_delft3dfm/workflows/mesh.py | 2 +- hydromt_delft3dfm/workflows/region.py | 2 +- hydromt_delft3dfm/workflows/roughness.py | 2 +- tests/test_hydromt.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hydromt_delft3dfm/gis_utils.py b/hydromt_delft3dfm/gis_utils.py index b7c4124b..587e5d9f 100644 --- a/hydromt_delft3dfm/gis_utils.py +++ b/hydromt_delft3dfm/gis_utils.py @@ -11,7 +11,7 @@ ) from shapely.ops import snap, split -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/graph_utils.py b/hydromt_delft3dfm/graph_utils.py index 6018d111..703b8aa8 100644 --- a/hydromt_delft3dfm/graph_utils.py +++ b/hydromt_delft3dfm/graph_utils.py @@ -7,7 +7,7 @@ import pandas as pd from shapely.geometry import Point -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = ["gpd_to_digraph", "get_endnodes_from_lines"] diff --git a/hydromt_delft3dfm/mesh_utils.py b/hydromt_delft3dfm/mesh_utils.py index 60d6cdb2..ffe13961 100644 --- a/hydromt_delft3dfm/mesh_utils.py +++ b/hydromt_delft3dfm/mesh_utils.py @@ -13,7 +13,7 @@ # TODO: maybe move this function here instead of under workflows? from hydromt_delft3dfm.workflows.mesh import _set_link1d2d -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/workflows/boundaries.py b/hydromt_delft3dfm/workflows/boundaries.py index 47c11e4f..fc62c192 100644 --- a/hydromt_delft3dfm/workflows/boundaries.py +++ b/hydromt_delft3dfm/workflows/boundaries.py @@ -11,7 +11,7 @@ from hydromt_delft3dfm import graph_utils -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ "get_boundaries_with_nodeid", diff --git a/hydromt_delft3dfm/workflows/branches.py b/hydromt_delft3dfm/workflows/branches.py index 1afd3780..d726e120 100644 --- a/hydromt_delft3dfm/workflows/branches.py +++ b/hydromt_delft3dfm/workflows/branches.py @@ -16,7 +16,7 @@ from ..gis_utils import cut_pieces, split_lines -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/workflows/crosssections.py b/hydromt_delft3dfm/workflows/crosssections.py index c4964dd4..9ce7d48d 100644 --- a/hydromt_delft3dfm/workflows/crosssections.py +++ b/hydromt_delft3dfm/workflows/crosssections.py @@ -12,7 +12,7 @@ from ..gis_utils import check_gpd_attributes from .branches import find_nearest_branch, update_data_columns_attributes -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/workflows/dem.py b/hydromt_delft3dfm/workflows/dem.py index d79a7af1..2951c4a7 100644 --- a/hydromt_delft3dfm/workflows/dem.py +++ b/hydromt_delft3dfm/workflows/dem.py @@ -13,7 +13,7 @@ from scipy import ndimage from shapely.geometry import Point -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = ["invert_levels_from_dem", "get_river_bathymetry"] diff --git a/hydromt_delft3dfm/workflows/manholes.py b/hydromt_delft3dfm/workflows/manholes.py index 6fcb1e73..f029efee 100644 --- a/hydromt_delft3dfm/workflows/manholes.py +++ b/hydromt_delft3dfm/workflows/manholes.py @@ -7,7 +7,7 @@ from hydromt.gis._vector_utils import _nearest_merge from shapely.geometry import Point -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/workflows/mesh.py b/hydromt_delft3dfm/workflows/mesh.py index 89e1aaf6..dea035c2 100644 --- a/hydromt_delft3dfm/workflows/mesh.py +++ b/hydromt_delft3dfm/workflows/mesh.py @@ -24,7 +24,7 @@ from .. import mesh_utils as mutils -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = [ diff --git a/hydromt_delft3dfm/workflows/region.py b/hydromt_delft3dfm/workflows/region.py index 0d67aaca..1746be8a 100644 --- a/hydromt_delft3dfm/workflows/region.py +++ b/hydromt_delft3dfm/workflows/region.py @@ -11,7 +11,7 @@ "parse_region_geometry", ] -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") def parse_region_geometry( diff --git a/hydromt_delft3dfm/workflows/roughness.py b/hydromt_delft3dfm/workflows/roughness.py index 95a10597..cbe53d9c 100644 --- a/hydromt_delft3dfm/workflows/roughness.py +++ b/hydromt_delft3dfm/workflows/roughness.py @@ -4,7 +4,7 @@ import geopandas as gpd -logger = logging.getLogger(__name__) +logger = logging.getLogger("hydromt") __all__ = ["generate_roughness"] diff --git a/tests/test_hydromt.py b/tests/test_hydromt.py index 56e4c227..6c1c3405 100644 --- a/tests/test_hydromt.py +++ b/tests/test_hydromt.py @@ -70,7 +70,7 @@ def test_model_build(tmpdir, modelname): # Compare with model from examples folder # (need to read it again for proper geoms check) - mod1 = DFlowFMModel(root=root, mode="r")) + mod1 = DFlowFMModel(root=root, mode="r") mod1.read() root = join(EXAMPLEDIR, f"dflowfm_{modelname}") mod0 = DFlowFMModel(root=root, mode="r")