Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanups in rqt_srv for ROS 2 #9

Merged
merged 2 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<package format="2">
<name>rqt_srv</name>
<version>1.2.0</version>
<description>A Python GUI plugin for introspecting available ROS message types.
Note that the srvs available through this plugin is the ones that are stored
on your machine, not on the ROS core your rqt instance connects to.</description>

<description>A Python GUI plugin for introspecting available ROS service types.</description>
<maintainer email="geoff@openrobotics.org">Geoffrey Biggs</maintainer>

<license>BSD</license>
Expand All @@ -17,11 +14,13 @@
<author email="dthomas@osrfoundation.org">Dirk Thomas</author>
<author email="mikeblautman@gmail.com">Michael Lautman</author>

<exec_depend>rclpy</exec_depend>
<exec_depend>rqt_gui</exec_depend>
<exec_depend>rqt_gui_py</exec_depend>
<exec_depend>rqt_msg</exec_depend>

<test_depend>ament_flake8</test_depend>
<test_depend>ament_xmllint</test_depend>

<export>
<architecture_independent/>
<rqt_gui plugin="${prefix}/plugin.xml"/>
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@
'Topic :: Software Development',
],
description=(
'A Python GUI plugin for introspecting available ROS message types. ' +
'Note that the srvs available through this plugin is the ones that are stored ' +
'on your machine, not on the ROS core your rqt instance connects to.'
'A Python GUI plugin for introspecting available ROS service types. '
),
license='BSD',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'rqt_srv = ' + package_name + '.main:main',
Expand Down
6 changes: 3 additions & 3 deletions src/rqt_srv/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

from rqt_py_common import message_helpers

from qt_gui.plugin import Plugin

from rqt_msg.messages_widget import MessagesWidget

from rqt_py_common import message_helpers


class Services(Plugin):
# TODO fix the rosmsg.get_service_class function to return a class with
Expand All @@ -44,7 +44,7 @@ class Services(Plugin):

def __init__(self, context):
super(Services, self).__init__(context)
self.setObjectName('servicess')
self.setObjectName('services')
self._widget = MessagesWidget(message_helpers.SRV_MODE)
self._widget.setWindowTitle('Service Type Browser')
self._widget.type_label.setText('Service:')
Expand Down
23 changes: 23 additions & 0 deletions test/test_flake8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from ament_flake8.main import main
import pytest


@pytest.mark.flake8
@pytest.mark.linter
def test_flake8():
rc = main(argv=[])
assert rc == 0, 'Found errors'
23 changes: 23 additions & 0 deletions test/test_xmllint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from ament_xmllint.main import main
import pytest


@pytest.mark.linter
@pytest.mark.xmllint
def test_xmllint():
rc = main(argv=['.'])
assert rc == 0, 'Found errors'