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 #2512

Merged
merged 21 commits into from
Dec 31, 2023

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 14:24
@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2023

Codecov Report

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

Comparison is base (dfca9c4) 52.98% compared to head (88c6f71) 53.26%.
Report is 14 commits behind head on dev.

Files Patch % Lines
...ations_widgets/injured_count_by_severity_widget.py 47.82% 12 Missing ⚠️
...ed_and_injured_count_per_age_group_widget_utils.py 60.00% 6 Missing ⚠️
...s/killed_and_injured_count_per_age_group_widget.py 71.42% 2 Missing ⚠️
anyway/widgets/widget_utils.py 71.42% 2 Missing ⚠️
anyway/flask_app.py 75.00% 1 Missing ⚠️
anyway/models.py 0.00% 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    #2512      +/-   ##
==========================================
+ Coverage   52.98%   53.26%   +0.28%     
==========================================
  Files         117      117              
  Lines        9645     9679      +34     
==========================================
+ Hits         5110     5156      +46     
+ Misses       4535     4523      -12     
Flag Coverage Δ
unittests 53.26% <60.93%> (+0.28%) ⬆️

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 marked this pull request as ready for review December 22, 2023 14:32
@EliorGigi EliorGigi requested a review from atalyaalon December 22, 2023 14:32
@atalyaalon
Copy link
Collaborator

@EliorGigi great! Can you fix black (see this - can be executed in anyway container) and pylint issues? (you can see details here

@atalyaalon atalyaalon merged commit 6c1a300 into data-for-change:dev Dec 31, 2023
3 checks passed
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.

3 participants