Skip to content

Fix/stats (backport #363) #393

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

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions make_help_scripts/create_pr_stats.py
Original file line number Diff line number Diff line change
@@ -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):
@@ -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.
@@ -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(timezone.utc)

# Calculate one year ago from the current date
one_year_ago = current_date - timedelta(days=365)
20 changes: 11 additions & 9 deletions make_help_scripts/deploy_defines.py
Original file line number Diff line number Diff line change
@@ -63,7 +63,9 @@ def add_pr_stats_file():
"galactic": "galactic",
"humble": "humble",
"iron": "iron",
base_branch: "jazzy"
"jazzy": "jazzy",
base_branch: "jazzy", # PRs are tested on jazzy
"master": "rolling"
}

# the subrepos which are cloned into the branches and, optionally, their corresponding PR for checkout
@@ -78,7 +80,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')
},
@@ -90,7 +92,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')
},
@@ -102,7 +104,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')
},
@@ -114,7 +116,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')
},
@@ -138,7 +140,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
},
@@ -150,7 +152,7 @@ def add_pr_stats_file():
"humble": "humble",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
},
@@ -162,7 +164,7 @@ def add_pr_stats_file():
"humble": "master",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
},
@@ -174,7 +176,7 @@ def add_pr_stats_file():
"humble": "humble",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
}