-
Notifications
You must be signed in to change notification settings - Fork 13
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 functions for getting interface names and paths #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a direct copy of the definitions found in the ros2interface package: https://github.com/ros2/ros2cli/blob/8ece0f10feba00f596514185a02cc293266e3e20/ros2interface/ros2interface/api/__init__.py Since these functions are specific to rosidl, this package seems like a more appropriate place for them to live. This will also let them be easier reused by several of the ros2cli packages (and potentially elsewhere in the future). Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Renamed functions and variables for consistency 'types' -> 'interfaces' * Consolidated implementation for get_*interfaces() functions. They call a common implementation and filter the results for the type. * Always returns the fully-qualified name of the type (e.g. no implicit 'msg/' prefix). * Update get_interface_path() to try appending a suffix based on namespace. This will make usage nicer for the user, notably in the CLI tools when they are updated to use the new implementation. * Added docstrings and type annotations. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Ready for review. |
jacobperron
added a commit
to ros2/ros2cli
that referenced
this pull request
Oct 19, 2019
This resolves several TODOs. Here is the PR moving the related functions to their new home: ros2/rosidl_runtime_py#3 Signed-off-by: Jacob Perron <jacob@openrobotics.org>
mjcarroll
approved these changes
Oct 19, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many closed out TODOs! 🎊
jacobperron
added a commit
to ros2/ros2cli
that referenced
this pull request
Oct 19, 2019
* Move rosidl implementation details to rosidl_runtime_py This resolves several TODOs. Here is the PR moving the related functions to their new home: ros2/rosidl_runtime_py#3 Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Remove dependencies on deprecated packages Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Remove obsolete test Signed-off-by: Jacob Perron <jacob@openrobotics.org> * make linters happy :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementation was copied from ros2/ros2cli (0de8f53) and then refactored (1ce5a76).
Since these functions are specific to rosidl, this package seems like a more appropriate place for them to live.
This will also let them be easier reused by several of the ros2cli packages (and potentially elsewhere in the future).
I'll follow-up shortly with a PR to ros2/ros2cli to make use of the implementation in this package.
I'm opening for visibility and early review while I add unit tests.(unit tests added)I should add that this should resolve many TODOs in the ros2cli repository, for example:
https://github.com/ros2/ros2cli/blob/80921ce1577277ef4a68184d6c2cba7d63c74b95/ros2topic/ros2topic/api/__init__.py#L60
https://github.com/ros2/ros2cli/blob/80921ce1577277ef4a68184d6c2cba7d63c74b95/ros2interface/ros2interface/api/__init__.py#L99
https://github.com/ros2/ros2cli/blob/80921ce1577277ef4a68184d6c2cba7d63c74b95/ros2interface/ros2interface/api/__init__.py#L124
https://github.com/ros2/ros2cli/blob/80921ce1577277ef4a68184d6c2cba7d63c74b95/ros2interface/ros2interface/api/__init__.py#L149
https://github.com/ros2/ros2cli/blob/80921ce1577277ef4a68184d6c2cba7d63c74b95/ros2interface/ros2interface/api/__init__.py#L162