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

chore(Fares): remove obsolete logic #2119

Merged
merged 2 commits into from
Jul 8, 2024
Merged

chore(Fares): remove obsolete logic #2119

merged 2 commits into from
Jul 8, 2024

Conversation

thecristen
Copy link
Collaborator

While cleaning up code from my (ongoing) trip planner refactoring, I realized there was some fare-calculating logic involved in Fares.fare_for_stops/4 that is no longer relevant

  • The Foxboro pilot logic is from 2019, I'm pretty sure there's no pilot effort involved anymore...
  • The combo zones that were introduced in 2020 (PR Add support for special "combo" zones #601) are no longer relevant, as there are no more 1A-2 or such zones.

This made the trip argument no longer needed, so I got to remove it from way too many function calls.

In the meantime I also removed the :external tag from a bunch of related tests to stop skipping them, and added the necessary mocks to make those tests work.

@thecristen thecristen requested a review from a team as a code owner July 3, 2024 00:07
@thecristen thecristen requested a review from bklebe July 3, 2024 00:07

import Mox

alias Test.Support.Factories.{Routes.Route, Stops.Stop}
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (non-blocking): I try not to nitpick style in general but I've come to believe in the utility of this Credo check: https://hexdocs.pm/credo/Credo.Check.Consistency.MultiAliasImportRequireUse.html because splitting up the aliases instead of grouping them by root (as here) makes it easier to grep for module usage in the codebase. Thoughts?

@thecristen thecristen merged commit e7eb1f4 into main Jul 8, 2024
26 checks passed
@thecristen thecristen deleted the cbj/fares-cleanup branch July 8, 2024 19:17
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.

2 participants