-
Notifications
You must be signed in to change notification settings - Fork 846
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
Optimize issue and pr recollection #2835
Conversation
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
augur/tasks/github/issues/tasks.py
Outdated
if full_collection: | ||
core_data_last_collected = None | ||
else: | ||
core_data_last_collected = get_core_data_last_collected().date() |
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.
[pylint] reported by reviewdog 🐶
E1120: No value for argument 'repo_id' in function call (no-value-for-parameter)
augur/tasks/github/issues/tasks.py
Outdated
key_auth = GithubRandomKeyAuth(logger) | ||
|
||
logger.info(f'this is the manifest.key_auth value: {str(key_auth)}') | ||
|
||
try: | ||
issue_data = retrieve_all_issue_data(repo_git, logger, key_auth) | ||
issue_data = retrieve_all_issue_data(repo_git, logger, key_auth, core_data_last_collected) | ||
|
||
if issue_data: |
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.
[pylint] reported by reviewdog 🐶
R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
@@ -61,13 +67,13 @@ def collect_pull_requests(repo_git: str) -> int: | |||
|
|||
# TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers |
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.
[pylint] reported by reviewdog 🐶
W0511: TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers (fixme)
@@ -61,13 +67,13 @@ def collect_pull_requests(repo_git: str) -> int: | |||
|
|||
# TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers | |||
# TODO: Fix column names in pull request labels table |
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.
[pylint] reported by reviewdog 🐶
W0511: TODO: Fix column names in pull request labels table (fixme)
@@ -1,4 +1,5 @@ | |||
import logging |
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.
[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)
if full_collection: | ||
core_data_last_collected = None | ||
else: | ||
core_data_last_collected = get_core_data_last_collected().date() |
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.
[pylint] reported by reviewdog 🐶
E1120: No value for argument 'repo_id' in function call (no-value-for-parameter)
yield data | ||
|
||
# return if last pr on the page was updated before the since date | ||
if since and datetime.fromisoformat(data["updated_at"].replace("Z", "+00:00")) < since: |
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.
[pylint] reported by reviewdog 🐶
E1136: Value 'data' is unsubscriptable (unsubscriptable-object)
@@ -61,13 +67,13 @@ def collect_pull_requests(repo_git: str) -> int: | |||
|
|||
# TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers | |||
# TODO: Fix column names in pull request labels table | |||
def retrieve_all_pr_data(repo_git: str, logger, key_auth): #-> Generator[List[Dict]]: | |||
def retrieve_all_pr_data(repo_git: str, logger, key_auth, since): #-> Generator[List[Dict]]: |
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.
[pylint] reported by reviewdog 🐶
R1711: Useless return at end of function or method (useless-return)
|
||
# return if last pr on the page was updated before the since date | ||
if since and datetime.fromisoformat(data["updated_at"].replace("Z", "+00:00")) < since: | ||
return | ||
|
||
def process_pull_requests(pull_requests, task_name, repo_id, logger, augur_db): |
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.
[pylint] reported by reviewdog 🐶
R0914: Too many local variables (32/30) (too-many-locals)
Signed-off-by: Andrew Brain <[email protected]>
@@ -63,8 +63,8 @@ def primary_repo_collect_phase(repo_git, full_collection): | |||
|
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.
[pylint] reported by reviewdog 🐶
W0612: Unused variable 'logger' (unused-variable)
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
@@ -7,81 +7,72 @@ | |||
from augur.tasks.init.celery_app import celery_app as celery | |||
from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask | |||
from augur.application.db.data_parse import * |
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.
[pylint] reported by reviewdog 🐶
W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
|
||
return all_data | ||
return list(issues_paginator) | ||
|
||
def process_issues(issues, task_name, repo_id, logger) -> None: |
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.
[pylint] reported by reviewdog 🐶
R0914: Too many local variables (32/30) (too-many-locals)
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
@@ -1,87 +1,80 @@ | |||
import logging |
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.
[pylint] reported by reviewdog 🐶
C0114: Missing module docstring (missing-module-docstring)
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
Description
Signed commits