From 7700c3ea32a662dfec0fabf93566b7675966790a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 00:58:55 +0000 Subject: [PATCH 1/5] Bump gunicorn from 20.0.4 to 22.0.0 Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.4 to 22.0.0. - [Release notes](https://github.com/benoitc/gunicorn/releases) - [Commits](https://github.com/benoitc/gunicorn/compare/20.0.4...22.0.0) --- updated-dependencies: - dependency-name: gunicorn dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a991b37b..dfd98a89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ google-cloud-storage==1.28.1 google-cloud-translate==2.0.1 googlemaps==4.4.0 graphene-sqlalchemy==2.2.2 -gunicorn==20.0.4 +gunicorn==22.0.0 newrelic==5.12.1.141 numpy==1.18.4 openpyxl==3.0.3 From 2dc9e7ceec72a686483b9689eedb2bae6c94537d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 06:11:13 +0000 Subject: [PATCH 2/5] Bump pydantic from 1.8.2 to 1.10.13 Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.8.2 to 1.10.13. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v1.8.2...v1.10.13) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a991b37b..73e8156d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -48,7 +48,7 @@ boto3==1.17.68 py3-validate-email==0.2.16 phonenumbers==8.12.21 flask-principal==0.4.0 -pydantic==1.8.2 +pydantic==1.10.13 swifter==1.3.4 telebot==0.0.5 selenium==4.11.2 From 67e4db017bb7f7195970827bd2de90849b5fc505 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 18:22:12 +0000 Subject: [PATCH 3/5] Bump jinja2 from 3.0.3 to 3.1.4 Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.0.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a991b37b..83e2bfb6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ Flask-Compress==1.5.0 Flask-Login==0.5.0 Flask-SQLAlchemy==2.4.1 flask-restx==0.5.1 -Jinja2==3.0.3 +Jinja2==3.1.4 SQLAlchemy==1.3.17 Werkzeug==2.0.3 alembic==1.4.2 From ac2802f365a47a7ba11bb73917b18d47221a762c Mon Sep 17 00:00:00 2001 From: Atalya Alon Date: Thu, 30 May 2024 10:45:52 +0300 Subject: [PATCH 4/5] upgrade black --- anyway/scripts/accidents_around_location.py | 1 + test_requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/anyway/scripts/accidents_around_location.py b/anyway/scripts/accidents_around_location.py index 8cdc4210..356be4c5 100644 --- a/anyway/scripts/accidents_around_location.py +++ b/anyway/scripts/accidents_around_location.py @@ -5,6 +5,7 @@ python accidents_around_location.py [flags] """ + import argparse import io from datetime import datetime diff --git a/test_requirements.txt b/test_requirements.txt index 80a38d01..ec01ff92 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,4 +1,4 @@ -black==23.3.0 +black==24.3.0 pytest==7.4.1 pytest-cov==4.1.0 py==1.11.0 From e8ccb19af369575d7b0849b448ef684307550eba Mon Sep 17 00:00:00 2001 From: Atalya Alon Date: Wed, 5 Jun 2024 16:25:29 +0300 Subject: [PATCH 5/5] Modify involve_yishuv_name to accident_yishuv_name in widgets filters --- .../killed_and_injured_count_per_age_group_widget_utils.py | 4 ++-- .../severe_fatal_count_by_vehicle_by_year_widget.py | 6 +++--- .../small_motor_severe_fatal_count_by_year_widget.py | 2 +- anyway/widgets/urban_widgets/urban_crosswalk_widget.py | 4 ++-- anyway/widgets/widget_utils.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/anyway/widgets/all_locations_widgets/killed_and_injured_count_per_age_group_widget_utils.py b/anyway/widgets/all_locations_widgets/killed_and_injured_count_per_age_group_widget_utils.py index d3332e64..f0b9d880 100644 --- a/anyway/widgets/all_locations_widgets/killed_and_injured_count_per_age_group_widget_utils.py +++ b/anyway/widgets/all_locations_widgets/killed_and_injured_count_per_age_group_widget_utils.py @@ -38,9 +38,9 @@ def filter_and_group_injured_count_per_age_group( cache_key = None # prevent pylint warning if request_params.resolution == BE_CONST.ResolutionCategories.STREET: - involve_yishuv_name = request_params.location_info["yishuv_name"] + accident_yishuv_name = request_params.location_info["yishuv_name"] street1_hebrew = request_params.location_info["street1_hebrew"] - cache_key = (involve_yishuv_name, street1_hebrew, start_time, end_time) + cache_key = (accident_yishuv_name, street1_hebrew, start_time, end_time) elif request_params.resolution == BE_CONST.ResolutionCategories.SUBURBAN_ROAD: road_number = request_params.location_info["road1"] diff --git a/anyway/widgets/urban_widgets/severe_fatal_count_by_vehicle_by_year_widget.py b/anyway/widgets/urban_widgets/severe_fatal_count_by_vehicle_by_year_widget.py index b60f064c..2766aeac 100644 --- a/anyway/widgets/urban_widgets/severe_fatal_count_by_vehicle_by_year_widget.py +++ b/anyway/widgets/urban_widgets/severe_fatal_count_by_vehicle_by_year_widget.py @@ -39,7 +39,7 @@ def separate_data(yishuv, start_time, end_time, resolution) -> Dict[str, Any]: InjurySeverity.SEVERE_INJURED.value, ], "involve_vehicle_type": VehicleType.ELECTRIC_BIKE.value, - "involve_yishuv_name": yishuv, + "accident_yishuv_name": yishuv, }, group_by="accident_year", count="accident_year", @@ -55,7 +55,7 @@ def separate_data(yishuv, start_time, end_time, resolution) -> Dict[str, Any]: InjurySeverity.SEVERE_INJURED.value, ], "involve_vehicle_type": VehicleType.BIKE.value, - "involve_yishuv_name": yishuv, + "accident_yishuv_name": yishuv, }, group_by="accident_year", count="accident_year", @@ -71,7 +71,7 @@ def separate_data(yishuv, start_time, end_time, resolution) -> Dict[str, Any]: InjurySeverity.SEVERE_INJURED.value, ], "involve_vehicle_type": VehicleType.ELECTRIC_SCOOTER.value, - "involve_yishuv_name": yishuv, + "accident_yishuv_name": yishuv, }, group_by="accident_year", count="accident_year", diff --git a/anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py b/anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py index 38a6ac86..a4b951af 100644 --- a/anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py +++ b/anyway/widgets/urban_widgets/small_motor_severe_fatal_count_by_year_widget.py @@ -37,7 +37,7 @@ def get_motor_stats(location_info, start_time, end_time, resolution): InjurySeverity.SEVERE_INJURED.value, ], "involve_vehicle_type": VehicleCategory.BICYCLE_AND_SMALL_MOTOR.get_codes(), - "involve_yishuv_name": location_info, + "accident_yishuv_name": location_info, }, group_by="accident_year", count="accident_year", diff --git a/anyway/widgets/urban_widgets/urban_crosswalk_widget.py b/anyway/widgets/urban_widgets/urban_crosswalk_widget.py index c83e0874..69ddd532 100644 --- a/anyway/widgets/urban_widgets/urban_crosswalk_widget.py +++ b/anyway/widgets/urban_widgets/urban_crosswalk_widget.py @@ -39,7 +39,7 @@ def get_crosswalk(yishuv, street, start_time, end_time, resolution) -> Dict[str, InjurySeverity.SEVERE_INJURED.value, ], "cross_location": CrossCategory.CROSSWALK.get_codes(), - "involve_yishuv_name": yishuv, + "accident_yishuv_name": yishuv, "street1_hebrew": street, }, group_by="street1_hebrew", @@ -56,7 +56,7 @@ def get_crosswalk(yishuv, street, start_time, end_time, resolution) -> Dict[str, InjurySeverity.SEVERE_INJURED.value, ], "cross_location": CrossCategory.NONE.get_codes(), - "involve_yishuv_name": yishuv, + "accident_yishuv_name": yishuv, "street1_hebrew": street, }, group_by="street1_hebrew", diff --git a/anyway/widgets/widget_utils.py b/anyway/widgets/widget_utils.py index 0d5046eb..75a13368 100644 --- a/anyway/widgets/widget_utils.py +++ b/anyway/widgets/widget_utils.py @@ -201,7 +201,7 @@ def get_involved_marker_view_location_filters( ): filters = {} if resolution == BE_CONST.ResolutionCategories.STREET: - filters["involve_yishuv_name"] = location_info.get("yishuv_name") + filters["accident_yishuv_name"] = location_info.get("yishuv_name") filters["street1_hebrew"] = location_info.get("street1_hebrew") elif resolution == BE_CONST.ResolutionCategories.SUBURBAN_ROAD: filters["road1"] = location_info.get("road1")