Skip to content

Commit

Permalink
Changing default behavior to remove onshape tags--requiring users to …
Browse files Browse the repository at this point in the history
…have unique link names.
  • Loading branch information
senthurayyappan committed Jan 17, 2025
1 parent e79b6b2 commit 54d4e92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions onshape_robotics_toolkit/utilities/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def make_unique_name(name: str, existing_names: set[str]) -> str:
return f"{name}-{count}"


def get_sanitized_name(name: str, replace_with: str = "_", remove_onshape_tags: bool = False) -> str:
def get_sanitized_name(name: str, replace_with: str = "_", remove_onshape_tags: bool = True) -> str:
"""
Sanitize a name by removing special characters, preserving only the specified
replacement character, and replacing spaces with it. Ensures no consecutive
Expand All @@ -289,7 +289,7 @@ def get_sanitized_name(name: str, replace_with: str = "_", remove_onshape_tags:
Args:
name (str): Name to sanitize.
replace_with (str): Character to replace spaces and other special characters with (default is '_').
remove_onshape_tags (bool): If True, removes a trailing " <n>" tag where n is a number. Default is False.
remove_onshape_tags (bool): If True, removes a trailing " <n>" tag where n is a number. Default is True.
Returns:
str: Sanitized name.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "onshape-robotics-toolkit"
version = "0.1.8"
version = "0.1.9"
description = "A python library to facilitate interaction with Onshape's REST API"
authors = ["Senthur Ayyappan <[email protected]>"]
repository = "https://github.com/neurobionics/onshape-robotics-toolkit"
Expand Down

0 comments on commit 54d4e92

Please sign in to comment.