From ba8ca991143fe989bbecccd912b98b3b81aa6334 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 13 Aug 2026 05:59:54 -0700 Subject: [PATCH 1/2] test: add missing shapely requires_pkg markers --- autotest/test_export.py | 4 ++-- autotest/test_gridgen.py | 4 ++-- autotest/test_model_splitter.py | 2 +- autotest/test_modeltime.py | 3 +++ autotest/test_particledata.py | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/autotest/test_export.py b/autotest/test_export.py index 9fc25638a4..1812418ef0 100644 --- a/autotest/test_export.py +++ b/autotest/test_export.py @@ -241,7 +241,7 @@ def test_freyberg_export(function_tmpdir, example_data_path): assert m.drn.stress_period_data.mg.angrot == m.modelgrid.angrot -@requires_pkg("pyshp", name_map={"pyshp": "shapefile"}) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) @pytest.mark.parametrize("missing_arrays", [True, False]) @pytest.mark.slow def test_disu_export(function_tmpdir, missing_arrays): @@ -623,7 +623,7 @@ def test_array3d_export_structured(function_tmpdir): ] -@requires_pkg("pyshp", name_map={"pyshp": "shapefile"}) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) def test_array3d_export_unstructured(function_tmpdir): from shapefile import Reader diff --git a/autotest/test_gridgen.py b/autotest/test_gridgen.py index 27c997aecf..b2589383e6 100644 --- a/autotest/test_gridgen.py +++ b/autotest/test_gridgen.py @@ -59,7 +59,7 @@ def get_structured_grid(): @requires_exe("gridgen") -@requires_pkg("pyshp", name_map={"pyshp": "shapefile"}) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) @pytest.mark.parametrize("grid_type", ["vertex", "unstructured"]) def test_add_active_domain(function_tmpdir, grid_type): bgrid = get_structured_grid() @@ -95,7 +95,7 @@ def test_add_active_domain(function_tmpdir, grid_type): @requires_exe("gridgen") -@requires_pkg("pyshp", name_map={"pyshp": "shapefile"}) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) @pytest.mark.parametrize("grid_type", ["vertex", "unstructured"]) def test_add_refinement_feature(function_tmpdir, grid_type): bgrid = get_structured_grid() diff --git a/autotest/test_model_splitter.py b/autotest/test_model_splitter.py index 0f0d46515f..60bbb83306 100644 --- a/autotest/test_model_splitter.py +++ b/autotest/test_model_splitter.py @@ -1031,7 +1031,7 @@ def test_unstructured_complex_disu(function_tmpdir): @requires_exe("mf6") -@requires_pkg("pymetis", "scipy") +@requires_pkg("pymetis", "scipy", "shapely") def test_multi_model(function_tmpdir): from scipy.spatial import KDTree diff --git a/autotest/test_modeltime.py b/autotest/test_modeltime.py index fbdb54e335..c3e459f7ad 100644 --- a/autotest/test_modeltime.py +++ b/autotest/test_modeltime.py @@ -4,6 +4,8 @@ import pandas as pd import pytest +from modflow_devtools.markers import requires_pkg + import flopy from flopy.discretization.modeltime import ModelTime from flopy.mf6.modflow.mfsimulation import MFSimulation @@ -360,6 +362,7 @@ def test_from_headers_test005_advgw_tidal(example_data_path): assert np.allclose(mt.tsmult, tdis.perioddata.get_data()["tsmult"]) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) def test_from_headers_disu(function_tmpdir): from autotest.test_export import disu_sim as _disu_sim diff --git a/autotest/test_particledata.py b/autotest/test_particledata.py index bc30363391..4a7fa56bfa 100644 --- a/autotest/test_particledata.py +++ b/autotest/test_particledata.py @@ -676,7 +676,7 @@ def test_nodeparticledata_to_prp_dis_1_per_face(): assert len(rpts) == num_cells * 6 -@requires_pkg("pyshp", name_map={"pyshp": "shapefile"}) +@requires_pkg("pyshp", "shapely", name_map={"pyshp": "shapefile"}) def test_nodeparticledata_prp_disv_big(function_tmpdir): Lx = 10000.0 Ly = 10500.0 From 8e874bf556ed4e5c77cb3dfdfcd2a14e462ae329 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 13 Aug 2026 06:01:38 -0700 Subject: [PATCH 2/2] ruff --- autotest/test_modeltime.py | 1 - 1 file changed, 1 deletion(-) diff --git a/autotest/test_modeltime.py b/autotest/test_modeltime.py index c3e459f7ad..61729cb50c 100644 --- a/autotest/test_modeltime.py +++ b/autotest/test_modeltime.py @@ -3,7 +3,6 @@ import numpy as np import pandas as pd import pytest - from modflow_devtools.markers import requires_pkg import flopy