Skip to content
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

Remove empty files and move redundant folders to simplify project structure #2839

Merged
merged 8 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions augur/tasks/github/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from augur.tasks.github.contributors.tasks import *
from augur.tasks.github.events.tasks import *
from augur.tasks.github.issues.tasks import *
from augur.tasks.github.messages.tasks import *
from augur.tasks.github.contributors import *
from augur.tasks.github.events import *

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)

from augur.tasks.github.issues import *
from augur.tasks.github.messages import *
from augur.tasks.github.pull_requests.tasks import *
from augur.tasks.github.repo_info.tasks import *
from augur.tasks.github.releases.tasks import *
Empty file.
Empty file.
File renamed without changes.
Empty file.
Empty file removed augur/tasks/github/events/core.py
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import logging

Check warning on line 1 in augur/tasks/github/issues.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0114: Missing module docstring (missing-module-docstring) Raw Output: augur/tasks/github/issues.py:1:0: C0114: Missing module docstring (missing-module-docstring)
import traceback
from datetime import timedelta, timezone

Expand All @@ -7,7 +7,7 @@

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 *

Check warning on line 10 in augur/tasks/github/issues.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import augur.application.db.data_parse (wildcard-import) Raw Output: augur/tasks/github/issues.py:10:0: W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
from augur.tasks.github.util.github_data_access import GithubDataAccess
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth
from augur.tasks.github.util.util import add_key_value_pair_to_dicts, get_owner_repo
Expand Down Expand Up @@ -65,7 +65,7 @@
url = f"https://api.github.com/repos/{owner}/{repo}/issues?state=all"

if since:
url += since.isoformat()
url += f"&since={since.isoformat()}"

github_data_access = GithubDataAccess(key_auth, logger)

Expand All @@ -76,7 +76,7 @@

return list(issues_paginator)

def process_issues(issues, task_name, repo_id, logger) -> None:

Check warning on line 79 in augur/tasks/github/issues.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R0914: Too many local variables (32/30) (too-many-locals) Raw Output: augur/tasks/github/issues.py:79:0: R0914: Too many local variables (32/30) (too-many-locals)

# get repo_id or have it passed
tool_source = "Issue Task"
Expand All @@ -87,7 +87,7 @@
issue_mapping_data = {}
issue_total = len(issues)
contributors = []
for index, issue in enumerate(issues):

Check warning on line 90 in augur/tasks/github/issues.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0612: Unused variable 'index' (unused-variable) Raw Output: augur/tasks/github/issues.py:90:8: W0612: Unused variable 'index' (unused-variable)

# calls is_valid_pr_block to see if the data is a pr.
# if it is a pr we skip it because we don't need prs
Expand Down Expand Up @@ -163,7 +163,7 @@


# add the issue id to the lables and assignees, then add them to a list of dicts that will be inserted soon
dict_key = "issue_id"

Check warning on line 166 in augur/tasks/github/issues.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0612: Unused variable 'dict_key' (unused-variable) Raw Output: augur/tasks/github/issues.py:166:8: W0612: Unused variable 'dict_key' (unused-variable)
issue_label_dicts += add_key_value_pair_to_dicts(other_issue_data["labels"], "issue_id", issue_id)
issue_assignee_dicts += add_key_value_pair_to_dicts(other_issue_data["assignees"], "issue_id", issue_id)

Expand Down
Empty file.
Empty file removed augur/tasks/github/issues/core.py
Empty file.
File renamed without changes.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion augur/tasks/github/pull_requests/tasks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import logging

Check warning on line 1 in augur/tasks/github/pull_requests/tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C0114: Missing module docstring (missing-module-docstring) Raw Output: augur/tasks/github/pull_requests/tasks.py:1:0: C0114: Missing module docstring (missing-module-docstring)
from datetime import datetime, timedelta, timezone

from augur.tasks.github.pull_requests.core import extract_data_from_pr_list
from augur.tasks.init.celery_app import celery_app as celery
from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask, AugurSecondaryRepoCollectionTask
from augur.application.db.data_parse import *

Check warning on line 7 in augur/tasks/github/pull_requests/tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0401: Wildcard import augur.application.db.data_parse (wildcard-import) Raw Output: augur/tasks/github/pull_requests/tasks.py:7:0: W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
from augur.tasks.github.util.github_data_access import GithubDataAccess
from augur.tasks.github.util.github_paginator import GithubPaginator
from augur.tasks.util.worker_util import remove_duplicate_dicts
Expand All @@ -14,7 +14,7 @@
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth
from augur.application.db.lib import get_session, get_repo_by_repo_git, bulk_insert_dicts, get_pull_request_reviews_by_repo_id
from augur.application.db.util import execute_session_query
from ..messages.tasks import process_github_comment_contributors
from ..messages import process_github_comment_contributors
from augur.application.db.lib import get_secondary_data_last_collected, get_updated_prs, get_core_data_last_collected

from typing import Generator, List, Dict
Expand Down Expand Up @@ -54,7 +54,7 @@
total_count += len(all_data)
all_data.clear()

if len(all_data):

Check warning on line 57 in augur/tasks/github/pull_requests/tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len) Raw Output: augur/tasks/github/pull_requests/tasks.py:57:11: C1802: Do not use `len(SEQUENCE)` without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
process_pull_requests(all_data, f"{owner}/{repo}: Pr task", repo_id, logger, augur_db)
total_count += len(all_data)

Expand All @@ -66,8 +66,8 @@



# TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers

Check warning on line 69 in augur/tasks/github/pull_requests/tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0511: TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers (fixme) Raw Output: augur/tasks/github/pull_requests/tasks.py:69:1: W0511: TODO: Rename pull_request_reviewers table to pull_request_requested_reviewers (fixme)
# TODO: Fix column names in pull request labels table

Check warning on line 70 in augur/tasks/github/pull_requests/tasks.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0511: TODO: Fix column names in pull request labels table (fixme) Raw Output: augur/tasks/github/pull_requests/tasks.py:70:1: W0511: TODO: Fix column names in pull request labels table (fixme)
def retrieve_all_pr_data(repo_git: str, logger, key_auth, since): #-> Generator[List[Dict]]:

owner, repo = get_owner_repo(repo_git)
Expand Down
File renamed without changes.
Empty file.
Empty file removed augur/tasks/github/traffic/core.py
Empty file.
10 changes: 5 additions & 5 deletions augur/tasks/init/celery_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
'augur.tasks.data_analysis',
'augur.tasks.util.collection_util']

github_tasks = ['augur.tasks.github.contributors.tasks',
'augur.tasks.github.issues.tasks',
github_tasks = ['augur.tasks.github.contributors',
'augur.tasks.github.issues',
'augur.tasks.github.pull_requests.tasks',
'augur.tasks.github.events.tasks',
'augur.tasks.github.messages.tasks',
'augur.tasks.github.events',
'augur.tasks.github.messages',
'augur.tasks.github.facade_github.tasks',
'augur.tasks.github.releases.tasks',
'augur.tasks.github.repo_info.tasks',
'augur.tasks.github.detect_move.tasks',
'augur.tasks.github.pull_requests.files_model.tasks',
'augur.tasks.github.pull_requests.commits_model.tasks',
'augur.tasks.github.traffic.tasks']
'augur.tasks.github.traffic']

gitlab_tasks = ['augur.tasks.gitlab.merge_request_task',
'augur.tasks.gitlab.issues_task',
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/start_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from augur.tasks.github.pull_requests.files_model.tasks import process_pull_request_files

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.github.pull_requests.files_model.tasks import process_pull_request_files" should be placed at the top of the module (wrong-import-position)

from augur.tasks.github.pull_requests.commits_model.tasks import process_pull_request_commits

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.github.pull_requests.commits_model.tasks import process_pull_request_commits" should be placed at the top of the module (wrong-import-position)

from augur.tasks.git.dependency_tasks.tasks import process_ossf_dependency_metrics

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.git.dependency_tasks.tasks import process_ossf_dependency_metrics" should be placed at the top of the module (wrong-import-position)

from augur.tasks.github.traffic.tasks import collect_github_repo_clones_data
from augur.tasks.github.traffic import collect_github_repo_clones_data

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.github.traffic import collect_github_repo_clones_data" should be placed at the top of the module (wrong-import-position)

from augur.tasks.gitlab.merge_request_task import collect_gitlab_merge_requests, collect_merge_request_metadata, collect_merge_request_commits, collect_merge_request_files, collect_merge_request_comments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.gitlab.merge_request_task import collect_gitlab_merge_requests, collect_merge_request_metadata, collect_merge_request_commits, collect_merge_request_files, collect_merge_request_comments" should be placed at the top of the module (wrong-import-position)

from augur.tasks.gitlab.issues_task import collect_gitlab_issues, collect_gitlab_issue_comments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.gitlab.issues_task import collect_gitlab_issues, collect_gitlab_issue_comments" should be placed at the top of the module (wrong-import-position)

from augur.tasks.gitlab.events_task import collect_gitlab_issue_events, collect_gitlab_merge_request_events

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pylint] reported by reviewdog 🐶
C0413: Import "from augur.tasks.gitlab.events_task import collect_gitlab_issue_events, collect_gitlab_merge_request_events" should be placed at the top of the module (wrong-import-position)

Expand Down
Loading