Skip to content

test: logo removal should work on linux now #2098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/2098.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Logo removal should work on linux now
6 changes: 4 additions & 2 deletions src/ansys/geometry/core/tools/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,10 @@ def find_and_remove_logos(
"""
from ansys.geometry.core.designer.body import Body

if BackendType.is_linux_service(self._grpc_client.backend_type):
# not yet available in Linux
if BackendType.is_linux_service(
self._grpc_client.backend_type
) and self._grpc_client.backend_version < (26, 1, 0):
# not yet available on Linux until 26.1.0
LOG.warning("Logo detection not available on Linux")
return

Expand Down
7 changes: 0 additions & 7 deletions tests/integration/test_prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

from pint import Quantity

from ansys.geometry.core.connection.backend import BackendType
from ansys.geometry.core.math.point import Point2D
from ansys.geometry.core.misc.measurements import UNITS
from ansys.geometry.core.modeler import Modeler
Expand Down Expand Up @@ -136,9 +135,6 @@ def test_detect_logos(modeler: Modeler):
result = modeler.prepare_tools.find_logos(max_height=0.005)
assert len(result.face_ids) == 147
success = modeler.prepare_tools.find_and_remove_logos(max_height=0.005)
# Skip the rest of the test if running on a Linux service backend
if BackendType.is_linux_service(modeler.client.backend_type):
return
assert success is True
assert len(body.faces) == 42
result = modeler.prepare_tools.find_and_remove_logos(None, min_height=0.001, max_height=0.005)
Expand All @@ -162,9 +158,6 @@ def test_detect_and_fix_logo_as_problem_area(modeler: Modeler):
# Test finding logos with max height
result_with_max_height = modeler.prepare_tools.find_logos(max_height=0.005)
assert len(result_with_max_height.face_ids) == 147
# Skip fix-related assertions if running on a Linux service backend
if BackendType.is_linux_service(modeler.client.backend_type):
return
# Test removing logos with max height
success_remove_logos = modeler.prepare_tools.find_and_remove_logos(max_height=0.005)
assert success_remove_logos is True
Expand Down
Loading