rossturk commented on code in PR #25239:
URL: https://github.com/apache/airflow/pull/25239#discussion_r927880233
##########
dev/stats/get_important_pr_candidates.py:
##########
@@ -45,73 +46,180 @@
required=True,
help=textwrap.dedent(
"""
- GitHub token used to authenticate.
- You can set omit it if you have GITHUB_TOKEN env variable set
+ A GitHub token is required, and can also be provided by setting the
GITHUB_TOKEN env variable.
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20issues&scopes=repo:status"""
),
envvar='GITHUB_TOKEN',
)
-PROVIDER_SCORE = 0.5
-REGULAR_SCORE = 1.0
-REVIEW_INTERACTION_VALUE = 1.0
-COMMENT_INTERACTION_VALUE = 1.0
-REACTION_INTERACTION_VALUE = 0.1
+class PrStat:
+ PROVIDER_SCORE = 0.8
+ REGULAR_SCORE = 1.0
+ REVIEW_INTERACTION_VALUE = 2.0
+ COMMENT_INTERACTION_VALUE = 1.0
+ REACTION_INTERACTION_VALUE = 0.5
-class PrStat:
def __init__(self, pull_request: PullRequest):
self.pull_request = pull_request
self._users: Set[str] = set()
- @cached_property
+ @property
Review Comment:
All the scoring methods shouldn't be cached, just the counting ones.
##########
dev/stats/get_important_pr_candidates.py:
##########
@@ -45,73 +46,180 @@
required=True,
help=textwrap.dedent(
"""
- GitHub token used to authenticate.
- You can set omit it if you have GITHUB_TOKEN env variable set
+ A GitHub token is required, and can also be provided by setting the
GITHUB_TOKEN env variable.
Can be generated with:
https://github.com/settings/tokens/new?description=Read%20issues&scopes=repo:status"""
),
envvar='GITHUB_TOKEN',
)
-PROVIDER_SCORE = 0.5
-REGULAR_SCORE = 1.0
-REVIEW_INTERACTION_VALUE = 1.0
-COMMENT_INTERACTION_VALUE = 1.0
-REACTION_INTERACTION_VALUE = 0.1
+class PrStat:
+ PROVIDER_SCORE = 0.8
+ REGULAR_SCORE = 1.0
+ REVIEW_INTERACTION_VALUE = 2.0
+ COMMENT_INTERACTION_VALUE = 1.0
+ REACTION_INTERACTION_VALUE = 0.5
-class PrStat:
def __init__(self, pull_request: PullRequest):
self.pull_request = pull_request
self._users: Set[str] = set()
- @cached_property
+ @property
Review Comment:
This is because all the scoring methods shouldn't be cached, just the
counting ones.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]