Skip to content

feat(bfs.py): implement bfs algorithm and appropriate tests#42

Merged
ChronoInferna merged 1 commit intomainfrom
oliver
Nov 4, 2025
Merged

feat(bfs.py): implement bfs algorithm and appropriate tests#42
ChronoInferna merged 1 commit intomainfrom
oliver

Conversation

@ChronoInferna
Copy link
Copy Markdown
Owner

This pull request introduces a breadth-first search (BFS) algorithm implementation and removes the placeholder for the unimplemented A* algorithm. The BFS algorithm is now integrated into the test suite and the package's public API. Test cases have been updated to account for BFS's characteristics, such as ignoring edge weights, and to remove references to A*.

Algorithm implementation:

  • Added a new bfs algorithm in waypoint/algorithms/bfs.py, which finds a path in a graph using breadth-first search and returns a Path object.
  • Removed the unimplemented a_star function and its file waypoint/algorithms/a_star.py.

API and test updates:

  • Updated waypoint/algorithms/__init__.py to export bfs instead of a_star.
  • Modified tests/test_algorithms.py to import and test bfs instead of a_star, and adjusted test logic to account for BFS's path selection (e.g., not considering weights). [1] [2] [3] [4]

Minor improvements:

  • Adjusted the Path.from_list method signature in waypoint/path.py to require the time argument, ensuring consistency with its usage in the new BFS implementation.

@ChronoInferna ChronoInferna merged commit 00b2a65 into main Nov 4, 2025
2 checks passed
@ChronoInferna ChronoInferna deleted the oliver branch November 4, 2025 05:00
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.

1 participant