Skip to content

Commit

Permalink
add deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
CagtayFabry committed Jun 25, 2024
1 parent f706946 commit 52bb7c1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion weldx/transformations/cs_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from weldx import util
from weldx.core import TimeSeries
from weldx.exceptions import WeldxException
from weldx.exceptions import WeldxDeprecationWarning, WeldxException
from weldx.geometry import SpatialData
from weldx.time import Time, types_time_like, types_timestamp_like
from weldx.util import check_matplotlib_available, dataclass_nested_eq
Expand Down Expand Up @@ -441,6 +441,7 @@ def add_cs(
reference_system_name: str,
lcs: LocalCoordinateSystem,
lcs_child_in_parent: bool = True,
lsc_child_in_parent: bool = True,
):
"""Add a coordinate system to the coordinate system manager.
Expand Down Expand Up @@ -473,8 +474,22 @@ def add_cs(
If set to `True`, the passed `LocalCoordinateSystem` instance describes
the new system orientation towards is parent. If `False`, it describes
how the parent system is positioned in its new child system.
lsc_child_in_parent
DEPRECATED. Use ``lcs_child_in_parent`` instead.
"""
if not lsc_child_in_parent:
warnings.warn(
(
"Argument 'lsc_child_in_parent' is deprecated"
" and will be removed in 0.7 please use 'lcs_child_in_parent'"
),
category=WeldxDeprecationWarning,
stacklevel=2,
)
if lcs_child_in_parent:
lcs_child_in_parent = lsc_child_in_parent

if not isinstance(lcs, LocalCoordinateSystem):
raise TypeError(
"'local_coordinate_system' must be an instance of LocalCoordinateSystem"
Expand Down

0 comments on commit 52bb7c1

Please sign in to comment.