Closed jhanley634 closed 2 months ago
This pull request introduces several changes to improve code organization, add new features, and enhance the existing functionality of the project. The changes include updates to the Makefile, database management, vehicle tracking, ISS position tracking, and the addition of new utility functions and tests.
Change | Details | Files |
---|---|---|
Update Makefile to improve build and test processes |
|
Makefile |
Enhance database management with pruning functionality |
|
src/bboard/util/database.py |
Refactor and optimize vehicle tracking functionality |
|
src/bboard/transit/vehicles.py |
Update main application file with new features |
|
src/bboard/main.py |
Modify request caching behavior |
|
src/bboard/util/requests.py |
Adjust periodic update intervals for transit data |
|
src/bboard/util/lifespan_mgmt.py |
Add new tests and update existing ones |
|
tests/iss_test.py tests/vehicles_test.py |
Modify ISS tracking visualization |
|
src/bboard/transit/iss.py |
Add new utility functions and tests |
|
src/bboard/util/cache_buster.py tests/cache_buster_test.py src/bboard/util/testing.py tests/headlines_test.py |
Implement news headline fetching |
|
src/bboard/newsfeed/headlines.py |
Add new test for database pruning |
|
tests/database_test.py |
Add trip report markdown file |
|
talks/2024-09-24-trip-report.md |
sequenceDiagram
participant Main
participant TransitUpdate
participant VehicleTracking
participant Database
Main->>TransitUpdate: Start periodic update
loop Every 91 seconds
TransitUpdate->>VehicleTracking: store_vehicle_journeys(agency)
VehicleTracking->>Database: Store vehicle data
Database-->>VehicleTracking: Confirm storage
VehicleTracking-->>TransitUpdate: Update complete
end
Main->>Database: prune_ancient_rows()
Database-->>Main: Pruning complete
Summary by Sourcery
Add new features for database maintenance and news headline fetching, enhance request rate limiting, and improve test coverage with new and updated tests.
New Features:
prune_ancient_rows
to remove old database entries, preventing the database file from growing indefinitely./favicon.ico
to serve a logo file.Enhancements:
patch_requests_module
to one request every six minutes.store_vehicle_journeys
function to handle cases where theVehicleActivity
key might be missing.transit_periodic_update
function to better manage API rate limits by adjusting the delay between requests.Tests:
cache_buster_test.py
.prune_ancient_rows
function indatabase_test.py
.headlines_test.py
.