Skip to content

Commit

Permalink
fix merge conflict in a comment
Browse files Browse the repository at this point in the history
Signed-off-by: Isaac Milarsky <[email protected]>
  • Loading branch information
IsaacMilarky committed Aug 25, 2023
2 parents b277462 + 56520d3 commit 0c4ff66
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
14 changes: 4 additions & 10 deletions augur/tasks/git/dependency_tasks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,16 @@ def generate_deps_data(session, repo_id, path):

session.logger.info(f"Inserted {len(deps)} dependencies for repo {repo_id}")

"""
def deps_model(session, repo_id,repo_git,repo_path,repo_name):
# Data collection and storage method
def deps_model(session, repo_id,repo_git,repo_group_id):
""" Data collection and storage method
"""
session.logger.info(f"This is the deps model repo: {repo_git}.")
#result = session.execute_sql(repo_path_sql)
result = re.search(r"https:\/\/(github\.com\/[A-Za-z0-9 \- _]+\/)([A-Za-z0-9 \- _ .]+)$", repo_git).groups()

relative_repo_path = f"{repo_group_id}/{result[0]}{result[1]}"
config = AugurConfig(session.logger, session)
absolute_repo_path = config.get_section("Facade")['repo_directory'] + relative_repo_path

generate_deps_data(session,repo_id, absolute_repo_path)
"""

def generate_scorecard(session,repo_id,path):
"""Runs scorecard on repo and stores data in database
Expand Down
11 changes: 10 additions & 1 deletion augur/tasks/git/dependency_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from augur.tasks.init.celery_app import celery_app as celery
from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask, AugurCoreRepoCollectionTask
from augur.application.db.util import execute_session_query
from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path
from augur.application.config import AugurConfig


@celery.task(base=AugurFacadeRepoCollectionTask)
Expand All @@ -21,7 +23,14 @@ def process_dependency_metrics(repo_git):


repo = execute_session_query(query,'one')
deps_model(session, repo.repo_id,repo_git,repo.repo_group_id)

config = AugurConfig(session.logger, session)

absolute_repo_path = get_absolute_repo_path(config.get_section("Facade")['repo_directory'],repo.repo_id,repo.repo_path,repo.repo_name)

session.logger.debug(f"This is the deps model repo: {repo_git}.")

generate_deps_data(session,repo.repo_id,absolute_repo_path)


@celery.task(base=AugurCoreRepoCollectionTask)
Expand Down

0 comments on commit 0c4ff66

Please sign in to comment.