From 609b24c884b7b52a24a22d9940af5c91912c1f9a Mon Sep 17 00:00:00 2001 From: Thomas Muller Date: Mon, 6 Sep 2021 22:39:15 +0000 Subject: [PATCH] Added net_robot package Also fixed the spelling of John's last name or something --- src/ar3_description/package.xml | 2 +- src/ar3_description/setup.py | 4 ++-- src/net_robot/net_robot/__init__.py | 0 src/net_robot/net_robot/net_robot.py | 6 ++++++ src/net_robot/package.xml | 19 +++++++++++++++++++ src/net_robot/resource/net_robot | 0 src/net_robot/setup.cfg | 4 ++++ src/net_robot/setup.py | 26 ++++++++++++++++++++++++++ src/net_robot/test/test_copyright.py | 23 +++++++++++++++++++++++ src/net_robot/test/test_flake8.py | 25 +++++++++++++++++++++++++ src/net_robot/test/test_pep257.py | 23 +++++++++++++++++++++++ 11 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 src/net_robot/net_robot/__init__.py create mode 100644 src/net_robot/net_robot/net_robot.py create mode 100644 src/net_robot/package.xml create mode 100644 src/net_robot/resource/net_robot create mode 100644 src/net_robot/setup.cfg create mode 100644 src/net_robot/setup.py create mode 100644 src/net_robot/test/test_copyright.py create mode 100644 src/net_robot/test/test_flake8.py create mode 100644 src/net_robot/test/test_pep257.py diff --git a/src/ar3_description/package.xml b/src/ar3_description/package.xml index 0f9778e..33cb3a2 100644 --- a/src/ar3_description/package.xml +++ b/src/ar3_description/package.xml @@ -5,7 +5,7 @@ 1.0.0 Robot description and state publisher for the AR3 arm Thomas Muller - John Farell + John Farrell TODO: License declaration rclpy diff --git a/src/ar3_description/setup.py b/src/ar3_description/setup.py index 49f8724..7bf26fa 100644 --- a/src/ar3_description/setup.py +++ b/src/ar3_description/setup.py @@ -19,8 +19,8 @@ setup( ], install_requires=['setuptools'], zip_safe=True, - maintainer=['Thomas Muller', 'John Farell'], - maintainer_email=['tmuller2017@my.fit.edu', 'farell2017@my.fit.edu'], + maintainer=['Thomas Muller', 'John Farrell'], + maintainer_email=['tmuller2017@my.fit.edu', 'farrell2017@my.fit.edu'], description='Robot description and state publisher for the AR3 arm', license='TODO: License declaration', tests_require=['pytest'], diff --git a/src/net_robot/net_robot/__init__.py b/src/net_robot/net_robot/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/net_robot/net_robot/net_robot.py b/src/net_robot/net_robot/net_robot.py new file mode 100644 index 0000000..49eb138 --- /dev/null +++ b/src/net_robot/net_robot/net_robot.py @@ -0,0 +1,6 @@ +def main(): + print('Hi from net_robot.') + + +if __name__ == '__main__': + main() diff --git a/src/net_robot/package.xml b/src/net_robot/package.xml new file mode 100644 index 0000000..89a0220 --- /dev/null +++ b/src/net_robot/package.xml @@ -0,0 +1,19 @@ + + + + net_robot + 1.0.0 + Replaces the hardware with a net client + Thomas Muller + John Farrell + TODO: License declaration + + ament_copyright + ament_flake8 + ament_pep257 + python3-pytest + + + ament_python + + diff --git a/src/net_robot/resource/net_robot b/src/net_robot/resource/net_robot new file mode 100644 index 0000000..e69de29 diff --git a/src/net_robot/setup.cfg b/src/net_robot/setup.cfg new file mode 100644 index 0000000..5adbd67 --- /dev/null +++ b/src/net_robot/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script-dir=$base/lib/net_robot +[install] +install-scripts=$base/lib/net_robot diff --git a/src/net_robot/setup.py b/src/net_robot/setup.py new file mode 100644 index 0000000..654a65f --- /dev/null +++ b/src/net_robot/setup.py @@ -0,0 +1,26 @@ +from setuptools import setup + +package_name = 'net_robot' + +setup( + name=package_name, + version='1.0.0', + packages=[package_name], + data_files=[ + ('share/ament_index/resource_index/packages', + ['resource/' + package_name]), + ('share/' + package_name, ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer=['Thomas Muller', 'John Farrell'], + maintainer_email=['tmuller2017@my.fit.edu', 'farrell2017@my.fit.edu'], + description='Replaces the hardware with a net client', + license='TODO: License declaration', + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ + 'net_robot = net_robot.net_robot:main' + ], + }, +) diff --git a/src/net_robot/test/test_copyright.py b/src/net_robot/test/test_copyright.py new file mode 100644 index 0000000..cc8ff03 --- /dev/null +++ b/src/net_robot/test/test_copyright.py @@ -0,0 +1,23 @@ +# Copyright 2015 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_copyright.main import main +import pytest + + +@pytest.mark.copyright +@pytest.mark.linter +def test_copyright(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found errors' diff --git a/src/net_robot/test/test_flake8.py b/src/net_robot/test/test_flake8.py new file mode 100644 index 0000000..27ee107 --- /dev/null +++ b/src/net_robot/test/test_flake8.py @@ -0,0 +1,25 @@ +# Copyright 2017 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_with_errors +import pytest + + +@pytest.mark.flake8 +@pytest.mark.linter +def test_flake8(): + rc, errors = main_with_errors(argv=[]) + assert rc == 0, \ + 'Found %d code style errors / warnings:\n' % len(errors) + \ + '\n'.join(errors) diff --git a/src/net_robot/test/test_pep257.py b/src/net_robot/test/test_pep257.py new file mode 100644 index 0000000..b234a38 --- /dev/null +++ b/src/net_robot/test/test_pep257.py @@ -0,0 +1,23 @@ +# Copyright 2015 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_pep257.main import main +import pytest + + +@pytest.mark.linter +@pytest.mark.pep257 +def test_pep257(): + rc = main(argv=['.', 'test']) + assert rc == 0, 'Found code style errors / warnings'