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

Add pkg xml verb #280

Merged
merged 7 commits into from Jun 12, 2019

Conversation

@artivis
Copy link
Contributor

commented Jun 11, 2019

Add the xml verb to pkg.
By default it prints the whole xml manifest of a given package. User can request for a particular tag with the --tag option.

E.g.

$ ros2 pkg xml demo_nodes_cpp -t version
0.7.6
$
$ ros2 pkg xml demo_nodes_cpp -t test_depend
ament_cmake_pytest
ament_lint_auto
ament_lint_common
launch
launch_testing
launch_testing_ament_cmake
launch_testing_ros
add pkg xml verb
Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

I did not find the use of any particular xml parser lib thus I used xml.etree.ElementTree. Let me know if there is actually one lying around.

ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
artivis added 4 commits Jun 11, 2019
fix helper wording
Signed-off-by: artivis <jeremie.deray@canonical.com>
fix logic & default tag opt
Signed-off-by: artivis <jeremie.deray@canonical.com>
typo
Signed-off-by: artivis <jeremie.deray@canonical.com>
fix pkg name autocomplete
Signed-off-by: artivis <jeremie.deray@canonical.com>

@artivis artivis force-pushed the artivis:feature/pkg_xml branch from cc0eb2c to eec5275 Jun 11, 2019

ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
ros2pkg/ros2pkg/verb/xml.py Outdated Show resolved Hide resolved
artivis and others added 2 commits Jun 12, 2019
exit earlier & use None actual type
Signed-off-by: artivis <jeremie.deray@canonical.com>
minor updates
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Thanks for the quick updates. I made a few minor tweaks in 180fb5c:

  • capitalize the word "XML"
  • update the help text for "--tag" to include an example
  • avoid the else if the if block calls return
  • fix the indentation in the for loop

This looks great - thank you for contributing this feature.

@dirk-thomas dirk-thomas merged commit e295052 into ros2:master Jun 12, 2019

1 check passed

DCO DCO
Details

@artivis artivis deleted the artivis:feature/pkg_xml branch Jun 12, 2019

@kyrofa kyrofa referenced this pull request Sep 4, 2019
21 of 23 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.