Repository navigation
fix: 🐛 Skip the search GIF in path planning smoke tests - #152
Merged
Merged
Conversation
7 path planning simulations always passed gif_name to the planner, so every test run encoded multi-MB search GIFs and overwrote the committed demo GIFs. Pass gif_name only when show_plot is true, like aco/elastic_bands, and make the planners return early when gif_name is None. Before this, None made 6 planners call plt.show() and made informed RRT* fail with Path(None). path.json still changes after tests because RRT planners are unseeded; that is handled in #90. Closes #87 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
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.
Summary
7 path planning simulations always passed
gif_name=search_gif_pathto the planner, so every smoke test encoded multi-MB search GIFs and overwrote the committed demo GIFs.This PR passes the GIF name only when
show_plotis true, following aco / elastic_bands.Closes #87
Changes
astar,astar_bidirectional,dijkstra,rrt,rrt_star,rrt_star_bidirectional,informed_rrt_star):gif_name=search_gif_path if show_plot else Nonevisualize_search()returns early whengif_name is None, likeAntColonyPathPlanner. Changing only the simulations was not enough:plt.show()whengif_namewasNone, which opens a window and blocks the test when a display is availableInformedRrtStarPathPlannercalledPath(None)and raisedTypeErrorelse: plt.show()branch is removed. No caller passesgif_name=Nonetoday (each planner's__main__passes a GIF path)Test
rrt571s,dijkstra446s)src/simulations/path_planning/is written by the tests anymoreAStarPathPlannerandInformedRrtStarPathPlanner)Not in this PR
path.jsonof the RRT planners still changes after the tests because they use unseeded random numbers. Fixing the seed is the scope of #90, sogit statusbecomes fully clean after #90.🤖 Generated with Claude Code