From 1705b6357c2d65c5b2d079af87e67dede2b6db92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Mon, 8 Jul 2024 17:22:06 +0200 Subject: [PATCH] Added common test to rqt_py_common (#310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- rqt_py_common/CMakeLists.txt | 3 + rqt_py_common/package.xml | 2 + rqt_py_common/src/rqt_py_common/ini_helper.py | 49 +++++++------- .../src/rqt_py_common/item_delegates.py | 2 +- .../src/rqt_py_common/layout_util.py | 56 ++++++++-------- .../src/rqt_py_common/message_helpers.py | 20 +++--- .../src/rqt_py_common/message_tree_model.py | 6 +- .../src/rqt_py_common/message_tree_widget.py | 2 +- .../rqt_py_common/plugin_container_widget.py | 45 +++++++------ .../src/rqt_py_common/rqt_ros_graph.py | 45 +++++++------ .../src/rqt_py_common/rqt_roscomm_util.py | 67 ++++++++++--------- .../src/rqt_py_common/topic_completer.py | 2 +- .../src/rqt_py_common/topic_helpers.py | 2 +- .../src/rqt_py_common/topic_tree_model.py | 2 +- rqt_py_common/test/test_rqt_common_unit.py | 45 ++++++------- .../test/test_rqt_message_helpers.py | 43 ++++++------ rqt_py_common/test/test_rqt_ros_graph.py | 43 ++++++------ rqt_py_common/test/test_rqt_topic_helpers.py | 43 ++++++------ 18 files changed, 242 insertions(+), 235 deletions(-) diff --git a/rqt_py_common/CMakeLists.txt b/rqt_py_common/CMakeLists.txt index 84a37cb3..5a050d9e 100644 --- a/rqt_py_common/CMakeLists.txt +++ b/rqt_py_common/CMakeLists.txt @@ -13,6 +13,9 @@ install(DIRECTORY resource ) if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() + find_package(rosidl_default_generators REQUIRED) find_package(ament_cmake_pytest REQUIRED) # Provides PYTHON_EXECUTABLE_DEBUG diff --git a/rqt_py_common/package.xml b/rqt_py_common/package.xml index 2087234a..7b3fdcfe 100644 --- a/rqt_py_common/package.xml +++ b/rqt_py_common/package.xml @@ -31,6 +31,8 @@ qt_gui ament_cmake_pytest + ament_lint_auto + ament_lint_common python_cmake_module rosidl_default_generators rosidl_default_runtime diff --git a/rqt_py_common/src/rqt_py_common/ini_helper.py b/rqt_py_common/src/rqt_py_common/ini_helper.py index d4537bc0..c4237f80 100644 --- a/rqt_py_common/src/rqt_py_common/ini_helper.py +++ b/rqt_py_common/src/rqt_py_common/ini_helper.py @@ -4,36 +4,35 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. def pack(data): """ - Packs 'data' into a form that can be easily and readably written to an ini file + Packs 'data' into a form that can be easily and readably written to an ini file. :param data: A list of strings or a list of items with a 'text' method to be flattened into a @@ -46,7 +45,7 @@ def pack(data): def _get_str(item): try: return item.text() - except: + except Exception: return item data = [_get_str(value) for value in data] @@ -57,7 +56,7 @@ def _get_str(item): def unpack(data): """ - Unpacks the values read from an ini file + Unpacks the values read from an ini file. :param data: An entry taken from an ini file ''list or string'' :return: A list of strings ''list'' diff --git a/rqt_py_common/src/rqt_py_common/item_delegates.py b/rqt_py_common/src/rqt_py_common/item_delegates.py index 04470271..cfc4ee9b 100644 --- a/rqt_py_common/src/rqt_py_common/item_delegates.py +++ b/rqt_py_common/src/rqt_py_common/item_delegates.py @@ -66,7 +66,7 @@ class DelegateUtil(object): def _get_hierarchy_level(model_index): hierarchyLevel = 1 seek_root = model_index - while(seek_root.parent() != QModelIndex()): + while seek_root.parent() != QModelIndex(): seek_root = seek_root.parent() hierarchyLevel += 1 return hierarchyLevel diff --git a/rqt_py_common/src/rqt_py_common/layout_util.py b/rqt_py_common/src/rqt_py_common/layout_util.py index e1647c8b..299f7c47 100644 --- a/rqt_py_common/src/rqt_py_common/layout_util.py +++ b/rqt_py_common/src/rqt_py_common/layout_util.py @@ -4,36 +4,35 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Isaac Saito from python_qt_binding.QtCore import Qt -from python_qt_binding.QtWidgets import QWidgetItem, QSpacerItem +from python_qt_binding.QtWidgets import QSpacerItem, QWidgetItem from rclpy import logging @@ -44,8 +43,9 @@ class LayoutUtil(object): @staticmethod def alternate_color(list_widgets, colors_alter=[Qt.white, Qt.gray]): """ - Alternate the background color of the widgets that are ordered - linearly, by the given list of colors. + Alternate the background color of the widgets. + + Widgets are ordered linearly, by the given list of colors. Originally intended for the elements of QHBoxLayout & QVBoxLayout. @@ -75,8 +75,10 @@ def alternate_color(list_widgets, colors_alter=[Qt.white, Qt.gray]): @staticmethod def clear_layout(layout): """ - Clear all items in the given layout. Currently, only the instances of - QWidgetItem get cleared (ie. QSpaceItem is ignored). + Clear all items in the given layout. + + Currently, only the instances of QWidgetItem get cleared + (ie. QSpaceItem is ignored). Originally taken from http://stackoverflow.com/a/9375273/577001 diff --git a/rqt_py_common/src/rqt_py_common/message_helpers.py b/rqt_py_common/src/rqt_py_common/message_helpers.py index 551947d1..b9073aac 100644 --- a/rqt_py_common/src/rqt_py_common/message_helpers.py +++ b/rqt_py_common/src/rqt_py_common/message_helpers.py @@ -139,8 +139,8 @@ def get_all_rosidl_types_of_type(rosidl_type): :returns: a dictionary mapping packages to the rosidl interfaces of a specific type """ if rosidl_type not in ROSIDL_FILTERS: - raise ValueError('Invalid rosidl_type type "{}". Needs to be one of {}'.format( - filter_type, ROSIDL_FILTERS.keys())) + raise ValueError('Invalid rosidl_type type {}. Needs to be one of {}'.format( + rosidl_type, ROSIDL_FILTERS.keys())) all_rosidl_types = get_all_rosidl_types() return { @@ -151,7 +151,7 @@ def get_all_rosidl_types_of_type(rosidl_type): def get_all_service_types(): """ - Uses the ament index to iterate through packages and calls get_service_types on each one. + Use the ament index to iterate through packages and calls get_service_types on each one. :returns: a dictionary of the form {'package_name', ['srv1', 'srv2', ...]} """ @@ -160,7 +160,7 @@ def get_all_service_types(): def get_service_types(package_name): """ - Uses the ament index gind all services avialable in the package. + Use the ament index gind all services avialable in the package. :param package_name: a string eg 'std_srvs' :returns: a dictionary of the form {'package_name', ['srv1', 'srv2', ...]} @@ -170,7 +170,7 @@ def get_service_types(package_name): def get_all_message_types(): """ - Uses the ament index to iterate through packages and calls get_message_types on each one. + Use the ament index to iterate through packages and calls get_message_types on each one. :returns: a dictionary of the form {'package_name', ['msg1', 'msg2', ...]} """ @@ -179,7 +179,7 @@ def get_all_message_types(): def get_message_types(package_name): """ - Uses the ament index to find all messages avialable in the package. + Use the ament index to find all messages avialable in the package. :param package_name: a string eg 'std_msgs' :returns: a dictionary of the form {'std_msgs', ['Bool', 'String', ...]} @@ -208,7 +208,7 @@ def get_action_types(package_name): def _get_rosidl_class_helper(message_type, mode, logger=None): # noqa: C901 """ - A helper function for common logic to be used by get_message_class and get_service_class. + Logic to be used by get_message_class and get_service_class. :param message_type: name of the message or service class in the form 'package_name/MessageName' or 'package_name/msg/MessageName' @@ -266,7 +266,7 @@ def _get_rosidl_class_helper(message_type, mode, logger=None): # noqa: C901 def get_service_class(srv_type): """ - Gets the service class from a string representation. + Get the service class from a string representation. :param srv_type: the type of service in the form `package_name/ServiceName` or `package_name/srv/ServiceName` @@ -291,7 +291,7 @@ def get_service_class(srv_type): def get_message_class(message_type): """ - Gets the message class from a string representation. + Get the message class from a string representation. :param message_type: the type of message in the form `msg_pkg/Message` :type message_type: str @@ -316,7 +316,7 @@ def get_message_class(message_type): def get_action_class(action_type): """ - Gets the action class from a string representation. + Get the action class from a string representation. :param action_type: the type of action in the form `action_pkg/Action` :type action_type: str diff --git a/rqt_py_common/src/rqt_py_common/message_tree_model.py b/rqt_py_common/src/rqt_py_common/message_tree_model.py index 2742b607..c2573dc6 100644 --- a/rqt_py_common/src/rqt_py_common/message_tree_model.py +++ b/rqt_py_common/src/rqt_py_common/message_tree_model.py @@ -107,7 +107,7 @@ def _recursive_create_items( return (row, is_leaf_node) - ''' + """ NOTE: I (Isaac Saito) suspect that this function might have same/similar functionality with _recursive_create_items. @@ -128,7 +128,7 @@ def _recursive_create_items( [ top_node, sub_node, subsub_node ] @author: Isaac Saito - ''' + """ @staticmethod def _build_tree_recursive(stditem_parent, names_on_branch): name_curr = names_on_branch.pop(0) @@ -152,7 +152,7 @@ def _build_tree_recursive(stditem_parent, names_on_branch): MessageTreeModel._logger.debug( 'add_tree_node 1 name_curr={} \n\t\tname_prev={} row_index_parent={}'.format( - (name_curr, name_prev, row_index_parent))) + name_curr, name_prev, row_index_parent)) if (0 < len(names_on_branch)): MessageTreeModel._build_tree_recursive(stditem, names_on_branch) diff --git a/rqt_py_common/src/rqt_py_common/message_tree_widget.py b/rqt_py_common/src/rqt_py_common/message_tree_widget.py index c646435e..64f17837 100644 --- a/rqt_py_common/src/rqt_py_common/message_tree_widget.py +++ b/rqt_py_common/src/rqt_py_common/message_tree_widget.py @@ -30,7 +30,7 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -from python_qt_binding.QtCore import Slot, QMimeData, QModelIndex, Qt, qWarning +from python_qt_binding.QtCore import QMimeData, QModelIndex, Qt, qWarning, Slot from python_qt_binding.QtGui import QDrag, QIcon from python_qt_binding.QtWidgets import QAction, QHeaderView, QMenu, QTreeView diff --git a/rqt_py_common/src/rqt_py_common/plugin_container_widget.py b/rqt_py_common/src/rqt_py_common/plugin_container_widget.py index 70f5aace..8f4b7a23 100644 --- a/rqt_py_common/src/rqt_py_common/plugin_container_widget.py +++ b/rqt_py_common/src/rqt_py_common/plugin_container_widget.py @@ -4,30 +4,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Isaac Saito @@ -68,6 +67,8 @@ class PluginContainerWidget(QWidget): def __init__(self, plugin_widget, on_sys_msg=True, on_sysprogress_bar=True): """ + Contruct PluginContainerWidget. + @param plugin_widget: The main widget of an rqt plugin. @type plugin_widget: QWidget @type on_sys_msg: bool diff --git a/rqt_py_common/src/rqt_py_common/rqt_ros_graph.py b/rqt_py_common/src/rqt_py_common/rqt_ros_graph.py index 1f48f1a3..2aacad3f 100644 --- a/rqt_py_common/src/rqt_py_common/rqt_ros_graph.py +++ b/rqt_py_common/src/rqt_py_common/rqt_ros_graph.py @@ -4,30 +4,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Isaac Saito @@ -43,6 +42,8 @@ class RqtRosGraph(object): @staticmethod def get_full_grn(model_index): """ + Create full path format of GRN. + @deprecated: Not completed. Create full path format of GRN (Graph Resource Names, see diff --git a/rqt_py_common/src/rqt_py_common/rqt_roscomm_util.py b/rqt_py_common/src/rqt_py_common/rqt_roscomm_util.py index 3931de28..09f18c0f 100644 --- a/rqt_py_common/src/rqt_py_common/rqt_roscomm_util.py +++ b/rqt_py_common/src/rqt_py_common/rqt_roscomm_util.py @@ -4,30 +4,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Isaac Saito @@ -45,7 +44,7 @@ class RqtRoscommUtil(object): @staticmethod def load_parameters(config, caller_id): """ - TODO(mlautman) Load parameters from node graph + TODO(mlautman) Load parameters from node graph. Load parameters onto the parameter server. @@ -106,7 +105,7 @@ def load_parameters(config, caller_id): @staticmethod def iterate_packages(subdir): """ - Iterator for packages that contain the given subdir. + Iterate packages that contain the given subdir. This method is generalizing rosmsg.iterate_packages. @@ -128,6 +127,8 @@ def iterate_packages(subdir): @staticmethod def list_files(package, subdir, file_extension='.launch'): """ + List files contained in the specified package. + Note: Mlautman 11/2/2018 This method is deprecated in ROS2 This functionality does not fit the ROS2 design paradigm @@ -136,7 +137,6 @@ def list_files(package, subdir, file_extension='.launch'): #TODO: Come up with better name of the method. Taken from rosmsg. - Lists files contained in the specified package @param package: package name, ``str`` @param file_extension: Defaults to '.launch', ``str`` @@ -148,9 +148,10 @@ def list_files(package, subdir, file_extension='.launch'): @staticmethod def _list_types(path, ext): """ - Taken from rosmsg + List all messages in the specified package. + + Taken from rosmsg. - List all messages in the specified package :param package str: name of package to search :param include_depends bool: if True, will also list messages in package dependencies. @@ -159,7 +160,7 @@ def _list_types(path, ext): types = RqtRoscommUtil._list_resources(path, RqtRoscommUtil._msg_filter(ext)) - result = [x for x in types] + result = list(types) # result = [x[:-len(ext)] for x in types] # Remove extension result.sort() @@ -168,9 +169,10 @@ def _list_types(path, ext): @staticmethod def _list_resources(path, rfilter=os.path.isfile): """ - Taken from rosmsg._list_resources + List resources in a package directory within a particular. + + Taken from rosmsg._list_resources. - List resources in a package directory within a particular subdirectory. This is useful for listing messages, services, etc... :param rfilter: resource filter function that returns true if filename is the desired resource type, ``fn(filename)->bool`` @@ -185,10 +187,11 @@ def _list_resources(path, rfilter=os.path.isfile): @staticmethod def _msg_filter(ext): - """Taken from rosmsg._msg_filter""" + """Taken from rosmsg._msg_filter.""" def mfilter(f): """ - Predicate for filtering directory list. matches message files + Predicate for filtering directory list. matches message files. + :param f: filename, ``str`` """ return os.path.isfile(f) and f.endswith(ext) diff --git a/rqt_py_common/src/rqt_py_common/topic_completer.py b/rqt_py_common/src/rqt_py_common/topic_completer.py index 29853861..d88dfa2f 100644 --- a/rqt_py_common/src/rqt_py_common/topic_completer.py +++ b/rqt_py_common/src/rqt_py_common/topic_completer.py @@ -32,8 +32,8 @@ from python_qt_binding.QtCore import qWarning -from rqt_py_common.message_tree_model import MessageTreeModel from rqt_py_common.message_helpers import get_message_class +from rqt_py_common.message_tree_model import MessageTreeModel from rqt_py_common.tree_model_completer import TreeModelCompleter diff --git a/rqt_py_common/src/rqt_py_common/topic_helpers.py b/rqt_py_common/src/rqt_py_common/topic_helpers.py index 25b4fabc..83691287 100644 --- a/rqt_py_common/src/rqt_py_common/topic_helpers.py +++ b/rqt_py_common/src/rqt_py_common/topic_helpers.py @@ -55,7 +55,7 @@ def is_primitive_type(type_str): def get_type_class(type_name): """ - Gets the python type from an idl string. + Get the python type from an idl string. See: https://github.com/ros2/design/blob/gh-pages/articles/142_idl.md diff --git a/rqt_py_common/src/rqt_py_common/topic_tree_model.py b/rqt_py_common/src/rqt_py_common/topic_tree_model.py index 149d38b5..c91cbc92 100644 --- a/rqt_py_common/src/rqt_py_common/topic_tree_model.py +++ b/rqt_py_common/src/rqt_py_common/topic_tree_model.py @@ -28,8 +28,8 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -from rqt_py_common.message_tree_model import MessageTreeModel from rqt_py_common.message_helpers import get_message_class +from rqt_py_common.message_tree_model import MessageTreeModel class TopicTreeModel(MessageTreeModel): diff --git a/rqt_py_common/test/test_rqt_common_unit.py b/rqt_py_common/test/test_rqt_common_unit.py index 4f67b345..f97eb4ad 100644 --- a/rqt_py_common/test/test_rqt_common_unit.py +++ b/rqt_py_common/test/test_rqt_common_unit.py @@ -6,30 +6,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. import unittest @@ -39,7 +38,7 @@ class TestMessageTreeModel(unittest.TestCase): def test_path_names(self): from rqt_py_common.message_tree_model import MessageTreeModel - from rqt_py_common_test_interfaces.msg import Val, ArrayVal + from rqt_py_common_test_interfaces.msg import ArrayVal m = MessageTreeModel() m.add_message(ArrayVal()) root = m.item(0).child(0) diff --git a/rqt_py_common/test/test_rqt_message_helpers.py b/rqt_py_common/test/test_rqt_message_helpers.py index 97e44654..8330314d 100644 --- a/rqt_py_common/test/test_rqt_message_helpers.py +++ b/rqt_py_common/test/test_rqt_message_helpers.py @@ -6,30 +6,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of PickNik Robotics nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # Author: Michael Lautman diff --git a/rqt_py_common/test/test_rqt_ros_graph.py b/rqt_py_common/test/test_rqt_ros_graph.py index dbc7ce14..3f89a7b6 100644 --- a/rqt_py_common/test/test_rqt_ros_graph.py +++ b/rqt_py_common/test/test_rqt_ros_graph.py @@ -6,30 +6,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Author: Isaac Saito diff --git a/rqt_py_common/test/test_rqt_topic_helpers.py b/rqt_py_common/test/test_rqt_topic_helpers.py index a309aab9..16f1a722 100644 --- a/rqt_py_common/test/test_rqt_topic_helpers.py +++ b/rqt_py_common/test/test_rqt_topic_helpers.py @@ -6,30 +6,29 @@ # All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: +# modification, are permitted provided that the following conditions are met: # -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of PickNik Robotics nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # Author: Michael Lautman