Skip to content

Commit cc43744

Browse files
committed
Merge branch 'main' into release/0.10
2 parents 6ec6330 + 672b6ca commit cc43744

File tree

5 files changed

+4
-100
lines changed

5 files changed

+4
-100
lines changed

doc/changelog.d/1860.maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cleanup deprecated methods

doc/source/assets.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Windows container
6969
Only users with access to https://github.com/ansys/pyansys-geometry-binaries can download these binaries.
7070

7171
* `Latest Geometry service binaries for Windows containers <https://github.com/ansys/pyansys-geometry-binaries>`_
72-
* `Latest Geometry service Dockerfile for Windows containers <https://github.com/ansys/pyansys-geometry/releases/latest/download/windows-dms-dockerfile.zip>`_
72+
* `Latest Geometry service Dockerfile for Windows containers <https://github.com/ansys/pyansys-geometry/releases/latest/download/windows-core-dockerfile.zip>`_
7373

7474
.. Linux container
7575
.. ^^^^^^^^^^^^^^^

src/ansys/geometry/core/connection/launcher.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
)
3636
from ansys.geometry.core.connection.product_instance import prepare_and_start_backend
3737
from ansys.geometry.core.logger import LOG
38-
from ansys.geometry.core.misc.checks import check_type, deprecated_argument
38+
from ansys.geometry.core.misc.checks import check_type
3939

4040
try:
4141
import ansys.platform.instancemanagement as pypim
@@ -492,12 +492,6 @@ def launch_modeler_with_spaceclaim_and_pimlight(
492492
)
493493

494494

495-
@deprecated_argument(
496-
arg="log_level", alternative="server_log_level", version="0.6.2", remove="0.10.0"
497-
)
498-
@deprecated_argument(
499-
arg="logs_folder", alternative="server_logs_folder", version="0.6.2", remove="0.10.0"
500-
)
501495
def launch_modeler_with_geometry_service(
502496
product_version: int = None,
503497
host: str = "localhost",
@@ -508,8 +502,6 @@ def launch_modeler_with_geometry_service(
508502
client_log_level: int = logging.INFO,
509503
server_logs_folder: str = None,
510504
client_log_file: str = None,
511-
log_level: int = None, # DEPRECATED
512-
logs_folder: str = None, # DEPRECATED
513505
**kwargs: dict | None,
514506
) -> "Modeler":
515507
"""Start the Geometry service locally using the ``ProductInstance`` class.
@@ -559,10 +551,6 @@ def launch_modeler_with_geometry_service(
559551
client_log_file : str, optional
560552
Sets the client's log file path. If nothing is defined,
561553
the client will log to the console.
562-
log_level : int, optional
563-
DEPRECATED. Use ``server_log_level`` instead.
564-
logs_folder : str, optional
565-
DEPRECATED. Use ``server_logs_folder`` instead.
566554
**kwargs : dict, default: None
567555
Placeholder to prevent errors when passing additional arguments that
568556
are not compatible with this method.
@@ -625,14 +613,9 @@ def launch_modeler_with_geometry_service(
625613
client_log_level=client_log_level,
626614
server_logs_folder=server_logs_folder,
627615
client_log_file=client_log_file,
628-
log_level=log_level,
629-
logs_folder=logs_folder,
630616
)
631617

632618

633-
@deprecated_argument(
634-
arg="log_level", alternative="server_log_level", version="0.6.2", remove="0.10.0"
635-
)
636619
def launch_modeler_with_discovery(
637620
product_version: int = None,
638621
host: str = "localhost",
@@ -644,7 +627,6 @@ def launch_modeler_with_discovery(
644627
server_log_level: int = 2,
645628
client_log_level: int = logging.INFO,
646629
client_log_file: str = None,
647-
log_level: int = None, # DEPRECATED
648630
**kwargs: dict | None,
649631
):
650632
"""Start Ansys Discovery locally using the ``ProductInstance`` class.
@@ -696,8 +678,6 @@ def launch_modeler_with_discovery(
696678
client_log_file : str, optional
697679
Sets the client's log file path. If nothing is defined,
698680
the client will log to the console.
699-
log_level : int, optional
700-
DEPRECATED. Use ``server_log_level`` instead.
701681
**kwargs : dict, default: None
702682
Placeholder to prevent errors when passing additional arguments that
703683
are not compatible with this method.
@@ -755,13 +735,9 @@ def launch_modeler_with_discovery(
755735
server_log_level=server_log_level,
756736
client_log_level=client_log_level,
757737
client_log_file=client_log_file,
758-
log_level=log_level,
759738
)
760739

761740

762-
@deprecated_argument(
763-
arg="log_level", alternative="server_log_level", version="0.6.2", remove="0.10.0"
764-
)
765741
def launch_modeler_with_spaceclaim(
766742
product_version: int = None,
767743
host: str = "localhost",
@@ -773,7 +749,6 @@ def launch_modeler_with_spaceclaim(
773749
server_log_level: int = 2,
774750
client_log_level: int = logging.INFO,
775751
client_log_file: str = None,
776-
log_level: int = None, # DEPRECATED
777752
**kwargs: dict | None,
778753
):
779754
"""Start Ansys SpaceClaim locally using the ``ProductInstance`` class.
@@ -825,8 +800,6 @@ def launch_modeler_with_spaceclaim(
825800
client_log_file : str, optional
826801
Sets the client's log file path. If nothing is defined,
827802
the client will log to the console.
828-
log_level : int, optional
829-
DEPRECATED. Use ``server_log_level`` instead.
830803
**kwargs : dict, default: None
831804
Placeholder to prevent errors when passing additional arguments that
832805
are not compatible with this method.
@@ -884,7 +857,6 @@ def launch_modeler_with_spaceclaim(
884857
server_log_level=server_log_level,
885858
client_log_level=client_log_level,
886859
client_log_file=client_log_file,
887-
log_level=log_level,
888860
)
889861

890862

src/ansys/geometry/core/connection/product_instance.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ def prepare_and_start_backend(
189189
server_logs_folder: str = None,
190190
client_log_file: str = None,
191191
specific_minimum_version: int = None,
192-
log_level: int = None, # DEPRECATED
193-
logs_folder: str = None, # DEPRECATED
194192
) -> "Modeler":
195193
"""Start the requested service locally using the ``ProductInstance`` class.
196194
@@ -245,10 +243,6 @@ def prepare_and_start_backend(
245243
specific_minimum_version : int, optional
246244
Sets a specific minimum version to be checked. If this is not defined,
247245
the minimum version will be set to 24.1.0.
248-
log_level : int, optional
249-
DEPRECATED. Use ``server_log_level`` instead.
250-
logs_folder : str, optional
251-
DEPRECATED. Use ``server_logs_folder`` instead.
252246
253247
Returns
254248
-------
@@ -266,24 +260,12 @@ def prepare_and_start_backend(
266260
"""
267261
from ansys.geometry.core.modeler import Modeler
268262

269-
if os.name != "nt" and backend_type not in (
270-
BackendType.LINUX_SERVICE,
271-
BackendType.CORE_LINUX,
272-
): # pragma: no cover
263+
if os.name != "nt" and not BackendType.is_linux_service(backend_type): # pragma: no cover
273264
raise RuntimeError(
274265
"Method 'prepare_and_start_backend' is only available on Windows."
275266
"A Linux version is only available for the Core Geometry Service."
276267
)
277268

278-
# Deprecation behavior... To be removed in release 0.7
279-
if log_level is not None: # pragma: no cover
280-
LOG.warning("Overriding 'server_log_level' with 'log_level' value for now...")
281-
server_log_level = log_level
282-
283-
if logs_folder is not None: # pragma: no cover
284-
LOG.warning("Overriding 'server_logs_folder' with 'logs_folder' value for now...")
285-
server_logs_folder = logs_folder
286-
287269
port = _check_port_or_get_one(port)
288270
installations = get_available_ansys_installations()
289271
if os.getenv(ANSYS_GEOMETRY_SERVICE_ROOT) is not None and backend_type in (

src/ansys/geometry/core/designer/face.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
convert_opacity_to_hex,
5858
)
5959
from ansys.geometry.core.misc.checks import (
60-
deprecated_method,
6160
ensure_design_is_active,
6261
graphics_required,
6362
min_backend_version,
@@ -414,32 +413,6 @@ def normal(self, u: float = 0.5, v: float = 0.5) -> UnitVector3D:
414413
response = self._faces_stub.GetNormal(GetNormalRequest(id=self.id, u=u, v=v)).direction
415414
return UnitVector3D([response.x, response.y, response.z])
416415

417-
@deprecated_method(alternative="normal", version="0.6.2", remove="0.10.0")
418-
def face_normal(self, u: float = 0.5, v: float = 0.5) -> UnitVector3D:
419-
"""Get the normal direction to the face at certain UV coordinates.
420-
421-
Parameters
422-
----------
423-
u : float, default: 0.5
424-
First coordinate of the 2D representation of a surface in UV space.
425-
The default is ``0.5``, which is the center of the surface.
426-
v : float, default: 0.5
427-
Second coordinate of the 2D representation of a surface in UV space.
428-
The default is ``0.5``, which is the center of the surface.
429-
430-
Returns
431-
-------
432-
UnitVector3D
433-
:class:`UnitVector3D` object evaluated at the given U and V coordinates.
434-
This :class:`UnitVector3D` object is perpendicular to the surface at the
435-
given UV coordinates.
436-
437-
Notes
438-
-----
439-
This method is deprecated. Use the ``normal`` method instead.
440-
"""
441-
return self.normal(u, v)
442-
443416
@protect_grpc
444417
@ensure_design_is_active
445418
def point(self, u: float = 0.5, v: float = 0.5) -> Point3D:
@@ -473,30 +446,6 @@ def point(self, u: float = 0.5, v: float = 0.5) -> Point3D:
473446
response = self._faces_stub.Evaluate(EvaluateRequest(id=self.id, u=u, v=v)).point
474447
return Point3D([response.x, response.y, response.z], DEFAULT_UNITS.SERVER_LENGTH)
475448

476-
@deprecated_method(alternative="point", version="0.6.2", remove="0.10.0")
477-
def face_point(self, u: float = 0.5, v: float = 0.5) -> Point3D:
478-
"""Get a point of the face evaluated at certain UV coordinates.
479-
480-
Parameters
481-
----------
482-
u : float, default: 0.5
483-
First coordinate of the 2D representation of a surface in UV space.
484-
The default is ``0.5``, which is the center of the surface.
485-
v : float, default: 0.5
486-
Second coordinate of the 2D representation of a surface in UV space.
487-
The default is ``0.5``, which is the center of the surface.
488-
489-
Returns
490-
-------
491-
Point3D
492-
:class:`Point3D` object evaluated at the given UV coordinates.
493-
494-
Notes
495-
-----
496-
This method is deprecated. Use the ``point`` method instead.
497-
"""
498-
return self.point(u, v)
499-
500449
def __grpc_edges_to_edges(self, edges_grpc: list[GRPCEdge]) -> list[Edge]:
501450
"""Transform a list of gRPC edge messages into actual ``Edge`` objects.
502451

0 commit comments

Comments
 (0)