Skip to content

Commit

Permalink
added cleanup_folded_bound_el func, test, data, and ignore pylint E0606
Browse files Browse the repository at this point in the history
  • Loading branch information
felicio93 committed May 22, 2024
1 parent 2f777aa commit 58e5726
Show file tree
Hide file tree
Showing 4 changed files with 1,706,420 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ocsmesh/geom/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def __init__(
else:
raise TypeError("Input file extension not supported!")

self._geom_list.append(geom)
self._geom_list.append(geom) # pylint: disable=E0606


def get_multipolygon(self, **kwargs: Any) -> MultiPolygon:
Expand Down
2 changes: 1 addition & 1 deletion ocsmesh/hfun/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def __init__(
else:
raise TypeError("Input file extension not supported!")

self._hfun_list.append(hfun)
self._hfun_list.append(hfun) # pylint: disable=E0606


def msh_t(self) -> jigsaw_msh_t:
Expand Down
10 changes: 9 additions & 1 deletion tests/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
)
from shapely.ops import polygonize

from ocsmesh import Raster, utils
from ocsmesh import Raster, utils, Mesh


class SetUp(unittest.TestCase):
Expand Down Expand Up @@ -120,6 +120,14 @@ def test_cleanup_duplicate(self):
except ValueError as e:
self.fail(str(e))

def test_cleanup_folded_bound_el(self):

# Open mesh that has folded boundary elements
p = Path().absolute().parents[0] / "data" / "before_cleanup_folded_bound_el.2dm"
folded_bound_el_mesh = Mesh.open(p, crs=4326)

utils.cleanup_folded_bound_el(folded_bound_el_mesh)


class RemovePolygonHoles(unittest.TestCase):

Expand Down
Loading

0 comments on commit 58e5726

Please sign in to comment.