From ca3634dd5fea8590d50c3a6d15589a1580cc80a9 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 10 Dec 2024 20:54:37 +0000 Subject: [PATCH 1/4] Fix deprecated method and gz branch --- make_help_scripts/create_pr_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_help_scripts/create_pr_stats.py b/make_help_scripts/create_pr_stats.py index 615e0f3a29..9688d1cc94 100644 --- a/make_help_scripts/create_pr_stats.py +++ b/make_help_scripts/create_pr_stats.py @@ -685,7 +685,7 @@ def print_contributors_stats(contributors_stats): "control_msgs": "master", "control.ros.org": "master", "gazebo_ros2_control": "master", - "gz_ros2_control": "master", + "gz_ros2_control": "rolling", "kinematics_interface": "master", "ros2_control_ci": "master", "ros2_rhel": "main", @@ -696,7 +696,7 @@ def print_contributors_stats(contributors_stats): blacklist = ["dependabot[bot]", "mergify[bot]"] # Get the current date and time -current_date = datetime.utcnow() +current_date = datetime.now(datetime.timezone.utc) # Calculate one year ago from the current date one_year_ago = current_date - timedelta(days=365) From 79cc7ebc866e927ab7d4c6d68c1ccb5a5c8ba513 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 10 Dec 2024 20:55:04 +0000 Subject: [PATCH 2/4] Cleanup comments --- make_help_scripts/deploy_defines.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/make_help_scripts/deploy_defines.py b/make_help_scripts/deploy_defines.py index 877dedcd96..b611971d37 100644 --- a/make_help_scripts/deploy_defines.py +++ b/make_help_scripts/deploy_defines.py @@ -64,7 +64,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "iron", "jazzy": "jazzy", - base_branch: "rolling" # master is rolling, PRs are tested on rolling + base_branch: "rolling" # PRs are tested on rolling } # the subrepos which are cloned into the branches and, optionally, their corresponding PR for checkout @@ -79,7 +79,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "iron", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": os.environ.get('ROS2_CONTROL_PR') }, @@ -91,7 +91,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "iron", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": os.environ.get('ROS2_CONTROLLERS_PR') }, @@ -103,7 +103,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "iron", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": os.environ.get('ROS2_CONTROL_DEMOS_PR') }, @@ -115,7 +115,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "iron", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": os.environ.get('GAZEBO_ROS2_CONTROL_PR') }, @@ -139,7 +139,7 @@ def add_pr_stats_file(): "humble": "ros2-master", "iron": "ros2-master", "jazzy": "ros2-master", - "rolling": "ros2-master" # master is rolling + "rolling": "ros2-master" }, "pr": None }, @@ -151,7 +151,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "master", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": None }, @@ -163,7 +163,7 @@ def add_pr_stats_file(): "humble": "master", "iron": "master", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": None }, @@ -175,7 +175,7 @@ def add_pr_stats_file(): "humble": "humble", "iron": "master", "jazzy": "master", - "rolling": "master" # master is rolling + "rolling": "master" }, "pr": None } From 44fd3b4b98d6f045736493ff90210f8cdc348ba4 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 10 Dec 2024 21:00:55 +0000 Subject: [PATCH 3/4] Update comments --- make_help_scripts/create_pr_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_help_scripts/create_pr_stats.py b/make_help_scripts/create_pr_stats.py index 9688d1cc94..9e5a94b791 100644 --- a/make_help_scripts/create_pr_stats.py +++ b/make_help_scripts/create_pr_stats.py @@ -633,7 +633,7 @@ def create_contributors_table_with_graph(contributors_stats, user_details, table def print_reviewers_stats(reviewers_stats): """ - Prints the statistics of the reviewers. + Prints the statistics of the 10 reviewers with most finished reviews. Args: reviewers_stats (dict): A dictionary containing the statistics of the reviewers. @@ -646,7 +646,7 @@ def print_reviewers_stats(reviewers_stats): def print_contributors_stats(contributors_stats): """ - Prints the statistics of the contributors. + Prints the statistics of the 10 contributors with the most line changes. Args: contributors_stats (dict): A dictionary containing the statistics of the contributors. From 0667d749ff19bf5f5c118fd9ce5b47b6b4554ca7 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 10 Dec 2024 21:07:31 +0000 Subject: [PATCH 4/4] Add missing include --- make_help_scripts/create_pr_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make_help_scripts/create_pr_stats.py b/make_help_scripts/create_pr_stats.py index 9e5a94b791..9299c43e4a 100644 --- a/make_help_scripts/create_pr_stats.py +++ b/make_help_scripts/create_pr_stats.py @@ -15,7 +15,7 @@ import requests import os -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone import time def get_api_response(url): @@ -696,7 +696,7 @@ def print_contributors_stats(contributors_stats): blacklist = ["dependabot[bot]", "mergify[bot]"] # Get the current date and time -current_date = datetime.now(datetime.timezone.utc) +current_date = datetime.now(timezone.utc) # Calculate one year ago from the current date one_year_ago = current_date - timedelta(days=365)