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

ros2 pkg create for ament_python packages should include xmllint #944

Open
sloretz opened this issue Oct 28, 2024 · 0 comments
Open

ros2 pkg create for ament_python packages should include xmllint #944

sloretz opened this issue Oct 28, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@sloretz
Copy link
Contributor

sloretz commented Oct 28, 2024

Feature request

ament/ament_cmake#553

Feature description

New ament_python packages should include an xmllint test to match the default linters given to ament_cmake packages

Implementation considerations

Copy this file:

https://github.com/ros2/ros2cli/blob/rolling/ros2pkg/test/test_xmllint.py

Here:

https://github.com/ros2/ros2cli/tree/rolling/ros2pkg/ros2pkg/resource/ament_python

Make sure test/test_xmllint.py is created in new packages here:

test_directory = _create_folder('test', package_directory)
_create_template_file('ament_python',
'test_copyright.py.em',
test_directory,
'test_copyright.py',
{})
_create_template_file('ament_python',
'test_flake8.py.em',
test_directory,
'test_flake8.py',
{})
_create_template_file('ament_python',
'test_pep257.py.em',
test_directory,
'test_pep257.py',
{})

Make sure the package.xml gets a <test_depend> on ament_xmllint here:

test_dependencies = ['ament_copyright', 'ament_flake8', 'ament_pep257',
'python3-pytest']

Bonus: create ament_python equivalent tests with assertion that test/test_xmllint.py exists here:

def test_create_package(self):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant