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

Feature 2373- move widgets to all locations #2511

Closed
wants to merge 8 commits into from

Conversation

EliorGigi
Copy link
Contributor

Changes Made

  1. Moved the following widgets from road_segment_widgets to all_location_widgets:

    • killed_and_injured_count_per_age_group
    • killed_and_injured_count_per_age_group_stacked
    • injured_count_by_severity
  2. Fixed the /api/infographics-data endpoint's news_flash_id argument (reflects the update in the Swagger documentation).

  3. Resolved a bug in the histogram within the killed_and_injured_count_per_age_group widget. Previously, when there were no accidents with the "unknown" type, the widgets crashed. This issue can be observed in the production logs. For instance, the following API call was successful:

    However, the same API call with a 3-year parameter instead of 5 resulted in a crash:

    The issue arises when there are no accidents with an "unknown" type within the last 3 years, as all the accident ages are known during that period.

@EliorGigi EliorGigi marked this pull request as draft December 22, 2023 13:59
@codecov-commenter
Copy link

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (dfca9c4) 52.98% compared to head (2bcd172) 53.27%.

Files Patch % Lines
...ed_and_injured_count_per_age_group_widget_utils.py 60.00% 6 Missing ⚠️
...ations_widgets/injured_count_by_severity_widget.py 80.00% 3 Missing ⚠️
anyway/widgets/widget_utils.py 71.42% 2 Missing ⚠️
...s/killed_and_injured_count_per_age_group_widget.py 83.33% 1 Missing ⚠️
...ously_injured_killed_in_bicycles_scooter_widget.py 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2511      +/-   ##
==========================================
+ Coverage   52.98%   53.27%   +0.29%     
==========================================
  Files         117      117              
  Lines        9645     9674      +29     
==========================================
+ Hits         5110     5154      +44     
+ Misses       4535     4520      -15     
Flag Coverage Δ
unittests 53.27% <74.50%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EliorGigi EliorGigi closed this Dec 22, 2023
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