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

🧠 Ingest OIO trigger and suppress relevant predictions #351

Merged
merged 7 commits into from
May 14, 2024

Conversation

bfauble
Copy link
Contributor

@bfauble bfauble commented May 8, 2024

Summary of changes

Asana Ticket: Fetch Config

  • Add actual fetching from live feeds
  • NOTE: updating field placement in json blob config in devops pr here: https://github.com/mbta/devops/pull/1769
  • Will need to wait on devops merge/apply to be able to properly make use of config

@bfauble bfauble requested review from a team and nlwstein and removed request for a team May 8, 2024 22:24
Copy link

github-actions bot commented May 8, 2024

Coverage of commit 18d5863

Summary coverage rate:
  lines......: 92.8% (1458 of 1571 lines)
  functions..: 81.0% (477 of 589 functions)
  branches...: no data found

Files changed coverage rate:
                                                                    |Lines       |Functions  |Branches    
  Filename                                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================================
  lib/concentrate.ex                                                |82.1%     67|93.8%    16|    -      0
  lib/concentrate/filter/suppress/supervisor.ex                     | 100%      3| 100%     2|    -      0
  lib/concentrate/supervisor.ex                                     | 100%     15| 100%     8|    -      0

Download coverage report

Copy link
Contributor

@nlwstein nlwstein left a comment

Choose a reason for hiding this comment

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

Overall looks good, just a few minor thoughts that are non-blocking.

@@ -74,8 +77,8 @@ config :concentrate,
Concentrate.GroupFilter.VehicleStopMatch,
Concentrate.GroupFilter.SkippedStopOnAddedTrip,
Concentrate.GroupFilter.TripDescriptorTimestamp,
Concentrate.GroupFilter.UncertaintyValue
# Concentrate.GroupFilter.SuppressStopTimeUpdate Enable once fully implemented
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I'm ambivalent personally, but there seems to be a preference here towards avoiding commented code. Maybe this should just be whacked, and then added when it's actually in use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was actually already merged in and is being updated in this PR

Supervisor.start_link(
[
{
Concentrate.producer_for_url(config[:url]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth adding a test to either confirm that it actually starts pulling this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure thing, focusing on getting the terraform changes in so that I can put this on dev for more thorough testing but can add a test for this

Copy link

Coverage of commit de45a32

Summary coverage rate:
  lines......: 92.5% (1485 of 1606 lines)
  functions..: 81.3% (488 of 600 functions)
  branches...: no data found

Files changed coverage rate:
                                                                    |Lines       |Functions  |Branches    
  Filename                                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================================
  lib/concentrate.ex                                                |82.1%     67|93.8%    16|    -      0
  lib/concentrate/filter/suppress/stop_prediction_status.ex         | 100%     19| 100%     6|    -      0
  lib/concentrate/filter/suppress/supervisor.ex                     | 100%      3| 100%     2|    -      0
  lib/concentrate/parser/signs_config.ex                            | 100%      7| 100%     3|    -      0
  lib/concentrate/producer/s3.ex                                    |76.5%     34| 100%    10|    -      0
  lib/concentrate/supervisor.ex                                     | 100%     15| 100%     8|    -      0

Download coverage report

@bfauble bfauble requested a review from nlwstein May 13, 2024 22:47
end)
end

defp parse_response(body, state) do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nlwstein this was added so that the events list wasn't empty if the new state should be empty. otherwise the GenStage does not actually pass along the empty array as a message.

Copy link

Coverage of commit c7cffab

Summary coverage rate:
  lines......: 92.5% (1486 of 1607 lines)
  functions..: 81.3% (488 of 600 functions)
  branches...: no data found

Files changed coverage rate:
                                                                    |Lines       |Functions  |Branches    
  Filename                                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================================
  lib/concentrate.ex                                                |82.1%     67|93.8%    16|    -      0
  lib/concentrate/filter/suppress/stop_prediction_status.ex         | 100%     19| 100%     6|    -      0
  lib/concentrate/filter/suppress/supervisor.ex                     | 100%      3| 100%     2|    -      0
  lib/concentrate/parser/signs_config.ex                            | 100%      5| 100%     2|    -      0
  lib/concentrate/producer/s3.ex                                    |78.4%     37| 100%    11|    -      0
  lib/concentrate/supervisor.ex                                     | 100%     15| 100%     8|    -      0

Download coverage report

Copy link

Coverage of commit 81a7776

Summary coverage rate:
  lines......: 92.5% (1487 of 1608 lines)
  functions..: 81.3% (488 of 600 functions)
  branches...: no data found

Files changed coverage rate:
                                                                    |Lines       |Functions  |Branches    
  Filename                                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================================
  lib/concentrate.ex                                                |82.1%     67|93.8%    16|    -      0
  lib/concentrate/filter/suppress/stop_prediction_status.ex         | 100%     20| 100%     6|    -      0
  lib/concentrate/filter/suppress/supervisor.ex                     | 100%      3| 100%     2|    -      0
  lib/concentrate/parser/signs_config.ex                            | 100%      5| 100%     2|    -      0
  lib/concentrate/producer/s3.ex                                    |78.4%     37| 100%    11|    -      0
  lib/concentrate/supervisor.ex                                     | 100%     15| 100%     8|    -      0

Download coverage report

Copy link

Coverage of commit 09c9bfb

Summary coverage rate:
  lines......: 92.2% (1483 of 1608 lines)
  functions..: 81.2% (487 of 600 functions)
  branches...: no data found

Files changed coverage rate:
                                                                    |Lines       |Functions  |Branches    
  Filename                                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================================
  lib/concentrate.ex                                                |82.1%     67|93.8%    16|    -      0
  lib/concentrate/filter/suppress/stop_prediction_status.ex         | 100%     20| 100%     6|    -      0
  lib/concentrate/filter/suppress/supervisor.ex                     | 100%      3| 100%     2|    -      0
  lib/concentrate/parser/signs_config.ex                            | 100%      5| 100%     2|    -      0
  lib/concentrate/producer/s3.ex                                    |78.4%     37| 100%    11|    -      0
  lib/concentrate/supervisor.ex                                     | 100%     15| 100%     8|    -      0

Download coverage report

@bfauble bfauble merged commit 4ee6698 into master May 14, 2024
3 checks passed
@bfauble bfauble deleted the bf-fetch-signs-config branch May 14, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants