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

Database improvements #2809

Merged
merged 53 commits into from
Jun 3, 2024
Merged

Database improvements #2809

merged 53 commits into from
Jun 3, 2024

Conversation

ABrain7710
Copy link
Contributor

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
Signed-off-by: Andrew Brain <[email protected]>
@ABrain7710 ABrain7710 requested a review from sgoggins as a code owner June 3, 2024 23:19
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

pylint

augur/tasks/data_analysis/message_insights/tasks.py|33| R0915: Too many statements (169/50) (too-many-statements)
augur/tasks/db/refresh_materialized_views.py|92 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|98 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|104 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|110 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|116 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|122 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|128 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|134 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|140 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|146 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|152 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|158 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|164 col 8| W0107: Unnecessary pass statement (unnecessary-pass)
augur/tasks/db/refresh_materialized_views.py|9| R0912: Too many branches (13/12) (too-many-branches)
augur/tasks/db/refresh_materialized_views.py|9| R0915: Too many statements (81/50) (too-many-statements)
augur/tasks/git/dependency_libyear_tasks/core.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/dependency_libyear_tasks/core.py|2| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/git/dependency_libyear_tasks/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/dependency_libyear_tasks/tasks.py|2| W0401: Wildcard import augur.tasks.git.dependency_libyear_tasks.core (wildcard-import)
augur/tasks/git/dependency_libyear_tasks/tasks.py|7 col 39| W0613: Unused argument 'self' (unused-argument)
augur/tasks/git/dependency_tasks/core.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/dependency_tasks/core.py|3| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/git/dependency_tasks/core.py|51| W0105: String statement has no effect (pointless-string-statement)
augur/tasks/git/dependency_tasks/core.py|91 col 28| E0602: Undefined variable 'required_output' (undefined-variable)
augur/tasks/git/dependency_tasks/core.py|93 col 11| E0602: Undefined variable 'required_output' (undefined-variable)
augur/tasks/git/dependency_tasks/core.py|113 col 17| E0602: Undefined variable 'required_output' (undefined-variable)
augur/tasks/git/dependency_tasks/core.py|77 col 4| W0612: Unused variable 'command' (unused-variable)
augur/tasks/git/dependency_tasks/core.py|80 col 4| W0612: Unused variable 'path_to_scorecard' (unused-variable)
augur/tasks/git/dependency_tasks/core.py|84 col 26| W0612: Unused variable 'session' (unused-variable)
augur/tasks/git/dependency_tasks/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/dependency_tasks/tasks.py|3| W0401: Wildcard import augur.tasks.git.dependency_tasks.core (wildcard-import)
augur/tasks/git/facade_tasks.py|113| C0325: Unnecessary parens after '=' keyword (superfluous-parens)
augur/tasks/git/facade_tasks.py|185| C0325: Unnecessary parens after '=' keyword (superfluous-parens)
augur/tasks/git/facade_tasks.py|207| C0325: Unnecessary parens after '=' keyword (superfluous-parens)
augur/tasks/git/facade_tasks.py|16| W0401: Wildcard import augur.tasks.github.facade_github.tasks (wildcard-import)
augur/tasks/git/facade_tasks.py|65 col 38| W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
augur/tasks/git/facade_tasks.py|59 col 37| W0613: Unused argument 'repo_git' (unused-argument)
augur/tasks/git/facade_tasks.py|199 col 7| C1802: Do not use len(SEQUENCE) without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
augur/tasks/git/facade_tasks.py|205 col 16| W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
augur/tasks/git/facade_tasks.py|224 col 11| C1802: Do not use len(SEQUENCE) without comparison to determine if a sequence is empty (use-implicit-booleaness-not-len)
augur/tasks/git/facade_tasks.py|369 col 4| W0612: Unused variable 'start_date' (unused-variable)
augur/tasks/git/facade_tasks.py|391 col 34| W0613: Unused argument 'logger' (unused-argument)
augur/tasks/git/facade_tasks.py|391 col 51| W0613: Unused argument 'session' (unused-argument)
augur/tasks/git/facade_tasks.py|393 col 4| W0612: Unused variable 'contributor_sequence' (unused-variable)
augur/tasks/git/facade_tasks.py|421 col 4| W0612: Unused variable 'start_date' (unused-variable)
augur/tasks/git/facade_tasks.py|475 col 4| W0612: Unused variable 'delete_marked_repos' (unused-variable)
augur/tasks/git/facade_tasks.py|476 col 4| W0612: Unused variable 'pull_repos' (unused-variable)
augur/tasks/git/facade_tasks.py|478 col 4| W0612: Unused variable 'check_updates' (unused-variable)
augur/tasks/git/facade_tasks.py|480 col 4| W0612: Unused variable 'run_analysis' (unused-variable)
augur/tasks/git/facade_tasks.py|490 col 4| W0612: Unused variable 'create_xlsx_summary_files' (unused-variable)
augur/tasks/git/facade_tasks.py|491 col 4| W0612: Unused variable 'multithreaded' (unused-variable)
augur/tasks/git/scc_value_tasks/core.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/scc_value_tasks/core.py|3| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/git/scc_value_tasks/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/git/scc_value_tasks/tasks.py|3| W0401: Wildcard import augur.tasks.git.scc_value_tasks.core (wildcard-import)
augur/tasks/github/contributors/tasks.py|7| W0401: Wildcard import augur.tasks.github.facade_github.tasks (wildcard-import)
augur/tasks/github/contributors/tasks.py|65 col 4| E1120: No value for argument 'natural_keys' in function call (no-value-for-parameter)
augur/tasks/github/contributors/tasks.py|21 col 4| W0612: Unused variable 'tool_version' (unused-variable)
augur/tasks/github/contributors/tasks.py|111 col 4| W0612: Unused variable 'engine' (unused-variable)
augur/tasks/github/detect_move/core.py|29 col 4| W0612: Unused variable 'result' (unused-variable)
augur/tasks/github/detect_move/core.py|47| R1711: Useless return at end of function or method (useless-return)
augur/tasks/github/detect_move/core.py|47 col 62| W0613: Unused argument 'collection_hook' (unused-argument)
augur/tasks/github/detect_move/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/github/detect_move/tasks.py|3| W0401: Wildcard import augur.tasks.github.detect_move.core (wildcard-import)
augur/tasks/github/events/tasks.py|170 col 5| W0511: TODO: Could replace this with "id" but it isn't stored on the table for some reason (fixme)
augur/tasks/github/events/tasks.py|179 col 1| W0511: TODO: Should we skip an event if there is no contributor to resolve it o (fixme)
augur/tasks/github/events/tasks.py|7| W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
augur/tasks/github/events/tasks.py|75| R0914: Too many local variables (31/30) (too-many-locals)
augur/tasks/github/events/tasks.py|75| R0915: Too many statements (56/50) (too-many-statements)
augur/tasks/github/events/tasks.py|180 col 38| W0613: Unused argument 'logger' (unused-argument)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|12 col 1| W0511: #TODO: maybe have a TaskSession class that holds information about the database, logger, config, etc. (fixme)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|180 col 5| W0511: TODO: It might be better to have the canonical_email allowed to be NUll because right now it has a null constraint. (fixme)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|378 col 5| W0511: TODO: here. (fixme)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|52 col 8| R1723: Unnecessary "elif" after "break", remove the leading "el" from "elif" (no-else-break)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|52 col 11| C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|65 col 13| C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|68 col 13| C0123: Use isinstance() rather than type() for a typecheck. (unidiomatic-typecheck)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|27| R0912: Too many branches (14/12) (too-many-branches)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|155| R1711: Useless return at end of function or method (useless-return)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|219 col 8| W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py|221| W0105: String statement has no effect (pointless-string-statement)
augur/tasks/github/facade_github/core.py|56| C0325: Unnecessary parens after '=' keyword (superfluous-parens)
augur/tasks/github/facade_github/core.py|4| W0401: Wildcard import augur.tasks.github.util.github_paginator (wildcard-import)
augur/tasks/github/facade_github/core.py|5| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/github/facade_github/core.py|125 col 25| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/github/facade_github/core.py|126 col 25| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/github/facade_github/core.py|39 col 4| W0612: Unused variable 'duplicate_col_map' (unused-variable)
augur/tasks/github/facade_github/core.py|63 col 25| W0612: Unused variable 'result' (unused-variable)
augur/tasks/github/facade_github/core.py|131 col 52| W0613: Unused argument 'platform' (unused-argument)
augur/tasks/github/facade_github/tasks.py|9| W0401: Wildcard import augur.tasks.github.facade_github.core (wildcard-import)
augur/tasks/github/facade_github/tasks.py|11| W0401: Wildcard import augur.tasks.git.util.facade_worker.facade_worker.facade00mainprogram (wildcard-import)
augur/tasks/github/facade_github/tasks.py|56 col 11| R1714: Consider merging these comparisons with 'in' by using 'login in (None, '')'. Use a set instead if elements are hashable. (consider-using-in)
augur/tasks/github/facade_github/tasks.py|56 col 11| C0121: Comparison 'login == None' should be 'login is None' (singleton-comparison)
augur/tasks/github/facade_github/tasks.py|59 col 11| R1714: Consider merging these comparisons with 'in' by using 'login in (None, '')'. Use a set instead if elements are hashable. (consider-using-in)
augur/tasks/github/facade_github/tasks.py|59 col 11| C0121: Comparison 'login == None' should be 'login is None' (singleton-comparison)
augur/tasks/github/facade_github/tasks.py|64 col 11| R1714: Consider merging these comparisons with 'in' by using 'login in (None, '')'. Use a set instead if elements are hashable. (consider-using-in)
augur/tasks/github/facade_github/tasks.py|64 col 11| C0121: Comparison 'login == None' should be 'login is None' (singleton-comparison)
augur/tasks/github/facade_github/tasks.py|14| R0915: Too many statements (52/50) (too-many-statements)
augur/tasks/github/facade_github/tasks.py|168| R1711: Useless return at end of function or method (useless-return)
augur/tasks/github/facade_github/tasks.py|207 col 4| W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
augur/tasks/github/facade_github/tasks.py|207 col 4| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/github/facade_github/tasks.py|193| R1711: Useless return at end of function or method (useless-return)
augur/tasks/github/facade_github/tasks.py|193 col 37| W0613: Unused argument 'repo_git' (unused-argument)
augur/tasks/github/facade_github/tasks.py|198 col 4| W0612: Unused variable 'engine' (unused-variable)
augur/tasks/github/issues/tasks.py|9| W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
augur/tasks/github/issues/tasks.py|37 col 8| R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
augur/tasks/github/issues/tasks.py|86| R0914: Too many local variables (32/30) (too-many-locals)
augur/tasks/github/messages/tasks.py|6| W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
augur/tasks/github/messages/tasks.py|27 col 12| E0602: Undefined variable 'Repo' (undefined-variable)
augur/tasks/github/messages/tasks.py|133 col 8| E1121: Too many positional arguments for function call (too-many-function-args)
augur/tasks/github/messages/tasks.py|136| R0914: Too many local variables (38/30) (too-many-locals)
augur/tasks/github/messages/tasks.py|136| R0912: Too many branches (18/12) (too-many-branches)
augur/tasks/github/messages/tasks.py|136| R0915: Too many statements (78/50) (too-many-statements)
augur/tasks/github/pull_requests/commits_model/core.py|3| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/github/pull_requests/commits_model/tasks.py|2| W0401: Wildcard import augur.tasks.github.pull_requests.commits_model.core (wildcard-import)
augur/tasks/github/pull_requests/core.py|5| W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
augur/tasks/github/pull_requests/core.py|227 col 4| E1120: No value for argument 'natural_keys' in function call (no-value-for-parameter)
augur/tasks/github/pull_requests/core.py|215 col 41| W0613: Unused argument 'logger' (unused-argument)
augur/tasks/github/pull_requests/core.py|257 col 4| E1120: No value for argument 'natural_keys' in function call (no-value-for-parameter)
augur/tasks/github/pull_requests/core.py|245 col 47| W0613: Unused argument 'logger' (unused-argument)
augur/tasks/github/pull_requests/files_model/core.py|3| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/github/pull_requests/files_model/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/github/pull_requests/files_model/tasks.py|2| W0401: Wildcard import augur.tasks.github.pull_requests.files_model.core (wildcard-import)
augur/tasks/github/pull_requests/files_model/tasks.py|13 col 4| W0612: Unused variable 'engine' (unused-variable)
augur/tasks/github/pull_requests/tasks.py|6| W0401: Wildcard import augur.application.db.data_parse (wildcard-import)
augur/tasks/github/pull_requests/tasks.py|86| R0914: Too many local variables (31/30) (too-many-locals)
augur/tasks/github/pull_requests/tasks.py|268 col 8| W0612: Unused variable 'index' (unused-variable)
augur/tasks/github/pull_requests/tasks.py|374 col 4| C0206: Consider iterating with .items() (consider-using-dict-items)
augur/tasks/github/pull_requests/tasks.py|374 col 27| C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
augur/tasks/github/pull_requests/tasks.py|387 col 4| C0206: Consider iterating with .items() (consider-using-dict-items)
augur/tasks/github/pull_requests/tasks.py|387 col 27| C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
augur/tasks/github/pull_requests/tasks.py|356 col 23| W0612: Unused variable 'page' (unused-variable)
augur/tasks/github/releases/core.py|67| R1711: Useless return at end of function or method (useless-return)
augur/tasks/github/releases/core.py|187 col 32| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/github/releases/core.py|200 col 40| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/github/releases/core.py|170| R0912: Too many branches (16/12) (too-many-branches)
augur/tasks/github/releases/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/github/releases/tasks.py|3| W0401: Wildcard import augur.tasks.github.releases.core (wildcard-import)
augur/tasks/github/repo_info/core.py|8| W0401: Wildcard import augur.application.db.models (wildcard-import)
augur/tasks/github/repo_info/core.py|10| W0401: Wildcard import augur.tasks.github.util.github_task_session (wildcard-import)
augur/tasks/github/repo_info/tasks.py|1| C0114: Missing module docstring (missing-module-docstring)
augur/tasks/github/repo_info/tasks.py|4| W0401: Wildcard import augur.tasks.github.repo_info.core (wildcard-import)
augur/tasks/github/traffic/tasks.py|30 col 8| E1120: No value for argument 'logger' in function call (no-value-for-parameter)
augur/tasks/github/traffic/tasks.py|65 col 25| E1121: Too many positional arguments for function call (too-many-function-args)
augur/tasks/github/util/github_api_key_handler.py|10| C0412: Imports from package sqlalchemy are not grouped (ungrouped-imports)
augur/tasks/gitlab/issues_task.py|39 col 8| R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
augur/tasks/gitlab/issues_task.py|86| R0914: Too many local variables (31/30) (too-many-locals)
augur/tasks/gitlab/issues_task.py|86| R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
augur/tasks/gitlab/merge_request_task.py|401 col 5| W0511: TODO: Need to add unique key with pull_request_id and cntrb_id to insert gitlab reviewers (fixme)
augur/tasks/gitlab/merge_request_task.py|35 col 4| R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
augur/tasks/gitlab/merge_request_task.py|182 col 10| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/gitlab/merge_request_task.py|293 col 10| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/gitlab/merge_request_task.py|358 col 10| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/gitlab/merge_request_task.py|425 col 10| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/gitlab/merge_request_task.py|493 col 10| C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
augur/tasks/start_tasks.py|327 col 5| W0511: TODO: Isaac needs to normalize the status's to be abstract in the (fixme)
augur/tasks/start_tasks.py|27| C0413: Import "from augur.tasks.util.collection_state import CollectionState" should be placed at the top of the module (wrong-import-position)
augur/tasks/start_tasks.py|28| W0401: Wildcard import augur.tasks.util.collection_util (wildcard-import)
augur/tasks/start_tasks.py|28| C0413: Import "from augur.tasks.util.collection_util import *" should be placed at the top of the module (wrong-import-position)
augur/tasks/start_tasks.py|29| C0413: Import "from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_facade_weight_time_factor" should be placed at the top of the module (wrong-import-position)
augur/tasks/start_tasks.py|30| C0413: Import "from augur.application.db.lib import execute_sql, get_session" should be placed at the top of the module (wrong-import-position)
augur/tasks/start_tasks.py|157 col 68| W0613: Unused argument 'days_until_collect_again' (unused-argument)
augur/tasks/start_tasks.py|180 col 70| W0613: Unused argument 'days_until_collect_again' (unused-argument)
augur/tasks/start_tasks.py|200 col 46| W0613: Unused argument 'enabled_phase_names' (unused-argument)
augur/tasks/start_tasks.py|200 col 67| W0613: Unused argument 'days_until_collect_again' (unused-argument)
augur/tasks/start_tasks.py|221 col 42| W0613: Unused argument 'enabled_phase_names' (unused-argument)
augur/tasks/start_tasks.py|221 col 63| W0613: Unused argument 'days_until_collect_again' (unused-argument)
augur/tasks/start_tasks.py|285 col 74| C0121: Comparison 'CollectionStatus.core_weight != None' should be 'CollectionStatus.core_weight is not None' (singleton-comparison)
augur/tasks/start_tasks.py|362 col 4| W0612: Unused variable 'engine' (unused-variable)
augur/tasks/util/collection_util.py|304 col 30| R1704: Redefining argument with the local name 'session' (redefined-argument-from-local)
augur/tasks/util/collection_util.py|408 col 4| W0612: Unused variable 'engine' (unused-variable)
augur/tasks/util/collection_util.py|591 col 8| W0612: Unused variable 'augur_collection_list' (unused-variable)
tests/test_tasks/test_task_utlities/test_key_handler/test_github_api_key_handler.py|28 col 24| W0621: Redefining name 'key_handler' from outer scope (line 22) (redefined-outer-name)

@@ -288,6 +288,7 @@ def add_or_update_settings(self, settings: List[dict]):
query = self.session.query(Config).filter(and_(Config.section_name == setting["section_name"],Config.setting_name == setting["setting_name"]) )

if execute_session_query(query, 'first') is None:
# TODO: Update to use bulk insert dicts so config doesn't require database session
Copy link

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: Update to use bulk insert dicts so config doesn't require database session (fixme)

@@ -1,9 +1,19 @@
import sqlalchemy as s
import time
Copy link

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)


try:
working_commits = fetchall_data_from_sql_text(query)
except:
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0702: No exception type(s) specified (bare-except)

return session.query(CollectionStatus).filter(getattr(CollectionStatus,f"{collection_type}_status" ) == CollectionState.COLLECTING.value).count()


def facade_bulk_insert_commits(logger, records):
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
W0621: Redefining name 'logger' from outer scope (line 18) (redefined-outer-name)

firsthalfRecords = records[:len(records)//2]
secondhalfRecords = records[len(records)//2:]

facade_bulk_insert_commits(logger, session,firsthalfRecords)
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
E1121: Too many positional arguments for function call (too-many-function-args)



def insight_model(repo_git: str,logger,engine,session) -> None:
def insight_model(repo_git: str,logger,engine) -> None:
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
R0912: Too many branches (15/12) (too-many-branches)



def insight_model(repo_git: str,logger,engine,session) -> None:
def insight_model(repo_git: str,logger,engine) -> None:
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
R0915: Too many statements (128/50) (too-many-statements)



def insight_model(repo_git: str,logger,engine,session) -> None:
def insight_model(repo_git: str,logger,engine) -> None:
refresh = True
Copy link

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 'refresh' (unused-variable)




def message_insight_model(repo_git: str,logger,engine, session) -> None:
def message_insight_model(repo_git: str,logger,engine) -> None:
Copy link

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 (56/30) (too-many-locals)




def message_insight_model(repo_git: str,logger,engine, session) -> None:
def message_insight_model(repo_git: str,logger,engine) -> None:
Copy link

Choose a reason for hiding this comment

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

[pylint] reported by reviewdog 🐶
R0912: Too many branches (20/12) (too-many-branches)

Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

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

Lets test it!

@sgoggins sgoggins merged commit 7ec8c35 into dev Jun 3, 2024
6 of 7 checks passed
@sgoggins sgoggins deleted the database-improvements branch June 11, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants