-
Notifications
You must be signed in to change notification settings - Fork 2
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: refactor function application over source_config
values
#798
Conversation
836b0f0
to
26a4332
Compare
SourceConfig.map/2
and SourceConfig.simplify/1
cd21347
to
7dc83b0
Compare
33c4f7c
to
5cd10ec
Compare
Since these are both only used in one module, and The improvement in readability for the calling code is nice, though. Maybe these could be private functions? Edit: I'm just noticing this is a |
90c4be5
to
80cdebc
Compare
5cd10ec
to
a01cdcc
Compare
@digitalcora lol hey cora! yeah this is just something i pushed up as an example (referenced here #797 (comment)) |
3153b1d
to
c595cc0
Compare
200310d
to
f24bf44
Compare
SourceConfig.map/2
and SourceConfig.simplify/1
source_config
values
f24bf44
to
39a2864
Compare
@digitalcora I've incorporated your feedback to make this a more reasonable refactoring change. I've changed this to only define |
Defines `map_source_config/2`, a function for applying a function to SourceConfig values (both single and top/bottom--tuple). Uses the new `map_source_config/2` function to calculate `alert_status`, `first_scheduled_departures`, and `service_end_statuses_per_source`.
39a2864
to
5c1af3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Summary of changes
Defines
map_source_config/2
, a function for applying a function to SourceConfig values (both single and top/bottom--tuple).Uses the new
map_source_config/2
function to calculatealert_status
,first_scheduled_departures
, andservice_end_statuses_per_source
.Reviewer Checklist