From 7e2a4f6ae4e21da5bd3d3c5b8dc0668294688962 Mon Sep 17 00:00:00 2001 From: Daniel Izquierdo Cortazar Date: Mon, 6 Jul 2026 17:47:21 +0200 Subject: [PATCH] Update intervals from 90 to 365 days Signed-off-by: Daniel Izquierdo Cortazar --- grimoirelab_metrics/metrics.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/grimoirelab_metrics/metrics.py b/grimoirelab_metrics/metrics.py index 07705e8..153db76 100644 --- a/grimoirelab_metrics/metrics.py +++ b/grimoirelab_metrics/metrics.py @@ -301,12 +301,12 @@ def get_recent_organizations(self): return len(self.recent_organizations) def get_recent_contributors(self): - """Return the number of contributors from the last 90d.""" + """Return the number of contributors from the last 365d.""" return len(self.recent_contributors) def get_recent_commits(self) -> int: - """Return the number of commits in the last 90d.""" + """Return the number of commits in the last 365d.""" return self.recent_commits @@ -417,7 +417,7 @@ def _update_commit_count(self, event_data): except (ValueError, TypeError, InvalidDateError): return - if days_interval <= 90: + if days_interval <= 365: self.recent_commits += 1 # Update commits per month @@ -448,7 +448,7 @@ def _update_contributors(self, event_data): # Update contributors by period if commit_date: days_interval = (self.to_date - commit_date).days - if days_interval <= 90: + if days_interval <= 365: self.recent_contributors.add(author) self.returning_contributors["second_period"].add(author) else: @@ -470,7 +470,7 @@ def _update_organizations(self, event_data): except (ValueError, TypeError, InvalidDateError): pass else: - if days_interval <= 90: + if days_interval <= 365: self.recent_organizations.add(organization) def _update_file_metrics(self, event):