-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ROS2 tools and add unit tests with CI (#15)
* Simplified within_bounds function by removing redundant 'elif' condition. Improved code readability and maintainability. (#13) * Add unit tests and CI. (#14) * refactor: better error handling and response parsing for ROS2 tools, add blacklist where applicable. * feat(ros2): add ros2 topic echo tool. * chore: bump version to 1.0.4, update CHANGELOG.md * chore: bump langchain versions. * feat(tests): add unit tests for most tools and the ROSATools class. * fix: passing a blacklist into any of the tools no longer overrides the blacklist passed into the ROSA constructor. They are concatenated instead. * feat(CI): add ci workflow. * fix: properly filter out blacklisted topics and nodes. * feat(tests): add ros2 tests. * feat(ci): update humble jobs. * feat(tests): add stubs for additional test classes. * docs: update README * chore: bump version to 1.0.5 --------- Co-authored-by: Kejun Liu <119113065+dawnkisser@users.noreply.github.com>
- Loading branch information
1 parent
261c56a
commit fdca5a1
Showing
22 changed files
with
1,723 additions
and
123 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
test-noetic: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: osrf/ros:noetic-desktop | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libc6 libc6-dev | ||
sudo apt-get install -y python3.9 | ||
sudo apt-get install -y python3-pip | ||
python3.9 -m pip install --user -e . | ||
shell: bash | ||
|
||
- name: Run tests | ||
run: | | ||
. /opt/ros/noetic/setup.bash | ||
python3.9 -m unittest discover -s tests --verbose | ||
shell: bash | ||
env: | ||
ROS_VERSION: 1 | ||
|
||
test-humble: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: osrf/ros:humble-desktop | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y python3-pip | ||
python3.10 -m pip install --user -e . | ||
shell: bash | ||
|
||
- name: Run tests | ||
run: | | ||
. /opt/ros/humble/setup.bash | ||
python3.10 -m unittest discover -s tests --verbose | ||
shell: bash | ||
env: | ||
ROS_VERSION: 2 |
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 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 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 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 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 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
Oops, something went wrong.