Skip to content
Open
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
3 changes: 2 additions & 1 deletion augur/application/db/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from sqlalchemy.exc import OperationalError
from psycopg2.errors import DeadlockDetected
from typing import List, Any, Optional, Union
from typing_extensions import deprecated

from augur.application.db.models import Config, Repo, Commit, WorkerOauth, Issue, PullRequest, PullRequestReview, ContributorsAlias,UnresolvedCommitEmail, Contributor, CollectionStatus, UserGroup, RepoGroup
from augur.tasks.util.collection_state import CollectionState
Expand All @@ -18,7 +19,7 @@

logger = logging.getLogger("db_lib")


@deprecated("This is a legacy method. Use AugurConfig.get_value instead")
def get_value(section_name: str, setting_name: str) -> Optional[Any]:
"""Get the value of a setting from the config.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from augur.application.db.models.augur_operations import CollectionStatus
from augur.application.db.util import execute_session_query, convert_orm_list_to_dict_list
from augur.application.db.lib import execute_sql, get_repo_by_repo_git
from typing_extensions import deprecated

class GitCloneError(Exception):
pass
Expand Down Expand Up @@ -174,8 +175,7 @@ def git_repo_initialize(facade_helper, session, repo_git):
facade_helper.log_activity('Info', f"Fetching new repos (complete)")


# Deprecated functionality. No longer used
# Should be re-purposed in start_tasks when tasks are being scheduled
@deprecated("Deprecated functionality. No longer used. Should be re-purposed in start_tasks when tasks are being scheduled")
def check_for_repo_updates(session, repo_git):

# Check the last time a repo was updated and if it has been longer than the
Expand Down Expand Up @@ -244,7 +244,7 @@ def check_for_repo_updates(session, repo_git):

# Deprecated. No longer used.


@deprecated("This functionality is deprecated and won't work with present facade versions")
def force_repo_updates(session, repo_git):
raise NotImplementedError(
"This functionality is deprecated and won't work with present facade versions")
Expand All @@ -263,7 +263,7 @@ def force_repo_updates(session, repo_git):

# Deprecated. No longer used.


@deprecated("This functionality is deprecated and won't work with present facade versions")
def force_repo_analysis(session, repo_git):
raise NotImplementedError(
"This functionality is deprecated and won't work with present facade versions")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Debugger
from augur.tasks.github.util.github_paginator import GithubApiResult
from augur.application.db.lib import get_repo_by_repo_id, bulk_insert_dicts, execute_sql, get_contributors_by_github_user_id

from typing_extensions import deprecated

##TODO: maybe have a TaskSession class that holds information about the database, logger, config, etc.

Expand All @@ -27,7 +27,7 @@ def clean_dict(d):
return {k: ("" if v is None else v) for k, v in d.items()}


# deprecated in favor of GithubDataAcess.get_resource()
@deprecated("Please use GithubDataAcess.get_resource() instead")
def request_dict_from_endpoint(logger, session, url, timeout_wait=10):
"""Hit the endpoint specified by the url and return the json that it returns if it returns a dict.

Expand Down
2 changes: 2 additions & 0 deletions augur/tasks/github/util/github_random_key_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
from augur.tasks.util.random_key_auth import RandomKeyAuth
from augur.tasks.github.util.github_api_key_handler import GithubApiKeyHandler
from sqlalchemy.orm import Session
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0611: Unused Session imported from sqlalchemy.orm (unused-import)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

out of scope

from typing_extensions import deprecated

@deprecated("This class is deprecated. Use the KeyClient interface to the Keymanager process instead.")
class GithubRandomKeyAuth(RandomKeyAuth):
"""Defines a github specific RandomKeyAuth class so
github collections can have a class randomly selects an api key for each request
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ dependencies = [
"xgboost==3.0.2",
"xlrd==2.0.1",
"xlsxwriter==1.3.7",
"typing-extensions>=4.5.0",
]

[dependency-groups]
Expand Down
27 changes: 15 additions & 12 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading