From 8d3fc846d7e798b67041805d969819ec0b9b8637 Mon Sep 17 00:00:00 2001 From: Emerson Knapp Date: Fri, 20 Jun 2025 10:07:00 -0700 Subject: [PATCH] Rename to launch_frontend_py --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 2 +- README.md | 2 +- {launch_py => launch_frontend_py}/__init__.py | 0 {launch_py => launch_frontend_py}/actions.py | 2 +- {launch_py => launch_frontend_py}/entity.py | 2 +- {launch_py => launch_frontend_py}/mypy.ini | 2 +- package.xml | 2 +- test/basic_launch.py | 6 +++--- test/include_launch.py | 4 ++-- test/test_action_list_preseed.py | 4 ++-- test/test_dynamic_attrs.py | 2 +- test/test_entity.py | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) rename {launch_py => launch_frontend_py}/__init__.py (100%) rename {launch_py => launch_frontend_py}/actions.py (95%) rename {launch_py => launch_frontend_py}/entity.py (98%) rename {launch_py => launch_frontend_py}/mypy.ini (56%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10b141b..7fabfc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - uses: ros-tooling/action-ros-ci@v0.4 with: target-ros2-distro: ${{ matrix.ros }} - package-name: launch_py + package-name: launch_frontend_py - uses: actions/upload-artifact@v4 with: name: colcon-logs-${{ matrix.ros }} diff --git a/CMakeLists.txt b/CMakeLists.txt index f07455f..2332022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.22) -project(launch_py) +project(launch_frontend_py) find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) diff --git a/README.md b/README.md index 90ceff0..122896e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ That is, they are the intended user-facing API. However, much of the community got hooked on Python launchfiles due to early adoption when the frontends were incomplete. With that in mind, and the extensive explicit use of exact filenames and `PythonLaunchDescriptionSource`, migration to these frontends is difficult for packages with downstream consumers. -Enter `launch_py` - this package provides a Python-language frontend to `launch`, with identical usage to the XML and YAML versions. +Enter `launch_frontend_py` - this package provides a Python-language frontend to `launch`, with identical usage to the XML and YAML versions. It provides the same benefits of conciseness, declarative style, while allowing launchfiles to stay in Python. diff --git a/launch_py/__init__.py b/launch_frontend_py/__init__.py similarity index 100% rename from launch_py/__init__.py rename to launch_frontend_py/__init__.py diff --git a/launch_py/actions.py b/launch_frontend_py/actions.py similarity index 95% rename from launch_py/actions.py rename to launch_frontend_py/actions.py index 2a008f6..761b4dd 100644 --- a/launch_py/actions.py +++ b/launch_frontend_py/actions.py @@ -27,7 +27,7 @@ def make_action_factory(action_name: str, **kwargs) -> Callable[..., Any]: def fn(*args, **kwargs): return Entity(action_name, *args, **kwargs) - fn.__doc__ = f'launch_py action: {action_name} (dynamically generated)' + fn.__doc__ = f'launch_frontend_py action: {action_name} (dynamically generated)' fn.__name__ = action_name fn.__qualname__ = action_name fn.__module__ = __name__ diff --git a/launch_py/entity.py b/launch_frontend_py/entity.py similarity index 98% rename from launch_py/entity.py rename to launch_frontend_py/entity.py index 16a6aec..d0c2dbc 100644 --- a/launch_py/entity.py +++ b/launch_frontend_py/entity.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Module for launch_py Entity class.""" +"""Module for launch_frontend_py Entity class.""" import builtins from collections.abc import Iterable import keyword diff --git a/launch_py/mypy.ini b/launch_frontend_py/mypy.ini similarity index 56% rename from launch_py/mypy.ini rename to launch_frontend_py/mypy.ini index 1b9435f..3fe7f40 100644 --- a/launch_py/mypy.ini +++ b/launch_frontend_py/mypy.ini @@ -1,2 +1,2 @@ -[mypy-launch_py] +[mypy-launch_frontend_py] disable_error_code = attr-defined diff --git a/package.xml b/package.xml index 5e53908..d8d076a 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ - launch_py + launch_frontend_py 0.1.0 Python frontend for writing ROS 2 launch files Emerson Knapp diff --git a/test/basic_launch.py b/test/basic_launch.py index 90ae582..c7f21b0 100644 --- a/test/basic_launch.py +++ b/test/basic_launch.py @@ -13,8 +13,8 @@ # limitations under the License. from pathlib import Path -from launch_py import launch -from launch_py.actions import arg, executable, group, include, let, log, set_env +from launch_frontend_py import launch +from launch_frontend_py.actions import arg, executable, group, include, let, log, set_env THIS_DIR = Path(__file__).parent @@ -24,7 +24,7 @@ def generate_launch_description(): arg(name='arg1', default='arg1_value'), let(name='arg2', value='let_$(var arg1)'), executable( - cmd='echo hello launch_py executable', + cmd='echo hello launch_frontend_py executable', output='screen', ), log(level='INFO', message='Log warning: arg1=$(var arg1), arg2=$(var arg2)'), diff --git a/test/include_launch.py b/test/include_launch.py index 5cbb4f8..4215a20 100644 --- a/test/include_launch.py +++ b/test/include_launch.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from launch_py import launch -from launch_py.actions import arg, log +from launch_frontend_py import launch +from launch_frontend_py.actions import arg, log def generate_launch_description(): diff --git a/test/test_action_list_preseed.py b/test/test_action_list_preseed.py index 3fca0c7..fa88626 100644 --- a/test/test_action_list_preseed.py +++ b/test/test_action_list_preseed.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import launch_py +import launch_frontend_py def test_action_list_preseed(): @@ -20,4 +20,4 @@ def test_action_list_preseed(): # already filled where possible without explicit access # picking a representative subset of actions (that are present in Humble+) for x in ['arg', 'timer', 'executable', 'let', 'group', 'include', 'set_env']: - assert x in launch_py.actions.__all__ + assert x in launch_frontend_py.actions.__all__ diff --git a/test/test_dynamic_attrs.py b/test/test_dynamic_attrs.py index 73e7d68..b2fe369 100644 --- a/test/test_dynamic_attrs.py +++ b/test/test_dynamic_attrs.py @@ -14,7 +14,7 @@ from launch.action import Action from launch.frontend import expose_action -from launch_py import actions +from launch_frontend_py import actions import pytest diff --git a/test/test_entity.py b/test/test_entity.py index 6abc544..b87a992 100644 --- a/test/test_entity.py +++ b/test/test_entity.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from launch_py.actions import group, log +from launch_frontend_py.actions import group, log import pytest