Skip to content

Conversation

dawnkisser
Copy link
Contributor

@dawnkisser dawnkisser commented Aug 23, 2024

Refactor: Simplified boundary check logic in within_bounds function

  • Removed redundant 'elif' condition that duplicated the 'if' logic.
  • Improved code readability by using a single 'else' block to handle out-of-bounds cases.
  • The refactored logic maintains the same functionality while reducing unnecessary complexity.

…ion. Improved code readability and maintainability.
Copy link
Collaborator

@RobRoyce RobRoyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch, thank you!

@RobRoyce RobRoyce merged commit 5573671 into nasa-jpl:dev Aug 23, 2024
RobRoyce added a commit that referenced this pull request Aug 23, 2024
* 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>
RobRoyce added a commit that referenced this pull request Aug 30, 2024
* 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.

* Simplified within_bounds function by removing redundant 'elif' condition. Improved code readability and maintainability. (#13)

* Add unit tests and CI. (#14)

* 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(ci): finalize initial version of ci.

* feat(tests): add stubs for additional test classes.

* docs: update README

* chore: bump version to 1.0.5

* fix typos (#17)

* Add streaming support (#19)

* chore: remove verbose logging where it isn't required.

* chore: remove unnecessary apt installations.

* fix: minor typo

* chore: update gitignore

* chore: update PR template

* Update turtle agent demo to support streaming responses.

* feat(streaming): add the ability to stream responses from ROSA.

* feat(demo): update demo script, apply formatting.

* feat(demo): update demo TUI, fix bounds checking in turtle tools.

* feat(demo): clean up Docker demo, add another example of adding tools to the agent.

* docs: update README.

* docs: update README.

* Update README.md

* chore: minor formating and linting.

* chore: switch setup configuration to use pyproject.toml

* feat(demo): properly implement streaming REPL interface.

* chore: bump version to 1.0.6

* chore: specify version in CHANGELOG.

---------

Co-authored-by: Kejun Liu <119113065+dawnkisser@users.noreply.github.com>
Co-authored-by: Kejun Liu <kfo@shu.edu.cn>
Shu980101 pushed a commit to Shu980101/rosa that referenced this pull request Feb 1, 2025
* Simplified within_bounds function by removing redundant 'elif' condition. Improved code readability and maintainability. (nasa-jpl#13)

* Add unit tests and CI. (nasa-jpl#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>
Shu980101 pushed a commit to Shu980101/rosa that referenced this pull request Feb 1, 2025
* 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.

* Simplified within_bounds function by removing redundant 'elif' condition. Improved code readability and maintainability. (nasa-jpl#13)

* Add unit tests and CI. (nasa-jpl#14)

* 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(ci): finalize initial version of ci.

* feat(tests): add stubs for additional test classes.

* docs: update README

* chore: bump version to 1.0.5

* fix typos (nasa-jpl#17)

* Add streaming support (nasa-jpl#19)

* chore: remove verbose logging where it isn't required.

* chore: remove unnecessary apt installations.

* fix: minor typo

* chore: update gitignore

* chore: update PR template

* Update turtle agent demo to support streaming responses.

* feat(streaming): add the ability to stream responses from ROSA.

* feat(demo): update demo script, apply formatting.

* feat(demo): update demo TUI, fix bounds checking in turtle tools.

* feat(demo): clean up Docker demo, add another example of adding tools to the agent.

* docs: update README.

* docs: update README.

* Update README.md

* chore: minor formating and linting.

* chore: switch setup configuration to use pyproject.toml

* feat(demo): properly implement streaming REPL interface.

* chore: bump version to 1.0.6

* chore: specify version in CHANGELOG.

---------

Co-authored-by: Kejun Liu <119113065+dawnkisser@users.noreply.github.com>
Co-authored-by: Kejun Liu <kfo@shu.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants