Ferry[feat]: Handle changes to ferry fares for F10 and F2H#3190
Ferry[feat]: Handle changes to ferry fares for F10 and F2H#3190lvachon1 wants to merge 2 commits into
Conversation
…$2.40), and the new loop ferry (Boat-F10) fare ($2.40) Also fixed a bug I noticed with the East Boston ferry where it was charging $9.75 for a journey that should be $2.40 (Long Wharf to Logan). I might want to make a better solution for that if it happens on other route combos. Unable to test the Boat-F10 stuff yet locally, will do so on dev green.
…e trips with same origin and destination to satisfy the test code. Updated test error to be a bit more specific
|
Hmmmm, related to my comment, would this trip (first result) actually only cost $2.40, or would it cost $9.75 (or twice that?) because it does a full round-trip through Hingham, Hull, and back?
|
joshlarson
left a comment
There was a problem hiding this comment.
Oops - I left a comment that alluded to one of my detailed comments here, and I thought that would pull my other comments out of the Pending state. Alas... this comment should do that though!
| :ferry_east_boston | ||
| end | ||
|
|
||
| def calculate_ferry(origin, destination) |
There was a problem hiding this comment.
Suggestion/Question (non-blocking): I'm somewhat new to this code, but would it simplify this if we made a list of inner harbor stops, something like:
@inner_harbor_stops [
"Boat-Lewis",
"Boat-Logan",
"Boat-Long",
# etc...
]and then compared like
def calculate_ferry(origin, destination)
when origin in @inner_harbor_stops
and destination in @inner_harbor_stops do
:ferry_east_boston
endI'm not sure that would work quite as simply as I just said, because 👇 trip starts and ends in the inner harbor, but goes out to Quincy in between, which does justify the $6.50 cost.... but I do think there's gotta be an easier way than trying to list out all of the possible origin/destination pairs.
Maybe if we checked the origin and destination and all intermediate stops? I dunno <-- and that's part of why this comment is non-blocking! 😅
There was a problem hiding this comment.
I'm not sure if there's a simple way to calculate ferry fares based on intermediate stops given the current code structure. It seems only to from and route are the only things used in the fare calculation when no transfers are involved.

Scope
Asana Ticket: ⛴️ 💸 Handle changes to ferry fares for F10 and F2H
Implementation
Unable to test the Boat-F10 stuff yet locally, will do so on dev green.
Screenshots
Wrong fare on dev for E. Boston Ferry to Logan
Fixed on branch
$2.40 Fare for Hinghum/Hull to Logan
$2.40 Fare for Loop Ferry Trips
...Coming Soon
How to test
https://dev-green.mbtace.com/trip-planner?plan=h8QVX3VudXNlZF9kYXRldGltZV90eXBlxADEEl91bnVzZWRfd2hlZWxjaGFpcsQAxAhkYXRldGltZcQZMjAyNi0wNi0xMlQxNTo1MDowMC0wNDowMMQNZGF0ZXRpbWVfdHlwZcQIbGVhdmVfYXTEBGZyb22ExAhsYXRpdHVkZcQJNDIuMzY1NTc3xAlsb25naXR1ZGXECS03MS4wNjEyOcQEbmFtZcQNTm9ydGggU3RhdGlvbsQHc3RvcF9pZMQLcGxhY2Utbm9ydGjEBW1vZGVzhsQDQlVTxAVmYWxzZcQFRkVSUlnEBHRydWXEBFJBSUzEBWZhbHNlxAZTVUJXQVnEBWZhbHNlxA5fcGVyc2lzdGVudF9pZMQBMMQNX3VudXNlZF9GRVJSWcQAxAJ0b4TECGxhdGl0dWRlxAk0Mi4zNTk3ODnECWxvbmdpdHVkZcQJLTcxLjAyNzM0xARuYW1lxBxMb2dhbiBBaXJwb3J0IEZlcnJ5IFRlcm1pbmFsxAdzdG9wX2lkxApCb2F0LUxvZ2Fu
Look for Loop Ferry Fares
Look for East Boston Fares
Look for Hingham/Hull Fares