Skip to content

Commit

Permalink
Fix/stats (#363)
Browse files Browse the repository at this point in the history
* Fix deprecated method and gz branch

* Cleanup comments

* Update comments

* Add missing include
  • Loading branch information
christophfroehlich authored Dec 11, 2024
1 parent 59f9e95 commit 99271f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions make_help_scripts/create_pr_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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",
Expand All @@ -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)
Expand Down
18 changes: 9 additions & 9 deletions make_help_scripts/deploy_defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
},
Expand All @@ -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')
},
Expand All @@ -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')
},
Expand All @@ -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')
},
Expand All @@ -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
},
Expand All @@ -151,7 +151,7 @@ def add_pr_stats_file():
"humble": "humble",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
},
Expand All @@ -163,7 +163,7 @@ def add_pr_stats_file():
"humble": "master",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
},
Expand All @@ -175,7 +175,7 @@ def add_pr_stats_file():
"humble": "humble",
"iron": "master",
"jazzy": "master",
"rolling": "master" # master is rolling
"rolling": "master"
},
"pr": None
}
Expand Down

0 comments on commit 99271f8

Please sign in to comment.