-
Notifications
You must be signed in to change notification settings - Fork 55
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
fix: Performance fix to only measure statistics which are not hidden #239
Conversation
fixes #177 Signed-off-by: Zack Koppert <[email protected]>
@jmeridth Any ideas on how to handle a default argument for the EnvVars type?
|
diff --git a/issue_metrics.py b/issue_metrics.py
index 628f7f3..85c3b39 100644
--- a/issue_metrics.py
+++ b/issue_metrics.py
@@ -127,7 +127,7 @@ def get_per_issue_metrics(
ignore_users: Union[List[str], None] = None,
max_comments_to_eval: int = 20,
heavily_involved: int = 3,
- env_vars: EnvVars = None,
+ env_vars: EnvVars = get_env_vars(),
) -> tuple[List, int, int]:
"""
Calculate the metrics for each issue/pr/discussion in a list provided. You could do some funky stuff with |
Co-authored-by: jmeridth <[email protected]> Signed-off-by: Zack Koppert <[email protected]>
Signed-off-by: Zack Koppert <[email protected]>
…test=True Signed-off-by: Zack Koppert <[email protected]>
@jmeridth ready for next round of review when you have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just one nit.
Signed-off-by: Zack Koppert <[email protected]>
Signed-off-by: Zack Koppert <[email protected]>
Signed-off-by: Zack Koppert <[email protected]>
fixes #177
Pull Request
Please review cautiously as my confidence around these changes is low as I was in a rush. Happy to pair on a review.
Proposed Changes
This pull request primarily focuses on enhancing the functionality of the
issue_metrics.py
script by introducing a newEnvVars
class and using it to control the execution of certain metrics calculations. The changes allow for more flexibility in terms of what metrics to calculate and when.Readiness Checklist
Author/Contributor
make lint
and fix any issues that you have introducedmake test
and ensure you have test coverage for the lines you are introducingReviewer
bug
,documentation
,enhancement
,infrastructure
, orbreaking