diff --git a/src/geovista/bridge.py b/src/geovista/bridge.py index 990a4a84..ce107919 100644 --- a/src/geovista/bridge.py +++ b/src/geovista/bridge.py @@ -818,7 +818,7 @@ def from_unstructured( n_invalid = n_faces - np.sum(valid_faces_mask) plural = "s" if n_invalid > 1 else "" wmsg = ( - f"Masked connectivity defines {n_invalid:,} face{plural} " + f"geovista masked connectivity defines {n_invalid:,} face{plural} " "with no vertices." ) warnings.warn(wmsg, stacklevel=2) diff --git a/src/geovista/core.py b/src/geovista/core.py index c87b3336..3aa312e8 100644 --- a/src/geovista/core.py +++ b/src/geovista/core.py @@ -655,7 +655,7 @@ def slice_cells( plural = "s" if (n_cells := bad_cids.size) > 1 else "" naughty = ", ".join([f"{cid}" for cid in bad_cids]) wmsg = ( - f"Unable to remesh {n_cells} cell{plural}. Removing the " + f"geovista unable to remesh {n_cells} cell{plural}. Removing the " f"following mesh cell-id{plural} [{naughty}]." ) warnings.warn(wmsg, stacklevel=2) @@ -727,7 +727,7 @@ def slice_lines( n_points = SPLINE_N_POINTS if n_points < 1: - wmsg = f"Ignoring 'n_points={n_points}', defaulting to 'n_points=1'." + wmsg = f"geovista ignoring 'n_points={n_points}', defaulting to 'n_points=1'." warnings.warn(wmsg, stacklevel=2) # check whether the line is completely aligned with the slice plane diff --git a/src/geovista/geodesic.py b/src/geovista/geodesic.py index 07149635..3960e3ef 100644 --- a/src/geovista/geodesic.py +++ b/src/geovista/geodesic.py @@ -190,9 +190,9 @@ def __init__( lons, lats = lons[-1], lats[-1] else: wmsg = ( - "The bounding-box was specified with 5 longitude/latitude values, " - "however the first and last values are not close enough to specify " - "a closed geometry - ignoring last value." + "geovista bounding-box was specified with 5 longitude/latitude" + "values, however the first and last values are not close enough to " + "specify a closed geometry - ignoring last value." ) warnings.warn(wmsg, stacklevel=2) lons, lats = lons[:-1], lats[:-1] diff --git a/src/geovista/geoplotter.py b/src/geovista/geoplotter.py index 1059c6ad..6a1b812c 100644 --- a/src/geovista/geoplotter.py +++ b/src/geovista/geoplotter.py @@ -142,7 +142,7 @@ def __init__(self, *args: Any | None, **kwargs: Any | None) -> None: klass = f"'{self.__class__.__name__}'" if len(args) == 1 and ("crs" not in kwargs or kwargs["crs"] is None): wmsg = ( - f"{klass} received an unexpected argument. " + f"geovista {klass} received an unexpected argument. " "Assuming 'crs' keyword argument instead..." ) warn(wmsg, stacklevel=2) @@ -574,7 +574,10 @@ def add_mesh(self, mesh: Any, **kwargs: Any | None) -> pv.Actor: src_crs = from_wkt(mesh) if src_crs is None: - wmsg = "Found no coordinate reference system (CRS) attached to mesh." + wmsg = ( + "geovista found no coordinate reference system (CRS) attached " + "to mesh." + ) warn(wmsg, stacklevel=2) tgt_crs = self.crs @@ -1110,8 +1113,8 @@ def add_points( if isinstance(scalars, str): wmsg = ( - f"Ignoring the 'scalars' string name '{scalars}', as no 'points' " - "mesh was provided." + f"geovista ignoring the 'scalars' string name '{scalars}', as no " + "'points' mesh was provided." ) warn(wmsg, stacklevel=2) diff --git a/src/geovista/samples.py b/src/geovista/samples.py index 00107e04..dede7697 100644 --- a/src/geovista/samples.py +++ b/src/geovista/samples.py @@ -452,7 +452,7 @@ def lfric(resolution: str | None = None) -> pv.PolyData: if resolution not in LFRIC_RESOLUTIONS: wmsg = ( - f"Unknown LFRic cubed-sphere resolution {original!r}, " + f"geovista detected unknown LFRic cubed-sphere resolution {original!r}, " f"using {LFRIC_RESOLUTION!r} instead." ) warn(wmsg, stacklevel=2) diff --git a/tests/core/test_slice_lines.py b/tests/core/test_slice_lines.py index b1b6c87c..18befb53 100644 --- a/tests/core/test_slice_lines.py +++ b/tests/core/test_slice_lines.py @@ -45,7 +45,7 @@ def test_no_lines(mesh): @pytest.mark.parametrize("n_points", [0, -1]) def test_n_points_warning(coastlines, n_points): """Test invalid domain for n_points warning is raised.""" - wmsg = f"Ignoring 'n_points={n_points}'" + wmsg = f"geovista ignoring 'n_points={n_points}'" with pytest.warns(UserWarning, match=wmsg): _ = slice_lines(coastlines, n_points=n_points) diff --git a/tests/geoplotter/test_add_points.py b/tests/geoplotter/test_add_points.py index 85fd8823..758e9576 100644 --- a/tests/geoplotter/test_add_points.py +++ b/tests/geoplotter/test_add_points.py @@ -143,7 +143,7 @@ def test_xy_ys_scalars_name_warnings(mocker): xs, ys = mocker.sentinel.xs, mocker.sentinel.ys scalars = "invalid" wmsg = ( - f"Ignoring the 'scalars' string name '{scalars}', " + f"geovista ignoring the 'scalars' string name '{scalars}', " "as no 'points' mesh was provided" ) with pytest.warns(UserWarning, match=wmsg):