Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Shuttles): add retrieval of estimates for time to next stop #1043

Merged
merged 26 commits into from
Dec 13, 2024

Conversation

meagharty
Copy link
Contributor

Summary of changes

Asana Ticket: Implement "Create/Edit Shuttle Route Definition" - Time to Next Stop

  • Adds feature to Shuttle page to retrieve travel time estimates between shuttle stops
  • Add OpenRouteServiceAPI module, a slightly modified version of skate's

Reviewer Checklist

  • Meets ticket's acceptance criteria
  • Any new or changed functions have typespecs
  • Tests were added for any new functionality (don't just rely on Codecov)
  • This branch was deployed to the staging environment and is currently running with no unexpected increase in warnings, and no errors or crashes.

@meagharty meagharty changed the title feat: add feat(Shuttles): add retrieval of estimates for time to next stop Nov 26, 2024
@meagharty meagharty marked this pull request as ready for review November 27, 2024 22:08
@meagharty meagharty requested review from a team and bfauble and removed request for a team and bfauble November 27, 2024 22:09
@meagharty meagharty force-pushed the meag/shuttle-add-time-to-next-stop branch from 78bf2c6 to 802dde8 Compare December 2, 2024 15:10
@fsaid90 fsaid90 requested review from a team and bfauble and removed request for bfauble and a team December 2, 2024 15:11
@meagharty meagharty requested review from a team and jzimbel-mbta and removed request for a team December 2, 2024 15:20
@@ -67,9 +69,37 @@ defmodule Arrow.ShuttlesFixtures do
def unique_shuttle_route_destination,
do: "some shuttle_route_destination#{System.unique_integer([:positive])}"

defp shuttle_routes do
defp shuttle_route_stops do
[stop1, stop2, stop3, stop4] = insert_list(4, :gtfs_stop)
Copy link
Contributor Author

@meagharty meagharty Dec 2, 2024

Choose a reason for hiding this comment

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

Noting this because it's not obvious from this PR: phoenix generators with Ecto produce this file with fixtures by default -- I like these as they call the Ecto.Changeset functions (through create_*, in this case on line 139). I believe that's the main difference between these and the manually created ExMachina test data in Arrow.Factory.

We are using ExMachina with options for Ecto where it'll do inserts for you through functions like insert_list. We have one set up for Arrow.Shuttles.Stop and one for Arrow.Gtfs.Stop in Arrow.Factory

@meagharty meagharty force-pushed the meag/shuttle-add-time-to-next-stop branch from be18956 to bf1622b Compare December 5, 2024 17:12
@meagharty meagharty force-pushed the meag/shuttle-add-time-to-next-stop branch 4 times, most recently from 059f67d to cba8239 Compare December 6, 2024 23:20
@@ -13,6 +13,9 @@
- PostgreSQL 15
- Can be run as a container via docker-compose by running `docker-compose up -d` in this repository (see `docker-compose.yml`)
- Using Homebrew: `brew install postgresql@15`
- OpenRouteService
- Can use https://api.openrouteservice.org/ with an API key requested through their console
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hit some issues locally running ORS in docker-compose (it works but after a while it has issues). I expect I need to fine-tune my colima setup for docker-compose.

@meagharty meagharty merged commit 609386d into master Dec 13, 2024
10 checks passed
@meagharty meagharty deleted the meag/shuttle-add-time-to-next-stop branch December 13, 2024 22:31
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.

3 participants