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

Fix rolling CI #162

Merged
merged 2 commits into from
Dec 18, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ repos:
rev: 23.3.0
hooks:
- id: black
args: ["--skip-string-normalization"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: double-quote-string-fixer

- repo: local
hooks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@


def no_args_validator(param):
return ""
return ''


def validate_double_array_custom_func(param, arg1, arg2):
return ""
return ''
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

import rclpy
import rclpy.node

from generate_parameter_module_example.admittance_parameters import (
admittance_controller,
)

import rclpy
import rclpy.node


class MinimalParam(rclpy.node.Node):
def __init__(self):
super().__init__("admittance_controller")
super().__init__('admittance_controller')
self.timer = self.create_timer(1, self.timer_callback)

self.param_listener = admittance_controller.ParamListener(self)
Expand Down Expand Up @@ -71,5 +71,5 @@ def main(args=None):
rclpy.spin(node)


if __name__ == "__main__":
if __name__ == '__main__':
main()
33 changes: 17 additions & 16 deletions example_python/setup.py
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
# -*- coding: utf-8 -*-
import sys

from setuptools import setup

package_name = "generate_parameter_module_example"
package_name = 'generate_parameter_module_example'

if len(sys.argv) >= 2 and sys.argv[1] != "clean":
if len(sys.argv) >= 2 and sys.argv[1] != 'clean':
from generate_parameter_library_py.setup_helper import generate_parameter_module

# set module_name and yaml file
module_name = "admittance_parameters"
yaml_file = "generate_parameter_module_example/parameters.yaml"
validation_module = "generate_parameter_module_example.custom_validation"
module_name = 'admittance_parameters'
yaml_file = 'generate_parameter_module_example/parameters.yaml'
validation_module = 'generate_parameter_module_example.custom_validation'
generate_parameter_module(
module_name, yaml_file, validation_module=validation_module
)

setup(
name=package_name,
version="0.3.6",
version='0.3.6',
packages=[package_name],
data_files=[
("share/ament_index/resource_index/packages", ["resource/" + package_name]),
("share/" + package_name, ["package.xml"]),
('share/ament_index/resource_index/packages', ['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=["setuptools"],
install_requires=['setuptools'],
zip_safe=True,
maintainer="Paul Gesel",
maintainer_email="paulgesel@gmail.com",
description="Example usage of generate_parameter_library for a python module",
license="BSD-3-Clause",
tests_require=["pytest"],
maintainer='Paul Gesel',
maintainer_email='paulgesel@gmail.com',
description='Example usage of generate_parameter_library for a python module',
license='BSD-3-Clause',
tests_require=['pytest'],
entry_points={
"console_scripts": [
"test_node = generate_parameter_module_example.minimal_publisher:main"
'console_scripts': [
'test_node = generate_parameter_module_example.minimal_publisher:main'
],
},
)
6 changes: 3 additions & 3 deletions example_python/test/test_copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

# Remove the `skip` decorator once the source file(s) have a copyright header
@pytest.mark.skip(
reason="No copyright header has been placed in the generated source file."
reason='No copyright header has been placed in the generated source file.'
)
@pytest.mark.copyright
@pytest.mark.linter
def test_copyright():
rc = main(argv=[".", "test"])
assert rc == 0, "Found errors"
rc = main(argv=['.', 'test'])
assert rc == 0, 'Found errors'
4 changes: 2 additions & 2 deletions example_python/test/test_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
@pytest.mark.linter
def test_flake8():
rc, errors = main_with_errors(argv=[])
assert rc == 0, "Found %d code style errors / warnings:\n" % len(
assert rc == 0, 'Found %d code style errors / warnings:\n' % len(
errors
) + "\n".join(errors)
) + '\n'.join(errors)
4 changes: 2 additions & 2 deletions example_python/test/test_pep257.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
@pytest.mark.linter
@pytest.mark.pep257
def test_pep257():
rc = main(argv=[".", "test"])
assert rc == 0, "Found code style errors / warnings"
rc = main(argv=['.', 'test'])
assert rc == 0, 'Found code style errors / warnings'
Loading
Loading