From 4fb4deff3680637d4e49da49ea996c42f646bb49 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 08:22:53 -0500 Subject: [PATCH 001/176] Remove exception handler and improve logging Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 37 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 44bb7e19ae..cfb809a1e0 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -19,34 +19,29 @@ def collect_events(repo_git: str): logger = logging.getLogger(collect_events.__name__) - - try: - - repo_obj = get_repo_by_repo_git(repo_git) - repo_id = repo_obj.repo_id - owner, repo = get_owner_repo(repo_git) + repo_obj = get_repo_by_repo_git(repo_git) + repo_id = repo_obj.repo_id - logger.info(f"Collecting Github events for {owner}/{repo}") + owner, repo = get_owner_repo(repo_git) - key_auth = GithubRandomKeyAuth(logger) + logger.debug(f"Collecting Github events for {owner}/{repo}") - event_data = retrieve_all_event_data(repo_git, logger, key_auth) + key_auth = GithubRandomKeyAuth(logger) - if event_data: - process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) - else: - logger.info(f"{owner}/{repo} has no events") + event_data = retrieve_all_event_data(repo_git, logger, key_auth) - except Exception as e: - logger.error(f"Could not collect events for {repo_git}\n Reason: {e} \n Traceback: {''.join(traceback.format_exception(None, e, e.__traceback__))}") + if event_data: + process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) + else: + logger.debug(f"{owner}/{repo} has no events") def retrieve_all_event_data(repo_git: str, logger, key_auth): owner, repo = get_owner_repo(repo_git) - logger.info(f"Collecting Github events for {owner}/{repo}") + logger.debug(f"Collecting Github events for {owner}/{repo}") url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" @@ -54,7 +49,7 @@ def retrieve_all_event_data(repo_git: str, logger, key_auth): event_count = github_data_access.get_resource_page_count(url) - logger.info(f"{owner}/{repo}: Collecting {event_count} github events") + logger.debug(f"{owner}/{repo}: Collecting {event_count} github events") return list(github_data_access.paginate_resource(url)) @@ -104,9 +99,7 @@ def process_events(events, task_name, repo_id, logger): # query = augur_db.session.query(PullRequest).filter(PullRequest.pr_url == pr_url) # related_pr = execute_session_query(query, 'one') except KeyError: - logger.info(f"{task_name}: Could not find related pr") - logger.info(f"{task_name}: We were searching for: {pr_url}") - logger.info(f"{task_name}: Skipping") + logger.warning(f"{task_name}: Could not find related pr. We were searching for: {pr_url}") continue pr_event_dicts.append( @@ -122,9 +115,7 @@ def process_events(events, task_name, repo_id, logger): # query = augur_db.session.query(Issue).filter(Issue.issue_url == issue_url) # related_issue = execute_session_query(query, 'one') except KeyError: - logger.info(f"{task_name}: Could not find related pr") - logger.info(f"{task_name}: We were searching for: {issue_url}") - logger.info(f"{task_name}: Skipping") + logger.warning(f"{task_name}: Could not find related issue. We were searching for: {issue_url}") continue issue_event_dicts.append( From dcdeed3e0b4232b82abd5e2bc2cf3250db29a607 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:38:29 -0500 Subject: [PATCH 002/176] Fully collect github events Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 66 +++++++++++++++---- augur/tasks/github/util/github_data_access.py | 8 ++- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index cfb809a1e0..4c12518c8a 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -1,6 +1,7 @@ import logging import traceback import sqlalchemy as s +from sqlalchemy.sql import text from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask @@ -9,8 +10,8 @@ from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.tasks.github.util.util import get_owner_repo from augur.tasks.util.worker_util import remove_duplicate_dicts -from augur.application.db.models import PullRequestEvent, IssueEvent, Contributor -from augur.application.db.lib import get_repo_by_repo_git, bulk_insert_dicts, get_issues_by_repo_id, get_pull_requests_by_repo_id, update_issue_closed_cntrbs_by_repo_id +from augur.application.db.models import PullRequestEvent, IssueEvent, Contributor, CollectionStatus +from augur.application.db.lib import get_repo_by_repo_git, bulk_insert_dicts, get_issues_by_repo_id, get_pull_requests_by_repo_id, update_issue_closed_cntrbs_by_repo_id, get_session, get_engine platform_id = 1 @@ -29,15 +30,34 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) - event_data = retrieve_all_event_data(repo_git, logger, key_auth) - - if event_data: - process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) + if bulk_events_collection_endpoint_contains_all_data(repo_id): + event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: - logger.debug(f"{owner}/{repo} has no events") + event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") + + events = [] + for event in event_generator: + events.append(event) + + # making this a decent size since process_events retrieves all the issues and prs each time + if len(events) >= 500: + process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) + events.clear() + + if events: + process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) + + +def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): + + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + + github_data_access = GithubDataAccess(key_auth, logger) + + return github_data_access.does_pagination_contain_all_data(url) -def retrieve_all_event_data(repo_git: str, logger, key_auth): +def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): owner, repo = get_owner_repo(repo_git) @@ -47,11 +67,35 @@ def retrieve_all_event_data(repo_git: str, logger, key_auth): github_data_access = GithubDataAccess(key_auth, logger) - event_count = github_data_access.get_resource_page_count(url) + return github_data_access.paginate_resource(url) - logger.debug(f"{owner}/{repo}: Collecting {event_count} github events") - return list(github_data_access.paginate_resource(url)) +def collect_pr_and_issues_events_by_number(repo_id, repo_git: str, logger, key_auth, task_name) -> None: + + owner, repo = get_owner_repo(repo_git) + + # define logger for task + logger.debug(f"Collecting github events for {owner}/{repo}") + + engine = get_engine() + + with engine.connect() as connection: + + query = text(f""" + (select pr_src_number as number from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc) + UNION + (select gh_issues_number as number from issues WHERE repo_id={repo_id} order by created_at desc); + """) + + result = connection.execute(query).fetchall() + numbers = [x[0] for x in result] + + github_data_access = GithubDataAccess(key_auth, logger) + for number in numbers: + + event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{number}/events" + + yield from github_data_access.paginate_resource(event_url) def process_events(events, task_name, repo_id, logger): diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 2f4c988014..8b4b7419f5 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -65,11 +65,15 @@ def paginate_resource(self, url): return - def is_pagination_limited_by_max_github_pages(self, url): + def does_pagination_contain_all_data(self, url): page_count = self.get_resource_page_count(url) - return page_count <= 299 + if page_count > 300: + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or + is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + + return page_count == 300 def get_resource_page_count(self, url): From f1907f902db2238f90d901b742557a5e2b018c86 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:40:51 -0500 Subject: [PATCH 003/176] Add warning so we can detect if the last page link is not in headers a lot Signed-off-by: Andrew Brain --- augur/tasks/github/util/github_data_access.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 8b4b7419f5..d3b0e0cd87 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -80,6 +80,7 @@ def get_resource_page_count(self, url): response = self.make_request_with_retries(url, method="HEAD") if 'last' not in response.links.keys(): + self.logger.warning(f"Github response without links. Headers: {response.headers}.") return 1 try: From dce359d888ebba9783a21ad6deebfafcc5fcc60a Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 09:45:28 -0500 Subject: [PATCH 004/176] Fix indentation Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 4c12518c8a..39689970be 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -31,7 +31,7 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) if bulk_events_collection_endpoint_contains_all_data(repo_id): - event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) + event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") From c8c9c2f580632f2576de051af5459de8cca13216 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 22 Jul 2024 19:24:02 -0500 Subject: [PATCH 005/176] add commit message to commit message table Signed-off-by: Isaac Milarsky --- augur/application/db/models/augur_data.py | 28 +++++++++++++++++++ .../facade_worker/analyzecommit.py | 4 +++ 2 files changed, 32 insertions(+) diff --git a/augur/application/db/models/augur_data.py b/augur/application/db/models/augur_data.py index 221ee086dd..01221b6ea7 100644 --- a/augur/application/db/models/augur_data.py +++ b/augur/application/db/models/augur_data.py @@ -1350,6 +1350,34 @@ class Commit(Base): repo = relationship("Repo", back_populates="commits") message_ref = relationship("CommitCommentRef", back_populates="cmt") +class CommitMessage(Base): + __tablename__ = "commit_messages" + __table_args__ = { + "schema": "augur_data", + "comment": "This table holds commit messages", + } + + cmt_msg_id = Column( + BigInteger, + primary_key=True, + server_default=text("nextval('augur_data.commits_cmt_id_seq'::regclass)"), + ) + + repo_id = Column( + ForeignKey("augur_data.repo.repo_id", ondelete="RESTRICT", onupdate="CASCADE"), + nullable=False, + ) + + cmt_msg = Column(String, nullable=False) + + cmt_hash = Column(String(80), nullable=False) + + tool_source = Column(String) + tool_version = Column(String) + data_source = Column(String) + data_collection_date = Column( + TIMESTAMP(precision=0), server_default=text("CURRENT_TIMESTAMP") + ) class Issue(Base): __tablename__ = "issues" diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 18a436abb4..f1cf656f5a 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -253,6 +253,10 @@ def generate_commit_record(repos_id,commit,filename, author_name,author_email,author_date,author_timestamp, committer_name,committer_email,committer_date,committer_timestamp, added,removed,whitespace)) + else: + #add commit message record here -IM + #Todo: paint the garage 8/07/89 + pass header = False From db5926f69ae66ad9cc7c38fbcadf2c13ad4bd08c Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 22 Jul 2024 20:28:32 -0500 Subject: [PATCH 006/176] ready for alembic fixes Signed-off-by: Isaac Milarsky --- .../facade_worker/analyzecommit.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index f1cf656f5a..f72ab247a6 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -25,7 +25,9 @@ # and checks for any parents of HEAD that aren't already accounted for in the # repos. It also rebuilds analysis data, checks any changed affiliations and # aliases, and caches data for display. +import datetime import subprocess +from subprocess import check_output import os import sqlalchemy as s @@ -177,6 +179,25 @@ def generate_commit_record(repos_id,commit,filename, #db_local.commit() execute_sql(store_working_commit) + commit_message = check_output( + f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() + ).strip() + + + store_commit_message = s.sql.text("""INSERT INTO commit_messages + (repo_id,cmt_msg,cmt_hash,tool_source,tool_version,data_source,data_collection_date) + VALUES + (:repo_id,:cmt_msg,:cmt_hash,:tool_source,:tool_version,:data_source,:data_collection_date) + """).bindparams(**{ + 'repo_id' : repo_id, + 'cmt_msg' : commit_message, + 'cmt_hash' : commit, + 'tool_source' : 'Facade', + 'tool_version' : '0.78?', + 'data_source' : 'git', + 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + }) + #session.log_activity('Debug',f"Stored working commit and analyzing : {commit}") for line in git_log.stdout.read().decode("utf-8",errors="ignore").split(os.linesep): From 1997a81dcc199e717f7d09061708ff164b557a90 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:07:34 -0500 Subject: [PATCH 007/176] Remove github paginator Signed-off-by: Andrew Brain --- .../application/db/models/augur_operations.py | 15 +- .../contributor_breadth_worker.py | 17 +- augur/tasks/github/facade_github/core.py | 15 +- .../pull_requests/commits_model/core.py | 40 +- augur/tasks/github/repo_info/core.py | 6 +- augur/tasks/github/traffic.py | 1 - augur/tasks/github/util/github_paginator.py | 361 ------------------ 7 files changed, 45 insertions(+), 410 deletions(-) diff --git a/augur/application/db/models/augur_operations.py b/augur/application/db/models/augur_operations.py index f702f05f2f..246d003827 100644 --- a/augur/application/db/models/augur_operations.py +++ b/augur/application/db/models/augur_operations.py @@ -30,12 +30,16 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: Returns List of valid repo urls or empty list if invalid org """ - from augur.tasks.github.util.github_paginator import GithubPaginator, retrieve_dict_from_endpoint + from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint + from augur.tasks.github.util.github_data_access import GithubDataAccess + OWNER_INFO_ENDPOINT = f"https://api.github.com/users/{owner}" ORG_REPOS_ENDPOINT = f"https://api.github.com/orgs/{owner}/repos?per_page=100" USER_REPOS_ENDPOINT = f"https://api.github.com/users/{owner}/repos?per_page=100" + github_data_access = GithubDataAccess(session.oauths, logger) + if not session.oauths.list_of_keys: return None, {"status": "No valid github api keys to retrieve data with"} @@ -54,15 +58,8 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: else: return None, {"status": f"Invalid owner type: {owner_type}"} - # collect repo urls for the given owner - repos = [] - for page_data, _ in GithubPaginator(url, session.oauths, logger).iter_pages(): - - if page_data is None: - break - - repos.extend(page_data) + repos = list(github_data_access.paginate_resource(url)) repo_urls = [repo["html_url"] for repo in repos] diff --git a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py index 232614ad1c..79a0ec9aaa 100644 --- a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py +++ b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py @@ -4,7 +4,7 @@ from datetime import datetime from augur.tasks.init.celery_app import celery_app as celery -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.application.db.models import ContributorRepo from augur.application.db.lib import bulk_insert_dicts from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth @@ -83,6 +83,8 @@ def contributor_breadth_model(self) -> None: cntrb_newest_events_map[gh_login] = newest_event_date + github_data_access = GithubDataAccess(key_auth, logger) + index = 1 total = len(current_cntrb_logins) for cntrb in current_cntrb_logins: @@ -98,15 +100,14 @@ def contributor_breadth_model(self) -> None: cntrb_events = [] - for page_data, page in GithubPaginator(repo_cntrb_url, key_auth, logger).iter_pages(): + for event in github_data_access.paginate_resource(repo_cntrb_url): - if page_data: - cntrb_events += page_data + cntrb_events.append(event) - oldest_event_on_page = datetime.strptime(page_data[-1]["created_at"], "%Y-%m-%dT%H:%M:%SZ") - if oldest_event_on_page < newest_event_in_db: - print("Found cntrb events we already have...skipping the rest") - break + event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") + if event_age < newest_event_in_db: + logger.info("Found cntrb events we already have...skipping the rest") + break if len(cntrb_events) == 0: logger.info("There are no cntrb events, or new events for this user.\n") diff --git a/augur/tasks/github/facade_github/core.py b/augur/tasks/github/facade_github/core.py index d8a35ca582..513c64148b 100644 --- a/augur/tasks/github/facade_github/core.py +++ b/augur/tasks/github/facade_github/core.py @@ -1,10 +1,12 @@ from augur.tasks.github.facade_github.contributor_interfaceable.contributor_interface import * from augur.tasks.github.util.util import get_owner_repo from augur.tasks.github.util.github_task_session import * -from augur.tasks.github.util.github_paginator import * +from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint from augur.application.db.models import * from augur.tasks.util.AugurUUID import GithubUUID from augur.application.db.lib import bulk_insert_dicts +from augur.tasks.github.util.github_data_access import GithubDataAccess + @@ -38,17 +40,16 @@ def query_github_contributors(logger, key_auth, github_url): update_col_map = {'cntrb_email': 'email'} duplicate_col_map = {'cntrb_login': 'login'} - #list to hold contributors needing insertion or update - contributor_list = GithubPaginator(contributors_url, key_auth, logger)#paginate(contributors_url, duplicate_col_map, update_col_map, table, table_pkey) + github_data_access = GithubDataAccess(key_auth, logger) - len_contributor_list = len(contributor_list) + contributor_count = github_data_access.get_resource_count(contributors_url) - logger.info("Count of contributors needing insertion: " + str(len_contributor_list) + "\n") + logger.info("Count of contributors needing insertion: " + str(contributor_count) + "\n") - if len_contributor_list == 0: + if contributor_count == 0: return - for repo_contributor in contributor_list: + for repo_contributor in github_data_access.paginate_resource(contributors_url): try: # Need to hit this single contributor endpoint to get extra data including... # `created at` diff --git a/augur/tasks/github/pull_requests/commits_model/core.py b/augur/tasks/github/pull_requests/commits_model/core.py index f58d875503..3f08fe9c01 100644 --- a/augur/tasks/github/pull_requests/commits_model/core.py +++ b/augur/tasks/github/pull_requests/commits_model/core.py @@ -1,5 +1,5 @@ import sqlalchemy as s -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo from augur.application.db.util import execute_session_query @@ -41,33 +41,31 @@ def pull_request_commits_model(repo_id,logger, augur_db, key_auth, full_collecti task_name = f"{owner}/{name} Pr commits" logger.info(f"Getting pull request commits for repo: {repo.repo_git}") + + github_data_access = GithubDataAccess(key_auth, logger) all_data = [] for index,pr_info in enumerate(pr_urls): logger.info(f'{task_name}: Querying commits for pull request #{index + 1} of {len(pr_urls)}') commits_url = pr_info['pr_url'] + '/commits?state=all' - - #Paginate through the pr commits - pr_commits = GithubPaginator(commits_url, key_auth, logger) - for page_data in pr_commits: - - if page_data: - logger.info(f"{task_name}: Processing pr commit with hash {page_data['sha']}") - pr_commit_row = { - 'pull_request_id': pr_info['pull_request_id'], - 'pr_cmt_sha': page_data['sha'], - 'pr_cmt_node_id': page_data['node_id'], - 'pr_cmt_message': page_data['commit']['message'], - # 'pr_cmt_comments_url': pr_commit['comments_url'], - 'tool_source': 'pull_request_commits_model', - 'tool_version': '0.41', - 'data_source': 'GitHub API', - 'repo_id': repo.repo_id, - } - - all_data.append(pr_commit_row) + for page_data in github_data_access.paginate_resource(commits_url): + + logger.info(f"{task_name}: Processing pr commit with hash {page_data['sha']}") + pr_commit_row = { + 'pull_request_id': pr_info['pull_request_id'], + 'pr_cmt_sha': page_data['sha'], + 'pr_cmt_node_id': page_data['node_id'], + 'pr_cmt_message': page_data['commit']['message'], + # 'pr_cmt_comments_url': pr_commit['comments_url'], + 'tool_source': 'pull_request_commits_model', + 'tool_version': '0.41', + 'data_source': 'GitHub API', + 'repo_id': repo.repo_id, + } + + all_data.append(pr_commit_row) if len(all_data) > 0: logger.info(f"{task_name}: Inserting {len(all_data)} rows") diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index fbdae02026..498afd4bff 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -1,7 +1,7 @@ #SPDX-License-Identifier: MIT import json import sqlalchemy as s -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess from augur.tasks.github.util.github_paginator import hit_api from augur.tasks.github.util.util import get_owner_repo @@ -17,9 +17,9 @@ def query_committers_count(key_auth, logger, owner, repo): logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - contributors = GithubPaginator(url, key_auth, logger) + github_data_access = GithubDataAccess(key_auth, logger) - return len(contributors) + return github_data_access.get_resource_count(url) def get_repo_data(logger, url, response): data = {} diff --git a/augur/tasks/github/traffic.py b/augur/tasks/github/traffic.py index 4101faa3ff..8f1903e4ea 100644 --- a/augur/tasks/github/traffic.py +++ b/augur/tasks/github/traffic.py @@ -2,7 +2,6 @@ from augur.tasks.init.celery_app import celery_app as celery from augur.application.db.data_parse import extract_needed_clone_history_data -from augur.tasks.github.util.github_paginator import GithubPaginator from augur.tasks.util.worker_util import remove_duplicate_dicts from augur.tasks.github.util.util import get_owner_repo from augur.application.db.models import RepoClone diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index 90593cedf6..fcc4892322 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -157,367 +157,6 @@ class GithubApiResult(Enum): BAD_CREDENTIALS = 7 HTML = 8 EMPTY_STRING = 9 - - -class GithubPaginator(collections.abc.Sequence): - """This class is a sequence that handles paginating through data on the Github API. - - Attributes: - url (str): The url that we are collecting data - key_mangager (GithubRandomKeyAuth): Custom httpx auth class - that randomizes the github api key a request gets. - This is how the requests are getting their api keys - logger (logging.Logger): Logger that handler printing information to files and stdout - """ - - def __init__(self, url: str, key_manager: GithubRandomKeyAuth, logger: logging.Logger, from_datetime=None, to_datetime=None): - """Initialize the class GithubPaginator. - - Args: - url: url that the data is being collected - key_manager: class that randomly selects a Github API key for each request - logger: handles logging - from_datetime: collects data after this datatime (not yet implemented) - to_datetime: collects data before this datatime (not yet implemented) - """ - remove_fields = ["per_page", "page"] - url = clean_url(url, remove_fields) - - # we need to add query params directly to the url, instead of passing the param to the httpx.Client.request - # this is because github will only append specified params to the links in the headers if they are a part - # of the url, and not the params with the request - params = {"per_page": 100} - url = add_query_params(url, params) - - self.url = url - self.key_manager = key_manager - self.logger = logger - - # get the logger from the key manager - # self.logger = key_manager.logger - - self.from_datetime = from_datetime - self.to_datetime = to_datetime - - def __getitem__(self, index: int) -> Optional[dict]: - """Get the value at index of the Github API data returned from the url. - - Args: - index: The index of the desired data from the Github API - - Returns: - The value at the index - """ - # if isinstance(index, slice) is True: - - # data_slice = index - # start = data_slice.start - # stop = data_slice.stop - # step = data_slice.step - - # first_item_page = (start // 100) + 1 - # end_item_page = (stop // 100) + 1 - - # all_data: List[dict] = [] - - # for page_number in range(first_item_page, end_item_page+1): - - # # create url to query - # params = {"page": items_page} - # url = add_query_params(self.url, params) - - # data, _ = self.retrieve_data(url) - - # all_data += data - - # first_page_index = start % 100 - - # needed_data = [] - # for index in range(start, stop, step): - # needed_data.append(all_data[index]) - - # return needed_data - - - # get the page the item is on - items_page = (index // 100) + 1 - - # create url to query - params = {"page": items_page} - url = add_query_params(self.url, params) - - data, _, result = self.retrieve_data(url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Unable to get item from the api") - return None - - # get the position of data on the page - page_index = index % 100 - - try: - return data[page_index] - except KeyError as e: - raise KeyError("Data does not exists for that index") from e - - def __len__(self): - """Get the length of the Github API data. - - Returns: - The length of the Github API data at the url. - - Examples: - This function is called when len() is called on the GithubPaginator class for example. - - issues = GithubPaginator(url, session.oauths, logger) - issue_len = len(issues) - """ - - num_pages = self.get_num_pages() - - self.logger.info(f"Num pages: {num_pages}") - - params = {"page": num_pages} - url = add_query_params(self.url, params) - - # get the amount of data on last page - data, _, result = self.retrieve_data(url) - - if result == GithubApiResult.SUCCESS: - return (100 * (num_pages -1)) + len(data) - - self.logger.debug("Unable to retrieve data length from api") - return 0 - - def __iter__(self) -> Generator[Optional[dict], None, None]: - """Provide data from Github API via a generator that yields one dict at a time. - - Yields: - A piece of data from the github api as the specified url - """ - data_list, response, result = self.retrieve_data(self.url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - yield None - return - - # yield the first page data - yield from data_list - - while 'next' in response.links.keys(): - next_page = response.links['next']['url'] - - # Here we don't need to pass in params with the page, or the default params because the url from the headers already has those values - data_list, response, result = self.retrieve_data(next_page) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - return - - yield from data_list - - def iter_pages(self) -> Generator[Tuple[Optional[List[dict]], int], None, None]: - """Provide data from Github API via a generator that yields a page of dicts at a time. - - Returns: - A page of data from the Github API at the specified url - """ - # retrieves the data for the given url - data_list, response, result = self.retrieve_data(self.url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - yield None, None - return - - # this retrieves the page for the given url - page_number = get_url_page_number(self.url) - - # yields the first page of data and its page number - yield data_list, page_number - - while 'next' in response.links.keys(): - - # gets the next page from the last responses header - next_page = response.links['next']['url'] - - # Here we don't need to pass in params with the page, or the default params because the url from the headers already has those values - data_list, response, result = self.retrieve_data(next_page) - - if result != GithubApiResult.SUCCESS: - self.logger.debug(f"Failed to retrieve the data for even though 10 attempts were given. Url: {next_page}") - return - - page_number = get_url_page_number(next_page) - - # if either the data or response is None then yield None and return - if data_list is None or response is None: - return - - # yield the data from the page and its number - yield data_list, page_number - - def retrieve_data(self, url: str) -> Tuple[Optional[List[dict]], Optional[httpx.Response]]: - """Attempt to retrieve data at given url. - - Args: - url: The url to retrieve the data from - - Returns - The response object from hitting the url and the data on the page - """ - timeout = 30 - timeout_count = 0 - num_attempts = 1 - while num_attempts <= 10: - - response = hit_api(self.key_manager, url, self.logger, timeout) - - if response is None: - if timeout_count == 10: - self.logger.error(f"Request timed out 10 times for {url}") - return None, None, GithubApiResult.TIMEOUT - - timeout = timeout * 1.1 - num_attempts += 1 - continue - - # if api returns a status of 204 No Content then return empty list - if response.status_code == 204: - return [], response, GithubApiResult.SUCCESS - - if response.status_code == 404: - return None, response, GithubApiResult.REPO_NOT_FOUND - - if response.status_code in [403, 429]: - - if "Retry-After" in response.headers: - - retry_after = int(response.headers["Retry-After"]) - self.logger.info( - f'\n\n\n\nSleeping for {retry_after} seconds due to secondary rate limit issue.\n\n\n\n') - time.sleep(retry_after) - - elif "X-RateLimit-Remaining" in response.headers and int(response.headers["X-RateLimit-Remaining"]) == 0: - current_epoch = int(time.time()) - epoch_when_key_resets = int(response.headers["X-RateLimit-Reset"]) - key_reset_time = epoch_when_key_resets - current_epoch - - if key_reset_time < 0: - self.logger.error(f"Key reset time was less than 0 setting it to 0.\nThe current epoch is {current_epoch} and the epoch that the key resets at is {epoch_when_key_resets}") - key_reset_time = 0 - - self.logger.info(f"\n\n\nAPI rate limit exceeded. Sleeping until the key resets ({key_reset_time} seconds)") - time.sleep(key_reset_time) - num_attempts = 0 - - else: - time.sleep(60) - - continue - - page_data = parse_json_response(self.logger, response) - - # if the data is a list, then return it and the response - if isinstance(page_data, list) is True: - return page_data, response, GithubApiResult.SUCCESS - - # if the data is a dict then call process_dict_response, and - if isinstance(page_data, dict) is True: - dict_processing_result = process_dict_response(self.logger, response, page_data) - - self.logger.info(f"Used string interogation of dict to determine result. Response code: {response.status_code}. Processing result: {dict_processing_result}. Response body: {page_data}") - - if dict_processing_result == GithubApiResult.NEW_RESULT: - self.logger.info(f"Encountered new dict response from api on url: {url}. Response: {page_data}") - return None, None, GithubApiResult.NEW_RESULT - - if dict_processing_result == GithubApiResult.REPO_NOT_FOUND: - return None, response, GithubApiResult.REPO_NOT_FOUND - - if dict_processing_result in (GithubApiResult.SECONDARY_RATE_LIMIT, GithubApiResult.ABUSE_MECHANISM_TRIGGERED): - continue - - if dict_processing_result == GithubApiResult.RATE_LIMIT_EXCEEDED: - num_attempts = 0 - continue - - if isinstance(page_data, str) is True: - str_processing_result: Union[str, List[dict]] = self.process_str_response(page_data) - - if isinstance(str_processing_result, list): - return str_processing_result, response, GithubApiResult.SUCCESS - - num_attempts += 1 - - self.logger.error("Unable to collect data in 10 attempts") - return None, None, GithubApiResult.NO_MORE_ATTEMPTS - - def get_num_pages(self) -> Optional[int]: - """Get the number of pages of data that a url can paginate through. - - Returns: - The number of pages a url can access - """ - timeout: float = 5 - num_attempts = 0 - while num_attempts < 10: - r = hit_api(self.key_manager, self.url, self.logger, timeout=timeout, method="HEAD") - - if r: - break - - timeout = timeout * 1.2 - else: - raise RuntimeError("Unable to get the number of pages of data in 10 attempts") - - if 'last' not in r.links.keys(): - return 1 - - # get the last url from header - last_page_url = r.links['last']['url'] - - parsed_url = urlparse(last_page_url) - try: - num_pages = int(parse_qs(parsed_url.query)['page'][0]) - except (KeyError, ValueError): - return None - - return num_pages - - def hit_api(self, url, timeout): - - return hit_api(self.key_manager, url, self.logger, timeout) - - -################################################### - - def process_str_response(self, page_data: str) -> Union[str, List[dict]]: - """Process an api response of type string. - - Args: - page_data: the string response from the api that is being processed - - Returns: - html_response, empty_string, and failed_to_parse_jsonif the data is not processable. - Or a list of dicts if the json was parasable - """ - self.logger.info(f"Warning! page_data was string: {page_data}\n") - - if "" in page_data: - self.logger.info("HTML was returned, trying again...\n") - return GithubApiResult.HTML - - if not page_data: - self.logger.info("Empty string, trying again...\n") - return GithubApiResult.EMPTY_STRING - - try: - list_of_dict_page_data = json.loads(page_data) - return list_of_dict_page_data - except TypeError: - return "failed_to_parse_json" ################################################################################ From 093d4dde6e760934733e3a865f34bbe7f92a6ff9 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:34:13 -0500 Subject: [PATCH 008/176] Remove github paginator Signed-off-by: Andrew Brain --- .../application/db/models/augur_operations.py | 14 +- .../contributor_interface.py | 27 ++-- augur/tasks/github/facade_github/core.py | 3 +- augur/tasks/github/facade_github/tasks.py | 13 +- augur/tasks/github/util/github_paginator.py | 144 +----------------- 5 files changed, 32 insertions(+), 169 deletions(-) diff --git a/augur/application/db/models/augur_operations.py b/augur/application/db/models/augur_operations.py index 246d003827..bb29c7571a 100644 --- a/augur/application/db/models/augur_operations.py +++ b/augur/application/db/models/augur_operations.py @@ -30,9 +30,7 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: Returns List of valid repo urls or empty list if invalid org """ - from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint - from augur.tasks.github.util.github_data_access import GithubDataAccess - + from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException OWNER_INFO_ENDPOINT = f"https://api.github.com/users/{owner}" ORG_REPOS_ENDPOINT = f"https://api.github.com/orgs/{owner}/repos?per_page=100" @@ -44,13 +42,17 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: return None, {"status": "No valid github api keys to retrieve data with"} # determine whether the owner is a user or an organization - data, _ = retrieve_dict_from_endpoint(logger, session.oauths, OWNER_INFO_ENDPOINT) - if not data: + try: + data = github_data_access.get_resource(OWNER_INFO_ENDPOINT) + except UrlNotFoundException as e: + logger.error("Owner not found on github") return None, {"status": "Invalid owner"} + except Exception as e: + logger.error(f"Failed to get owner data from github. Exception: {e}") + return None, {"status": "Failed to get owner data from github"} owner_type = data["type"] - if owner_type == "User": url = USER_REPOS_ENDPOINT elif owner_type == "Organization": diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index e898f0b6df..043926b9d9 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -3,7 +3,8 @@ import time import sqlalchemy as s from augur.application.db.models import * -from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, retrieve_dict_from_endpoint +from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException # Debugger import traceback from augur.tasks.github.util.github_paginator import GithubApiResult @@ -23,7 +24,7 @@ # Hit the endpoint specified by the url and return the json that it returns if it returns a dict. # Returns None on failure. -# NOTE: This function is being deprecated in favor of retrieve_dict_from_endpoint +# NOTE: This function is being deprecated in favor of GithubDataAcess.get_resource() def request_dict_from_endpoint(logger, session, url, timeout_wait=10): attempts = 0 response_data = None @@ -276,21 +277,19 @@ def fetch_username_from_email(logger, auth, commit): f"Couldn't resolve email url with given data. Reason: {e}") # If the method throws an error it means that we can't hit the endpoint so we can't really do much return login_json - - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url) + github_data_access = GithubDataAccess(auth, logger) + + login_json = github_data_access.get_resource(url) + # Check if the email result got anything, if it failed try a name search. - if login_json is None or 'total_count' not in login_json or login_json['total_count'] == 0: + if 'total_count' not in login_json or login_json['total_count'] == 0: logger.warning( f"Could not resolve the username from {commit['email_raw']}") logger.debug(f"email api url {url}") return None - else: - # Return endpoint dictionary if email found it. - return login_json - # failure condition returns None return login_json # Method to return the login given commit data using the supplemental data in the commit @@ -298,6 +297,8 @@ def fetch_username_from_email(logger, auth, commit): # -name def get_login_with_supplemental_data(logger, auth, commit_data): + github_data_access = GithubDataAccess(auth, logger) + # Try to get login from all possible emails # Is None upon failure. login_json = fetch_username_from_email(logger,auth,commit_data) @@ -327,8 +328,8 @@ def get_login_with_supplemental_data(logger, auth, commit_data): logger.warning( f"Couldn't resolve name url with given data. Reason: {e}") return None - - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url) + + login_json = github_data_access.get_resource(url) # total_count is the count of username's found by the endpoint. if login_json is None or 'total_count' not in login_json: @@ -365,8 +366,10 @@ def get_login_with_commit_hash(logger, auth, commit_data, repo_id): #TODO: here. # Send api request - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url)#request_dict_from_endpoint(session,url) + github_data_access = GithubDataAccess(auth, logger) + login_json = github_data_access.get_resource(url) + # TODO: Why are we returning None if 'sha' is not in response if we aren't even using it? if login_json is None or 'sha' not in login_json: logger.debug(f"Search query returned empty data. Moving on. Data: {login_json}") return None diff --git a/augur/tasks/github/facade_github/core.py b/augur/tasks/github/facade_github/core.py index 513c64148b..32ea13b041 100644 --- a/augur/tasks/github/facade_github/core.py +++ b/augur/tasks/github/facade_github/core.py @@ -1,7 +1,6 @@ from augur.tasks.github.facade_github.contributor_interfaceable.contributor_interface import * from augur.tasks.github.util.util import get_owner_repo from augur.tasks.github.util.github_task_session import * -from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint from augur.application.db.models import * from augur.tasks.util.AugurUUID import GithubUUID from augur.application.db.lib import bulk_insert_dicts @@ -61,7 +60,7 @@ def query_github_contributors(logger, key_auth, github_url): #r = hit_api(session.oauths, cntrb_url, logger) #contributor = r.json() - contributor, result = retrieve_dict_from_endpoint(logger, key_auth, cntrb_url) + contributor = github_data_access.get_resource(cntrb_url) #logger.info(f"Contributor: {contributor} \n") company = None diff --git a/augur/tasks/github/facade_github/tasks.py b/augur/tasks/github/facade_github/tasks.py index fdf1f5da81..8b3a304a71 100644 --- a/augur/tasks/github/facade_github/tasks.py +++ b/augur/tasks/github/facade_github/tasks.py @@ -3,7 +3,7 @@ from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask -from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.application.db.models import Contributor from augur.tasks.github.facade_github.core import * @@ -13,6 +13,8 @@ def process_commit_metadata(logger, auth, contributorQueue, repo_id, platform_id): + github_data_access = GithubDataAccess(auth, logger) + for contributor in contributorQueue: # Get the email from the commit data email = contributor['email_raw'] if 'email_raw' in contributor else contributor['email'] @@ -67,11 +69,10 @@ def process_commit_metadata(logger, auth, contributorQueue, repo_id, platform_id url = ("https://api.github.com/users/" + login) - user_data, _ = retrieve_dict_from_endpoint(logger, auth, url) - - if user_data == None: - logger.warning( - f"user_data was unable to be reached. Skipping...") + try: + user_data = github_data_access.get_resource(url) + except UrlNotFoundException as e: + logger.warning(f"User of {login} not found on github. Skipping...") continue # Use the email found in the commit data if api data is NULL diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index fcc4892322..f426f92943 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -1,20 +1,14 @@ """Logic to paginate the Github API.""" -import collections import httpx import time -import json import logging -from typing import List, Optional, Union, Generator, Tuple +from typing import Optional from urllib.parse import urlencode, urlparse, parse_qs, urlunparse from enum import Enum - -from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth -from augur.tasks.github.util.util import parse_json_response - def hit_api(key_manager, url: str, logger: logging.Logger, timeout: float = 10, method: str = 'GET', ) -> Optional[httpx.Response]: """Ping the api and get the data back for the page. @@ -157,139 +151,3 @@ class GithubApiResult(Enum): BAD_CREDENTIALS = 7 HTML = 8 EMPTY_STRING = 9 - - -################################################################################ - -# Url Helper Method to remove query paramaters from the url -def clean_url(url: str, keys: List[str]) -> str: - """Remove query params from url. - - Args: - url: the url that is being modified - keys: the query params that are being removed - - Returns: - A url with the params in keys removed - """ - u = urlparse(url) - query = parse_qs(u.query, keep_blank_values=True) - - for key in keys: - query.pop(key, None) - - u = u._replace(query=urlencode(query, True)) - - return urlunparse(u) - - -def add_query_params(url: str, additional_params: dict) -> str: - """Add query params to a url. - - Args: - url: the url that is being modified - additional_params: key value pairs specififying the paramaters to be added - - Returns: - The url with the key value pairs in additional_params added as query params - """ - url_components = urlparse(url) - original_params = parse_qs(url_components.query) - # Before Python 3.5 you could update original_params with - # additional_params, but here all the variables are immutable. - merged_params = {**original_params, **additional_params} - updated_query = urlencode(merged_params, doseq=True) - # _replace() is how you can create a new NamedTuple with a changed field - return url_components._replace(query=updated_query).geturl() - - - -################################################################################ - - -def get_url_page_number(url: str) -> int: - """Parse the page number from the url. - - Note: - If the url does not contain a page number the function returns 1 - - Args: - url: url to get the page number from - - Returns: - The page number that the url contains - """ - parsed_url = urlparse(url) - try: - # if page is not a url query param then this is page 1 - page_number = int(parse_qs(parsed_url.query)['page'][0]) - - except KeyError: - return 1 - - return page_number - - -def retrieve_dict_from_endpoint(logger, key_auth, url, timeout_wait=10) -> Tuple[Optional[dict], GithubApiResult]: - timeout = timeout_wait - timeout_count = 0 - num_attempts = 1 - - while num_attempts <= 10: - - response = hit_api(key_auth, url, logger, timeout) - - if response is None: - if timeout_count == 10: - logger.error(f"Request timed out 10 times for {url}") - return None, GithubApiResult.TIMEOUT - - timeout = timeout * 1.1 - num_attempts += 1 - continue - - - page_data = parse_json_response(logger, response) - - if isinstance(page_data, str): - # TODO: Define process_str_response as outside the class and fix this reference - str_processing_result: Union[str, List[dict]] = process_str_response(logger,page_data) - - if isinstance(str_processing_result, dict): - #return str_processing_result, response, GithubApiResult.SUCCESS - page_data = str_processing_result - else: - num_attempts += 1 - continue - - # if the data is a list, then return it and the response - if isinstance(page_data, list): - logger.warning("Wrong type returned, trying again...") - logger.info(f"Returned list: {page_data}") - - # if the data is a dict then call process_dict_response, and - elif isinstance(page_data, dict): - dict_processing_result = process_dict_response(logger, response, page_data) - - if dict_processing_result == GithubApiResult.SUCCESS: - return page_data, dict_processing_result - if dict_processing_result == GithubApiResult.NEW_RESULT: - logger.info(f"Encountered new dict response from api on url: {url}. Response: {page_data}") - return None, GithubApiResult.NEW_RESULT - - if dict_processing_result == GithubApiResult.REPO_NOT_FOUND: - return None, GithubApiResult.REPO_NOT_FOUND - - if dict_processing_result in (GithubApiResult.SECONDARY_RATE_LIMIT, GithubApiResult.ABUSE_MECHANISM_TRIGGERED): - continue - - if dict_processing_result == GithubApiResult.RATE_LIMIT_EXCEEDED: - num_attempts = 0 - continue - - - - num_attempts += 1 - - logger.error("Unable to collect data in 10 attempts") - return None, GithubApiResult.NO_MORE_ATTEMPTS From be886f9f6c51163ac91bcee2c170ab4f6999d8f5 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:38:24 -0500 Subject: [PATCH 009/176] Add back check Signed-off-by: Andrew Brain --- .../contributor_interfaceable/contributor_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index 043926b9d9..b6bd8e2ee2 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -283,7 +283,7 @@ def fetch_username_from_email(logger, auth, commit): login_json = github_data_access.get_resource(url) # Check if the email result got anything, if it failed try a name search. - if 'total_count' not in login_json or login_json['total_count'] == 0: + if login_json is None or 'total_count' not in login_json or login_json['total_count'] == 0: logger.warning( f"Could not resolve the username from {commit['email_raw']}") logger.debug(f"email api url {url}") From 2f3333ee3d0686b030c6907167de1a0a5efa08c0 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:39:48 -0500 Subject: [PATCH 010/176] Fix syntax error Signed-off-by: Andrew Brain --- .../contributor_interfaceable/contributor_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index b6bd8e2ee2..9c77be540d 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -3,7 +3,7 @@ import time import sqlalchemy as s from augur.application.db.models import * -from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, +from augur.tasks.github.util.github_paginator import hit_api, process_dict_response from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException # Debugger import traceback From 7a55a9e64be4a3b2896ad4051d8f610567862a08 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:41:33 -0500 Subject: [PATCH 011/176] Fix pylint errors Signed-off-by: Andrew Brain --- .../contributor_interfaceable/contributor_interface.py | 3 +-- augur/tasks/github/util/github_paginator.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index 9c77be540d..4303cc3193 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -4,9 +4,8 @@ import sqlalchemy as s from augur.application.db.models import * from augur.tasks.github.util.github_paginator import hit_api, process_dict_response -from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException +from augur.tasks.github.util.github_data_access import GithubDataAccess # Debugger -import traceback 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 diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index f426f92943..bd141d0c32 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -6,7 +6,6 @@ from typing import Optional -from urllib.parse import urlencode, urlparse, parse_qs, urlunparse from enum import Enum From 7ef06840f784474876111a16174521f6befc7cab Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Thu, 25 Jul 2024 12:05:57 -0500 Subject: [PATCH 012/176] add commit message table to alembic scripts Signed-off-by: Isaac Milarsky --- augur/application/db/models/augur_data.py | 10 +++-- .../versions/29_add_commit_message_table.py | 42 +++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 augur/application/schema/alembic/versions/29_add_commit_message_table.py diff --git a/augur/application/db/models/augur_data.py b/augur/application/db/models/augur_data.py index 01221b6ea7..934949138e 100644 --- a/augur/application/db/models/augur_data.py +++ b/augur/application/db/models/augur_data.py @@ -1352,10 +1352,12 @@ class Commit(Base): class CommitMessage(Base): __tablename__ = "commit_messages" - __table_args__ = { - "schema": "augur_data", - "comment": "This table holds commit messages", - } + __table_args__ = ( UniqueConstraint("repo_id","cmt_hash", name="commit-message-insert-unique"), + { + "schema": "augur_data", + "comment": "This table holds commit messages", + } + ) cmt_msg_id = Column( BigInteger, diff --git a/augur/application/schema/alembic/versions/29_add_commit_message_table.py b/augur/application/schema/alembic/versions/29_add_commit_message_table.py new file mode 100644 index 0000000000..11f3fef554 --- /dev/null +++ b/augur/application/schema/alembic/versions/29_add_commit_message_table.py @@ -0,0 +1,42 @@ +"""Add commit message table + +Revision ID: 29 +Revises: 28 +Create Date: 2024-07-25 12:02:57.185867 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = '29' +down_revision = '28' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('commit_messages', + sa.Column('cmt_msg_id', sa.BigInteger(), server_default=sa.text("nextval('augur_data.commits_cmt_id_seq'::regclass)"), nullable=False), + sa.Column('repo_id', sa.BigInteger(), nullable=False), + sa.Column('cmt_msg', sa.String(), nullable=False), + sa.Column('cmt_hash', sa.String(length=80), nullable=False), + sa.Column('tool_source', sa.String(), nullable=True), + sa.Column('tool_version', sa.String(), nullable=True), + sa.Column('data_source', sa.String(), nullable=True), + sa.Column('data_collection_date', postgresql.TIMESTAMP(precision=0), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=True), + sa.ForeignKeyConstraint(['repo_id'], ['augur_data.repo.repo_id'], onupdate='CASCADE', ondelete='RESTRICT'), + sa.PrimaryKeyConstraint('cmt_msg_id'), + sa.UniqueConstraint('repo_id', 'cmt_hash', name='commit-message-insert-unique'), + schema='augur_data', + comment='This table holds commit messages' + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('commit_messages', schema='augur_data') + # ### end Alembic commands ### From 82488f808f33be6ba088ec6f830dd3087b684b10 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Thu, 25 Jul 2024 12:22:57 -0500 Subject: [PATCH 013/176] bulk insert commit message data Signed-off-by: Isaac Milarsky --- augur/tasks/git/facade_tasks.py | 14 +++++++++++--- .../facade_worker/facade_worker/analyzecommit.py | 11 ++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 041f4b8a5b..70e7facbd9 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -4,7 +4,7 @@ from celery import group, chain import sqlalchemy as s -from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits +from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import trim_commits from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path, get_parent_commits_set, get_existing_commits_set @@ -23,7 +23,7 @@ from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask -from augur.application.db.models import Repo, CollectionStatus +from augur.application.db.models import Repo, CollectionStatus, CommitMessage from augur.tasks.git.dependency_tasks.tasks import process_dependency_metrics from augur.tasks.git.dependency_libyear_tasks.tasks import process_libyear_dependency_metrics @@ -205,6 +205,7 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: repo_loc = (f"{absolute_path}/.git") pendingCommitRecordsToInsert = [] + pendingCommitMessageRecordsToInsert = [] for count, commitTuple in enumerate(queue): quarterQueue = int(len(queue) / 4) @@ -217,14 +218,21 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: logger.info(f"Progress through current analysis queue is {(count / len(queue)) * 100}%") #logger.info(f"Got to analysis!") - commitRecords = analyze_commit(logger, repo_id, repo_loc, commitTuple) + commitRecords, commit_msg = analyze_commit(logger, repo_id, repo_loc, commitTuple) #logger.debug(commitRecord) if len(commitRecords): pendingCommitRecordsToInsert.extend(commitRecords) if len(pendingCommitRecordsToInsert) >= 1000: facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) pendingCommitRecordsToInsert = [] + + if commit_msg: + pendingCommitMessageRecordsToInsert.append(commit_msg) + + if len(pendingCommitMessageRecordsToInsert) >= 1000: + bulk_insert_dicts(logger,pendingCommitMessageRecordsToInsert, CommitMessage, ["repo_id","cmt_hash"]) + bulk_insert_dicts(logger,pendingCommitMessageRecordsToInsert, CommitMessage, ["repo_id","cmt_hash"]) facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) # Remove the working commit. diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index f72ab247a6..16220947b0 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -184,11 +184,7 @@ def generate_commit_record(repos_id,commit,filename, ).strip() - store_commit_message = s.sql.text("""INSERT INTO commit_messages - (repo_id,cmt_msg,cmt_hash,tool_source,tool_version,data_source,data_collection_date) - VALUES - (:repo_id,:cmt_msg,:cmt_hash,:tool_source,:tool_version,:data_source,:data_collection_date) - """).bindparams(**{ + msg_record = { 'repo_id' : repo_id, 'cmt_msg' : commit_message, 'cmt_hash' : commit, @@ -196,7 +192,8 @@ def generate_commit_record(repos_id,commit,filename, 'tool_version' : '0.78?', 'data_source' : 'git', 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') - }) + } + #session.log_activity('Debug',f"Stored working commit and analyzing : {commit}") @@ -339,4 +336,4 @@ def generate_commit_record(repos_id,commit,filename, added,removed,whitespace)) - return recordsToInsert + return recordsToInsert, msg_record From c7d44e562a59cad9495eea6c86375de613e181bb Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 09:20:09 -0500 Subject: [PATCH 014/176] collection tweak Signed-off-by: Sean P. Goggins --- augur/application/cli/backend.py | 2 +- augur/application/cli/collection.py | 2 +- augur/application/cli/tasks.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/application/cli/backend.py b/augur/application/cli/backend.py index 4a6df4d9d4..37669725ab 100644 --- a/augur/application/cli/backend.py +++ b/augur/application/cli/backend.py @@ -185,7 +185,7 @@ def determine_worker_processes(ratio,maximum): sleep_time += 6 #60% of estimate, Maximum value of 45 : Reduced because it can be lower - core_num_processes = determine_worker_processes(.40, 50) + core_num_processes = determine_worker_processes(.40, 90) logger.info(f"Starting core worker processes with concurrency={core_num_processes}") core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h" process_list.append(subprocess.Popen(core_worker.split(" "))) diff --git a/augur/application/cli/collection.py b/augur/application/cli/collection.py index 3cb08ef1cd..d4daaf95b5 100644 --- a/augur/application/cli/collection.py +++ b/augur/application/cli/collection.py @@ -125,7 +125,7 @@ def determine_worker_processes(ratio,maximum): sleep_time += 6 #60% of estimate, Maximum value of 45: Reduced because not needed - core_num_processes = determine_worker_processes(.40, 50) + core_num_processes = determine_worker_processes(.40, 90) logger.info(f"Starting core worker processes with concurrency={core_num_processes}") core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h" process_list.append(subprocess.Popen(core_worker.split(" "))) diff --git a/augur/application/cli/tasks.py b/augur/application/cli/tasks.py index d7ce4e4398..19caacd5a0 100644 --- a/augur/application/cli/tasks.py +++ b/augur/application/cli/tasks.py @@ -36,7 +36,7 @@ def start(): secondary_worker_process = None scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling" - core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n core:{uuid.uuid4().hex}@%h" + core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=90 -n core:{uuid.uuid4().hex}@%h" secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" ")) From faa9eb1653f29ba82a52b335b985d4bdad1eb702 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 09:21:35 -0500 Subject: [PATCH 015/176] update to collection Signed-off-by: Sean P. Goggins --- augur/application/cli/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/application/cli/tasks.py b/augur/application/cli/tasks.py index 19caacd5a0..f99e078b60 100644 --- a/augur/application/cli/tasks.py +++ b/augur/application/cli/tasks.py @@ -37,7 +37,7 @@ def start(): scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling" core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=90 -n core:{uuid.uuid4().hex}@%h" - secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" + secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=20 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" ")) core_worker_process = subprocess.Popen(core_worker.split(" ")) From 6d4207e343b1d75fddde2819f6c074e83842ac5b Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 12:52:20 -0500 Subject: [PATCH 016/176] updated docker schema Signed-off-by: Sean P. Goggins --- docker/database/augur-new-schema.sql | 4635 +++++---- docker/database/augur-retired-sql.schema | 10330 +++++++++++++++++++++ docs/new-install.md | 4 +- 3 files changed, 13385 insertions(+), 1584 deletions(-) create mode 100644 docker/database/augur-retired-sql.schema diff --git a/docker/database/augur-new-schema.sql b/docker/database/augur-new-schema.sql index ac3872a1d5..3731ae2aec 100644 --- a/docker/database/augur-new-schema.sql +++ b/docker/database/augur-new-schema.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) --- Dumped by pg_dump version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) +-- Dumped from database version 16.3 (Homebrew) +-- Dumped by pg_dump version 16.3 (Homebrew) SET statement_timeout = 0; SET lock_timeout = 0; @@ -140,10 +140,10 @@ CREATE TABLE augur_data.analysis_log ( ALTER TABLE augur_data.analysis_log OWNER TO augur; -- --- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" +CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -151,180 +151,127 @@ CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" CACHE 1; -ALTER TABLE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; - --- --- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; -- --- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.chaoss_metric_status ( - cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, - cm_group character varying, - cm_source character varying, - cm_type character varying, - cm_backend_status character varying, - cm_frontend_status character varying, - cm_defined boolean, - cm_api_endpoint_repo character varying, - cm_api_endpoint_rg character varying, - cm_name character varying, - cm_working_group character varying, - cm_info json, +CREATE TABLE augur_data.pull_requests ( + pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, + repo_id bigint DEFAULT 0, + pr_url character varying, + pr_src_id bigint, + pr_src_node_id character varying, + pr_html_url character varying, + pr_diff_url character varying, + pr_patch_url character varying, + pr_issue_url character varying, + pr_augur_issue_id bigint, + pr_src_number bigint, + pr_src_state character varying, + pr_src_locked boolean, + pr_src_title character varying, + pr_body text, + pr_created_at timestamp(0) without time zone, + pr_updated_at timestamp(0) without time zone, + pr_closed_at timestamp(0) without time zone, + pr_merged_at timestamp(0) without time zone, + pr_merge_commit_sha character varying, + pr_teams bigint, + pr_milestone character varying, + pr_commits_url character varying, + pr_review_comments_url character varying, + pr_review_comment_url character varying, + pr_comments_url character varying, + pr_statuses_url character varying, + pr_meta_head_id character varying, + pr_meta_base_id character varying, + pr_src_issue_url character varying, + pr_src_comments_url character varying, + pr_src_review_comments_url character varying, + pr_src_commits_url character varying, + pr_src_statuses_url character varying, + pr_src_author_association character varying, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cm_working_group_focus_area character varying + pr_augur_contributor_id uuid ); -ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; - --- --- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; - +ALTER TABLE augur_data.pull_requests OWNER TO augur; -- --- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.chaoss_user ( - chaoss_id bigint NOT NULL, - chaoss_login_name character varying, - chaoss_login_hashword character varying, - chaoss_email character varying, - chaoss_text_phone character varying, - chaoss_first_name character varying, - chaoss_last_name character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT now() -); - +COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; -ALTER TABLE augur_data.chaoss_user OWNER TO augur; -- --- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; -ALTER TABLE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; -- --- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur -- -ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; +COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; -- --- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; -ALTER TABLE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; -- --- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.commit_comment_ref ( - cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, - cmt_id bigint NOT NULL, - repo_id bigint, - msg_id bigint NOT NULL, - user_id bigint NOT NULL, - body text, - line bigint, - "position" bigint, - commit_comment_src_node_id character varying, - cmt_comment_src_id bigint NOT NULL, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - +COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; -ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; -- --- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; -- --- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; -- --- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.commit_parents_parent_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; -ALTER TABLE augur_data.commit_parents_parent_id_seq OWNER TO augur; -- --- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repo_prs; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.commit_parents ( - cmt_id bigint NOT NULL, - parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +CREATE MATERIALIZED VIEW augur_data.api_get_all_repo_prs AS + SELECT repo_id, + count(*) AS pull_requests_all_time + FROM augur_data.pull_requests + GROUP BY repo_id + WITH NO DATA; -ALTER TABLE augur_data.commit_parents OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.api_get_all_repo_prs OWNER TO augur; -- -- Name: commits_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur @@ -338,7 +285,7 @@ CREATE SEQUENCE augur_data.commits_cmt_id_seq CACHE 1; -ALTER TABLE augur_data.commits_cmt_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commits_cmt_id_seq OWNER TO augur; -- -- Name: commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -352,12 +299,12 @@ CREATE TABLE augur_data.commits ( cmt_author_raw_email character varying NOT NULL, cmt_author_email character varying NOT NULL, cmt_author_date character varying(10) NOT NULL, - cmt_author_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_author_affiliation character varying, cmt_committer_name character varying NOT NULL, cmt_committer_raw_email character varying NOT NULL, cmt_committer_email character varying NOT NULL, cmt_committer_date character varying NOT NULL, - cmt_committer_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_committer_affiliation character varying, cmt_added integer NOT NULL, cmt_removed integer NOT NULL, cmt_whitespace integer NOT NULL, @@ -373,7 +320,8 @@ CREATE TABLE augur_data.commits ( data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, cmt_ght_author_id uuid -); +) +WITH (autovacuum_vacuum_scale_factor='0', autovacuum_vacuum_threshold='1000'); ALTER TABLE augur_data.commits OWNER TO augur; @@ -387,125 +335,113 @@ Each row represents changes to one FILE within a single commit. So you will enco -- --- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repos_commits; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq - START WITH 25430 +CREATE MATERIALIZED VIEW augur_data.api_get_all_repos_commits AS + SELECT repo_id, + count(DISTINCT cmt_commit_hash) AS commits_all_time + FROM augur_data.commits + GROUP BY repo_id + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.api_get_all_repos_commits OWNER TO augur; + +-- +-- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_seq + START WITH 31000 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_seq OWNER TO augur; -- --- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributor_affiliations ( - ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, - ca_domain character varying(64) NOT NULL, - ca_start_date date DEFAULT '1970-01-01'::date, - ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - ca_affiliation character varying, - ca_active smallint DEFAULT 1, +CREATE TABLE augur_data.issues ( + issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, + repo_id bigint, + pull_request bigint, + pull_request_id bigint, + created_at timestamp(0) without time zone, + issue_title character varying, + issue_body character varying, + comment_count bigint, + updated_at timestamp(0) without time zone, + closed_at timestamp(0) without time zone, + due_on timestamp(0) without time zone, + repository_url character varying, + issue_url character varying, + labels_url character varying, + comments_url character varying, + events_url character varying, + html_url character varying, + issue_state character varying, + issue_node_id character varying, + gh_issue_number bigint, + gh_issue_id bigint, + gh_user_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + reporter_id uuid, + cntrb_id uuid ); -ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; +ALTER TABLE augur_data.issues OWNER TO augur; -- --- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; +COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; -- --- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; -ALTER TABLE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; -- --- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repos_issues; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributor_repo ( - cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, - repo_git character varying NOT NULL, - repo_name character varying NOT NULL, - gh_repo_id bigint NOT NULL, - cntrb_category character varying, - event_id bigint, - created_at timestamp(0) without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL -); +CREATE MATERIALIZED VIEW augur_data.api_get_all_repos_issues AS + SELECT repo_id, + count(*) AS issues_all_time + FROM augur_data.issues + WHERE (pull_request IS NULL) + GROUP BY repo_id + WITH NO DATA; -ALTER TABLE augur_data.contributor_repo OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.api_get_all_repos_issues OWNER TO augur; -- --- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. -From: [ - { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } -] -'; - - --- --- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; - - --- --- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur --- +CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; +ALTER SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; -- -- Name: contributors; Type: TABLE; Schema: augur_data; Owner: augur @@ -731,53 +667,63 @@ https://gitlab.com/api/v4/users?search=outdoors@acm.org -- --- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.issue_events_event_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_events_event_id_seq OWNER TO augur; -- --- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributors_aliases ( - cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, - canonical_email character varying NOT NULL, - alias_email character varying NOT NULL, - cntrb_active smallint DEFAULT 1 NOT NULL, - cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, +CREATE TABLE augur_data.issue_events ( + event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, + issue_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + node_id character varying, + node_url character varying, + platform_id bigint NOT NULL, + issue_event_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL + cntrb_id uuid ); -ALTER TABLE augur_data.contributors_aliases OWNER TO augur; +ALTER TABLE augur_data.issue_events OWNER TO augur; -- --- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. +COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; -The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + +-- +-- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; -- --- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq +CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -785,149 +731,168 @@ CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq CACHE 1; -ALTER TABLE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; -- --- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_cntrb_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE TABLE augur_data.issue_message_ref ( + issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + msg_id bigint, + issue_msg_ref_src_node_id character varying, + issue_msg_ref_src_comment_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -ALTER TABLE augur_data.contributors_cntrb_id_seq OWNER TO augur; +ALTER TABLE augur_data.issue_message_ref OWNER TO augur; -- --- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; -ALTER TABLE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; -- --- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 - START WITH 1 +CREATE SEQUENCE augur_data.message_msg_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.message_msg_id_seq OWNER TO augur; -- --- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: message; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.discourse_insights ( - msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, - msg_id bigint, - discourse_act character varying, +CREATE TABLE augur_data.message ( + msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, + rgls_id bigint, + platform_msg_id bigint, + platform_node_id character varying, + repo_id bigint, + msg_text character varying, + msg_timestamp timestamp(0) without time zone, + msg_sender_email character varying, + msg_header character varying, + pltfrm_id bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid ); -ALTER TABLE augur_data.discourse_insights OWNER TO augur; +ALTER TABLE augur_data.message OWNER TO augur; -- --- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; +COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; -- --- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; -- --- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_annual ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE TABLE augur_data.pull_request_events ( + pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + issue_event_src_id bigint, + node_id character varying, + node_url character varying, + platform_id bigint DEFAULT 25150 NOT NULL, + pr_platform_event_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid ); -ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; +ALTER TABLE augur_data.pull_request_events OWNER TO augur; -- --- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_annual ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; -ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; +-- +-- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + -- --- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_monthly ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - month smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_message_ref ( + pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + msg_id bigint, + pr_message_ref_src_comment_id bigint, + pr_message_ref_src_node_id character varying, + pr_issue_url character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -935,71 +900,85 @@ CREATE TABLE augur_data.dm_repo_group_monthly ( ); -ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; +ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; -- --- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_weekly ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - week smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; -- --- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_monthly ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - month smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE TABLE augur_data.pull_request_reviews ( + pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + pr_review_author_association character varying, + pr_review_state character varying, + pr_review_body character varying, + pr_review_submitted_at timestamp(6) without time zone, + pr_review_src_id bigint, + pr_review_node_id character varying, + pr_review_html_url character varying, + pr_review_pull_request_url character varying, + pr_review_commit_id character varying, + platform_id bigint DEFAULT 25150, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; +ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; -- --- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_weekly ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - week smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE SEQUENCE augur_data.repo_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.repo_repo_id_seq OWNER TO augur; + +-- +-- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo ( + repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + repo_git character varying NOT NULL, + repo_path character varying DEFAULT 'NULL'::character varying, + repo_name character varying DEFAULT 'NULL'::character varying, + repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + repo_type character varying DEFAULT ''::character varying, + url character varying, + owner_id integer, + description character varying, + primary_language character varying, + created_at character varying, + forked_from character varying, + updated_at timestamp(0) without time zone, + repo_archived_date_collected timestamp(0) with time zone, + repo_archived integer, tool_source character varying, tool_version character varying, data_source character varying, @@ -1007,27 +986,134 @@ CREATE TABLE augur_data.dm_repo_weekly ( ); -ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; +ALTER TABLE augur_data.repo OWNER TO augur; -- --- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.exclude ( - id integer NOT NULL, - projects_id integer NOT NULL, - email character varying DEFAULT 'NULL'::character varying, - domain character varying DEFAULT 'NULL'::character varying -); +COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; -ALTER TABLE augur_data.exclude OWNER TO augur; +-- +-- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; + -- --- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: augur_new_contributors; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.augur_new_contributors AS + SELECT a.id AS cntrb_id, + a.created_at, + a.repo_id, + a.action, + repo.repo_name, + a.login, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT commits.cmt_ght_author_id AS id, + commits.cmt_author_timestamp AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_id)::text = (commits.cmt_ght_author_id)::text))) + GROUP BY commits.cmt_commit_hash, commits.cmt_ght_author_id, commits.repo_id, commits.cmt_author_timestamp, 'commit'::text, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + WHERE (issues.pull_request IS NULL) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests.pr_merged_at IS NULL) AND ((pull_request_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_merged'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND ((pull_request_events.action)::text = 'merged'::text)) + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + (augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND ((issue_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_reviews.cntrb_id AS id, + pull_request_reviews.pr_review_submitted_at AS created_at, + pull_requests.repo_id, + ('pull_request_review_'::text || (pull_request_reviews.pr_review_state)::text) AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_reviews + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_reviews.cntrb_id))) + WHERE (pull_requests.pull_request_id = pull_request_reviews.pull_request_id) + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'pull_request_open'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.closed_at <> message.msg_timestamp))) a, + augur_data.repo + WHERE (a.repo_id = repo.repo_id) + ORDER BY a.created_at DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.augur_new_contributors OWNER TO augur; + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq +CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1035,47 +1121,89 @@ CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq CACHE 1; -ALTER TABLE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; -- --- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_assignees ( - issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - issue_assignee_src_id bigint, - issue_assignee_src_node character varying, +CREATE TABLE augur_data.chaoss_metric_status ( + cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, + cm_group character varying, + cm_source character varying, + cm_type character varying, + cm_backend_status character varying, + cm_frontend_status character varying, + cm_defined boolean, + cm_api_endpoint_repo character varying, + cm_api_endpoint_rg character varying, + cm_name character varying, + cm_working_group character varying, + cm_info json, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + cm_working_group_focus_area character varying ); -ALTER TABLE augur_data.issue_assignees OWNER TO augur; +ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; -- --- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; +COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; -- --- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; +CREATE TABLE augur_data.chaoss_user ( + chaoss_id bigint NOT NULL, + chaoss_login_name character varying, + chaoss_login_hashword character varying, + chaoss_email character varying, + chaoss_text_phone character varying, + chaoss_first_name character varying, + chaoss_last_name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT now() +); +ALTER TABLE augur_data.chaoss_user OWNER TO augur; + -- --- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_events_event_id_seq +CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1083,52 +1211,52 @@ CREATE SEQUENCE augur_data.issue_events_event_id_seq CACHE 1; -ALTER TABLE augur_data.issue_events_event_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; -- --- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_events ( - event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, - issue_id bigint NOT NULL, +CREATE TABLE augur_data.commit_comment_ref ( + cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, + cmt_id bigint NOT NULL, repo_id bigint, - action character varying NOT NULL, - action_commit_hash character varying, + msg_id bigint NOT NULL, + user_id bigint NOT NULL, + body text, + line bigint, + "position" bigint, + commit_comment_src_node_id character varying, + cmt_comment_src_id bigint NOT NULL, created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - node_id character varying, - node_url character varying, - platform_id bigint NOT NULL, - issue_event_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.issue_events OWNER TO augur; +ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; -- --- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; +COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; -- --- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; +COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; -- --- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq +CREATE SEQUENCE augur_data.commit_parents_parent_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1136,21 +1264,15 @@ CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq CACHE 1; -ALTER TABLE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commit_parents_parent_id_seq OWNER TO augur; -- --- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_labels ( - issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - label_text character varying, - label_description character varying, - label_color character varying, - label_src_id bigint, - label_src_node_id character varying, +CREATE TABLE augur_data.commit_parents ( + cmt_id bigint NOT NULL, + parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, @@ -1158,20 +1280,13 @@ CREATE TABLE augur_data.issue_labels ( ); -ALTER TABLE augur_data.issue_labels OWNER TO augur; - --- --- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; - +ALTER TABLE augur_data.commit_parents OWNER TO augur; -- --- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq +CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1179,19 +1294,19 @@ CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq CACHE 1; -ALTER TABLE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; -- --- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_message_ref ( - issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - msg_id bigint, - issue_msg_ref_src_node_id character varying, - issue_msg_ref_src_comment_id bigint, +CREATE TABLE augur_data.contributor_affiliations ( + ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, + ca_domain character varying(64) NOT NULL, + ca_start_date date DEFAULT '1970-01-01'::date, + ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + ca_affiliation character varying, + ca_active smallint DEFAULT 1, tool_source character varying, tool_version character varying, data_source character varying, @@ -1199,138 +1314,143 @@ CREATE TABLE augur_data.issue_message_ref ( ); -ALTER TABLE augur_data.issue_message_ref OWNER TO augur; - --- --- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; - +ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; -- --- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; +COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; -- --- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_seq - START WITH 31000 +CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.issue_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; -- --- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issues ( - issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, - repo_id bigint, - pull_request bigint, - pull_request_id bigint, +CREATE TABLE augur_data.contributor_repo ( + cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, + repo_git character varying NOT NULL, + repo_name character varying NOT NULL, + gh_repo_id bigint NOT NULL, + cntrb_category character varying, + event_id bigint, created_at timestamp(0) without time zone, - issue_title character varying, - issue_body character varying, - comment_count bigint, - updated_at timestamp(0) without time zone, - closed_at timestamp(0) without time zone, - due_on timestamp(0) without time zone, - repository_url character varying, - issue_url character varying, - labels_url character varying, - comments_url character varying, - events_url character varying, - html_url character varying, - issue_state character varying, - issue_node_id character varying, - gh_issue_number bigint, - gh_issue_id bigint, - gh_user_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - reporter_id uuid, - cntrb_id uuid + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.issues OWNER TO augur; +ALTER TABLE augur_data.contributor_repo OWNER TO augur; -- --- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; +COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. +From: [ + { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + } +] +'; -- --- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; +COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; -- --- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.libraries_library_id_seq - START WITH 25430 +COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.libraries_library_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; -- --- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.libraries ( - library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, - repo_id bigint, - platform character varying, - name character varying, - created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - library_description character varying(2000) DEFAULT NULL::character varying, - keywords character varying, - library_homepage character varying(1000) DEFAULT NULL::character varying, - license character varying, - version_count integer, - latest_release_timestamp character varying, - latest_release_number character varying, - package_manager_id character varying, - dependency_count integer, - dependent_library_count integer, - primary_language character varying, +CREATE TABLE augur_data.contributors_aliases ( + cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, + canonical_email character varying NOT NULL, + alias_email character varying NOT NULL, + cntrb_active smallint DEFAULT 1 NOT NULL, + cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.libraries OWNER TO augur; +ALTER TABLE augur_data.contributors_aliases OWNER TO augur; -- --- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq +COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. + +The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1338,33 +1458,27 @@ CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq CACHE 1; -ALTER TABLE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; -- --- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.library_dependencies ( - lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, - library_id bigint, - manifest_platform character varying, - manifest_filepath character varying(1000) DEFAULT NULL::character varying, - manifest_kind character varying, - repo_id_branch character varying NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); +CREATE SEQUENCE augur_data.contributors_cntrb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -ALTER TABLE augur_data.library_dependencies OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_cntrb_id_seq OWNER TO augur; -- --- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.library_version_library_version_id_seq +CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1372,32 +1486,28 @@ CREATE SEQUENCE augur_data.library_version_library_version_id_seq CACHE 1; -ALTER TABLE augur_data.library_version_library_version_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; -- --- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dei_badging; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.library_version ( - library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, - library_id bigint, - library_platform character varying, - version_number character varying, - version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone +CREATE TABLE augur_data.dei_badging ( + id integer NOT NULL, + badging_id integer NOT NULL, + level character varying NOT NULL, + repo_id bigint NOT NULL ); -ALTER TABLE augur_data.library_version OWNER TO augur; +ALTER TABLE augur_data.dei_badging OWNER TO augur; -- --- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: dei_badging_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq +CREATE SEQUENCE augur_data.dei_badging_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1405,34 +1515,20 @@ CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq CACHE 1; -ALTER TABLE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.dei_badging_id_seq OWNER TO augur; -- --- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dei_badging_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.lstm_anomaly_models ( - model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, - model_name character varying, - model_description character varying, - look_back_days bigint, - training_days bigint, - batch_size bigint, - metric character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP -); - +ALTER SEQUENCE augur_data.dei_badging_id_seq OWNED BY augur_data.dei_badging.id; -ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; -- --- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1440,112 +1536,131 @@ CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq CACHE 1; -ALTER TABLE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; -- --- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.lstm_anomaly_results ( - result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, - repo_id bigint, - repo_category character varying, - model_id bigint, - metric character varying, - contamination_factor double precision, - mean_absolute_error double precision, - remarks character varying, - metric_field character varying, - mean_absolute_actual_value double precision, - mean_absolute_prediction_value double precision, +CREATE TABLE augur_data.discourse_insights ( + msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, + msg_id bigint, + discourse_act character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; +ALTER TABLE augur_data.discourse_insights OWNER TO augur; -- --- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; +COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; -- --- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_msg_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.message_msg_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; -- --- Name: message; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message ( - msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, - rgls_id bigint, - platform_msg_id bigint, - platform_node_id character varying, - repo_id bigint, - msg_text character varying, - msg_timestamp timestamp(0) without time zone, - msg_sender_email character varying, - msg_header character varying, - pltfrm_id bigint NOT NULL, +CREATE TABLE augur_data.dm_repo_annual ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.message OWNER TO augur; +ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; -- --- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; +CREATE TABLE augur_data.dm_repo_group_annual ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + +ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; -- --- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE TABLE augur_data.dm_repo_group_monthly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -ALTER TABLE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; +ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; -- --- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_analysis ( - msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, - msg_id bigint, - worker_run_id bigint, - sentiment_score double precision, - reconstruction_error double precision, - novelty_flag boolean, - feedback_flag boolean, +CREATE TABLE augur_data.dm_repo_group_weekly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, @@ -1553,111 +1668,474 @@ CREATE TABLE augur_data.message_analysis ( ); -ALTER TABLE augur_data.message_analysis OWNER TO augur; +ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; -- --- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; - - --- --- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur --- +CREATE TABLE augur_data.dm_repo_monthly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; +ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; -- --- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; +CREATE TABLE augur_data.dm_repo_weekly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); +ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; + -- --- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; - +CREATE TABLE augur_data.exclude ( + id integer NOT NULL, + projects_id integer NOT NULL, + email character varying DEFAULT 'NULL'::character varying, + domain character varying DEFAULT 'NULL'::character varying +); --- --- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- -COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; +ALTER TABLE augur_data.exclude OWNER TO augur; +-- +-- Name: explorer_commits_and_committers_daily_count; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count AS + SELECT repo.repo_id, + repo.repo_name, + commits.cmt_committer_date, + count(commits.cmt_id) AS num_of_commits, + count(DISTINCT commits.cmt_committer_raw_email) AS num_of_unique_committers + FROM (augur_data.commits + LEFT JOIN augur_data.repo ON ((repo.repo_id = commits.repo_id))) + GROUP BY repo.repo_id, repo.repo_name, commits.cmt_committer_date + ORDER BY repo.repo_id, commits.cmt_committer_date + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count OWNER TO augur; + +-- +-- Name: explorer_contributor_actions; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_contributor_actions AS + SELECT a.id AS cntrb_id, + a.created_at, + a.repo_id, + a.action, + repo.repo_name, + a.login, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT commits.cmt_ght_author_id AS id, + commits.cmt_author_timestamp AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_id)::text = (commits.cmt_ght_author_id)::text))) + GROUP BY commits.cmt_commit_hash, commits.cmt_ght_author_id, commits.repo_id, commits.cmt_author_timestamp, 'commit'::text, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + WHERE (issues.pull_request IS NULL) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests.pr_merged_at IS NULL) AND ((pull_request_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_merged'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND ((pull_request_events.action)::text = 'merged'::text)) + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + (augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND ((issue_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_reviews.cntrb_id AS id, + pull_request_reviews.pr_review_submitted_at AS created_at, + pull_requests.repo_id, + ('pull_request_review_'::text || (pull_request_reviews.pr_review_state)::text) AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_reviews + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_reviews.cntrb_id))) + WHERE (pull_requests.pull_request_id = pull_request_reviews.pull_request_id) + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'pull_request_open'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.closed_at <> message.msg_timestamp))) a, + augur_data.repo + WHERE (a.repo_id = repo.repo_id) + ORDER BY a.created_at DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_contributor_actions OWNER TO augur; -- --- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; -- --- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_analysis_summary ( - msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, - repo_id bigint, - worker_run_id bigint, - positive_ratio double precision, - negative_ratio double precision, - novel_count bigint, - period timestamp(0) without time zone, +CREATE TABLE augur_data.repo_groups ( + repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, + rg_name character varying NOT NULL, + rg_description character varying DEFAULT 'NULL'::character varying, + rg_website character varying(128) DEFAULT 'NULL'::character varying, + rg_recache smallint DEFAULT 1, + rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + rg_type character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; - --- --- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; - - --- --- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; - +ALTER TABLE augur_data.repo_groups OWNER TO augur; -- --- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; +COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; -- --- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; - +-- Name: explorer_entry_list; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_entry_list AS + SELECT DISTINCT r.repo_git, + r.repo_id, + r.repo_name, + rg.rg_name + FROM (augur_data.repo r + JOIN augur_data.repo_groups rg ON ((rg.repo_group_id = r.repo_group_id))) + ORDER BY rg.rg_name + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_entry_list OWNER TO augur; + +-- +-- Name: explorer_issue_assignments; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_issue_assignments AS + SELECT i.issue_id, + i.repo_id AS id, + i.created_at AS created, + i.closed_at AS closed, + ie.created_at AS assign_date, + ie.action AS assignment_action, + ie.cntrb_id AS assignee, + ie.node_id + FROM (augur_data.issues i + LEFT JOIN augur_data.issue_events ie ON (((i.issue_id = ie.issue_id) AND ((ie.action)::text = ANY (ARRAY[('unassigned'::character varying)::text, ('assigned'::character varying)::text]))))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_issue_assignments OWNER TO augur; + +-- +-- Name: explorer_new_contributors; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_new_contributors AS + SELECT cntrb_id, + created_at, + month, + year, + repo_id, + repo_name, + full_name, + login, + rank + FROM ( SELECT b.cntrb_id, + b.created_at, + b.month, + b.year, + b.repo_id, + b.repo_name, + b.full_name, + b.login, + b.action, + b.rank + FROM ( SELECT a.id AS cntrb_id, + a.created_at, + date_part('month'::text, (a.created_at)::date) AS month, + date_part('year'::text, (a.created_at)::date) AS year, + a.repo_id, + repo.repo_name, + a.full_name, + a.login, + a.action, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT canonical_full_names.canonical_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE (issues.pull_request IS NULL) + GROUP BY canonical_full_names.canonical_id, issues.repo_id, issues.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT canonical_full_names.canonical_id AS id, + to_timestamp((commits.cmt_author_date)::text, 'YYYY-MM-DD'::text) AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_canonical)::text = (commits.cmt_author_email)::text))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + GROUP BY commits.repo_id, canonical_full_names.canonical_email, canonical_full_names.canonical_id, commits.cmt_author_date, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT message.cntrb_id AS id, + commit_comment_ref.created_at, + commits.repo_id, + 'commit_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.commit_comment_ref, + augur_data.commits, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((commits.cmt_id = commit_comment_ref.cmt_id) AND (commit_comment_ref.msg_id = message.msg_id)) + GROUP BY message.cntrb_id, commits.repo_id, commit_comment_ref.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.issues, + ((augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND (issue_events.cntrb_id IS NOT NULL) AND ((issue_events.action)::text = 'closed'::text)) + GROUP BY issue_events.cntrb_id, issues.repo_id, issue_events.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'open_pull_request'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + GROUP BY pull_requests.pr_augur_contributor_id, pull_requests.repo_id, pull_requests.pr_created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + GROUP BY message.cntrb_id, pull_requests.repo_id, message.msg_timestamp, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.pull_request_id = NULL::bigint)) + GROUP BY issues.reporter_id, issues.repo_id, message.msg_timestamp, contributors.cntrb_full_name, contributors.cntrb_login) a, + augur_data.repo + WHERE ((a.id IS NOT NULL) AND (a.repo_id = repo.repo_id)) + GROUP BY a.id, a.repo_id, a.action, a.created_at, repo.repo_name, a.full_name, a.login + ORDER BY a.id) b + WHERE (b.rank = ANY (ARRAY[(1)::bigint, (2)::bigint, (3)::bigint, (4)::bigint, (5)::bigint, (6)::bigint, (7)::bigint]))) x + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_new_contributors OWNER TO augur; + +-- +-- Name: explorer_pr_assignments; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_assignments AS + SELECT pr.pull_request_id, + pr.repo_id AS id, + pr.pr_created_at AS created, + pr.pr_closed_at AS closed, + pre.created_at AS assign_date, + pre.action AS assignment_action, + pre.cntrb_id AS assignee, + pre.node_id + FROM (augur_data.pull_requests pr + LEFT JOIN augur_data.pull_request_events pre ON (((pr.pull_request_id = pre.pull_request_id) AND ((pre.action)::text = ANY (ARRAY[('unassigned'::character varying)::text, ('assigned'::character varying)::text]))))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_assignments OWNER TO augur; -- --- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq +CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1665,20 +2143,37 @@ CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq CACHE 1; -ALTER TABLE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; -- --- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_sentiment ( - msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, - msg_id bigint, - worker_run_id bigint, - sentiment_score double precision, - reconstruction_error double precision, - novelty_flag boolean, - feedback_flag boolean, +CREATE TABLE augur_data.pull_request_review_message_ref ( + pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, + pr_review_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + pr_review_msg_url character varying, + pr_review_src_id bigint, + pr_review_msg_src_id bigint, + pr_review_msg_node_id character varying, + pr_review_msg_diff_hunk character varying, + pr_review_msg_path character varying, + pr_review_msg_position bigint, + pr_review_msg_original_position bigint, + pr_review_msg_commit_id character varying, + pr_review_msg_original_commit_id character varying, + pr_review_msg_updated_at timestamp(6) without time zone, + pr_review_msg_html_url character varying, + pr_url character varying, + pr_review_msg_author_association character varying, + pr_review_msg_start_line bigint, + pr_review_msg_original_start_line bigint, + pr_review_msg_start_side character varying, + pr_review_msg_line bigint, + pr_review_msg_original_line bigint, + pr_review_msg_side character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -1686,237 +2181,55 @@ CREATE TABLE augur_data.message_sentiment ( ); -ALTER TABLE augur_data.message_sentiment OWNER TO augur; +ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; -- --- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: explorer_pr_response; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_response AS + SELECT pr.pull_request_id, + pr.repo_id AS id, + pr.pr_augur_contributor_id AS cntrb_id, + m.msg_timestamp, + m.msg_cntrb_id, + pr.pr_created_at, + pr.pr_closed_at + FROM (augur_data.pull_requests pr + LEFT JOIN ( SELECT prr.pull_request_id, + m_1.msg_timestamp, + m_1.cntrb_id AS msg_cntrb_id + FROM augur_data.pull_request_review_message_ref prrmr, + augur_data.pull_requests pr_1, + augur_data.message m_1, + augur_data.pull_request_reviews prr + WHERE ((prrmr.pr_review_id = prr.pr_review_id) AND (prrmr.msg_id = m_1.msg_id) AND (prr.pull_request_id = pr_1.pull_request_id)) + UNION + SELECT prmr.pull_request_id, + m_1.msg_timestamp, + m_1.cntrb_id AS msg_cntrb_id + FROM augur_data.pull_request_message_ref prmr, + augur_data.pull_requests pr_1, + augur_data.message m_1 + WHERE ((prmr.pull_request_id = pr_1.pull_request_id) AND (prmr.msg_id = m_1.msg_id))) m ON ((m.pull_request_id = pr.pull_request_id))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_response OWNER TO augur; + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; +CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + - --- --- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; - - --- --- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; - - --- --- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; - - --- --- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; - - --- --- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; - --- --- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.message_sentiment_summary ( - msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, - repo_id bigint, - worker_run_id bigint, - positive_ratio double precision, - negative_ratio double precision, - novel_count bigint, - period timestamp(0) without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; - --- --- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; - - --- --- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; - - --- --- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; - - --- --- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; - - --- --- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.platform_pltfrm_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.platform_pltfrm_id_seq OWNER TO augur; - --- --- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.platform ( - pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, - pltfrm_name character varying, - pltfrm_version character varying, - pltfrm_release_date date, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.platform OWNER TO augur; - --- --- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; - --- --- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_analysis ( - pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - merge_probability numeric(256,250), - mechanism character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL -); - - -ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; - --- --- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; - - --- --- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; - - --- --- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; - - --- --- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; - --- --- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_assignees ( - pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_assignee_src_id bigint, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - contrib_id uuid -); - - -ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; - --- --- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; -- -- Name: pull_request_commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -1961,10 +2274,10 @@ COMMENT ON COLUMN augur_data.pull_request_commits.pr_cmt_sha IS 'This is the com -- --- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq +CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1972,24 +2285,20 @@ CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq CACHE 1; -ALTER TABLE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; -- --- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_events ( - pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, - pull_request_id bigint NOT NULL, +CREATE TABLE augur_data.pull_request_meta ( + pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, + pull_request_id bigint, repo_id bigint, - action character varying NOT NULL, - action_commit_hash character varying, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - issue_event_src_id bigint, - node_id character varying, - node_url character varying, - platform_id bigint DEFAULT 25150 NOT NULL, - pr_platform_event_id bigint, + pr_head_or_base character varying, + pr_src_meta_label character varying, + pr_src_meta_ref character varying, + pr_sha character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -1998,191 +2307,24 @@ CREATE TABLE augur_data.pull_request_events ( ); -ALTER TABLE augur_data.pull_request_events OWNER TO augur; +ALTER TABLE augur_data.pull_request_meta OWNER TO augur; -- --- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; +COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; -- --- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; +COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; -- --- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq - START WITH 25150 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; - --- --- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_files ( - pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_file_additions bigint, - pr_file_deletions bigint, - pr_file_path character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_files OWNER TO augur; - --- --- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. -Not all pull requests are from a branch or fork into master. -The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). -Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. -In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; - - --- --- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; - --- --- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_labels ( - pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_src_id bigint, - pr_src_node_id character varying, - pr_src_url character varying, - pr_src_description character varying, - pr_src_color character varying, - pr_src_default_bool boolean, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_labels OWNER TO augur; - --- --- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; - --- --- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_message_ref ( - pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - msg_id bigint, - pr_message_ref_src_comment_id bigint, - pr_message_ref_src_node_id character varying, - pr_issue_url character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; - --- --- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; - --- --- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_meta ( - pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_head_or_base character varying, - pr_src_meta_label character varying, - pr_src_meta_ref character varying, - pr_sha character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid -); - - -ALTER TABLE augur_data.pull_request_meta OWNER TO augur; - --- --- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; - - --- --- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; - - --- --- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur -- COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a representation of the repo:branch information in the pull request. Head is issueing the pull request and base is taking the pull request. For example: (We do not store all of this) @@ -2366,10 +2508,115 @@ COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a r -- --- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: explorer_pr_response_times; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_response_times AS + SELECT repo.repo_id, + pull_requests.pr_src_id, + repo.repo_name, + pull_requests.pr_src_author_association, + repo_groups.rg_name AS repo_group, + pull_requests.pr_src_state, + pull_requests.pr_merged_at, + pull_requests.pr_created_at, + pull_requests.pr_closed_at, + date_part('year'::text, (pull_requests.pr_created_at)::date) AS created_year, + date_part('month'::text, (pull_requests.pr_created_at)::date) AS created_month, + date_part('year'::text, (pull_requests.pr_closed_at)::date) AS closed_year, + date_part('month'::text, (pull_requests.pr_closed_at)::date) AS closed_month, + base_labels.pr_src_meta_label, + base_labels.pr_head_or_base, + ((EXTRACT(epoch FROM pull_requests.pr_closed_at) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_close, + ((EXTRACT(epoch FROM pull_requests.pr_closed_at) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_close, + ((EXTRACT(epoch FROM response_times.first_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_first_response, + ((EXTRACT(epoch FROM response_times.first_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_first_response, + ((EXTRACT(epoch FROM response_times.last_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_last_response, + ((EXTRACT(epoch FROM response_times.last_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_last_response, + response_times.first_response_time, + response_times.last_response_time, + response_times.average_time_between_responses, + response_times.assigned_count, + response_times.review_requested_count, + response_times.labeled_count, + response_times.subscribed_count, + response_times.mentioned_count, + response_times.referenced_count, + response_times.closed_count, + response_times.head_ref_force_pushed_count, + response_times.merged_count, + response_times.milestoned_count, + response_times.unlabeled_count, + response_times.head_ref_deleted_count, + response_times.comment_count, + master_merged_counts.lines_added, + master_merged_counts.lines_removed, + all_commit_counts.commit_count, + master_merged_counts.file_count + FROM augur_data.repo, + augur_data.repo_groups, + ((((augur_data.pull_requests + LEFT JOIN ( SELECT pull_requests_1.pull_request_id, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'assigned'::text)) AS assigned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'review_requested'::text)) AS review_requested_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'labeled'::text)) AS labeled_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'unlabeled'::text)) AS unlabeled_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'subscribed'::text)) AS subscribed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'mentioned'::text)) AS mentioned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'referenced'::text)) AS referenced_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'closed'::text)) AS closed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'head_ref_force_pushed'::text)) AS head_ref_force_pushed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'head_ref_deleted'::text)) AS head_ref_deleted_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'milestoned'::text)) AS milestoned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'merged'::text)) AS merged_count, + min(message.msg_timestamp) AS first_response_time, + count(DISTINCT message.msg_timestamp) AS comment_count, + max(message.msg_timestamp) AS last_response_time, + ((max(message.msg_timestamp) - min(message.msg_timestamp)) / (count(DISTINCT message.msg_timestamp))::double precision) AS average_time_between_responses + FROM augur_data.pull_request_events, + augur_data.pull_requests pull_requests_1, + augur_data.repo repo_1, + augur_data.pull_request_message_ref, + augur_data.message + WHERE ((repo_1.repo_id = pull_requests_1.repo_id) AND (pull_requests_1.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_message_ref.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + GROUP BY pull_requests_1.pull_request_id) response_times ON ((pull_requests.pull_request_id = response_times.pull_request_id))) + LEFT JOIN ( SELECT pull_request_commits.pull_request_id, + count(DISTINCT pull_request_commits.pr_cmt_sha) AS commit_count + FROM augur_data.pull_request_commits, + augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE ((pull_requests_1.pull_request_id = pull_request_commits.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND ((pull_request_commits.pr_cmt_sha)::text <> (pull_requests_1.pr_merge_commit_sha)::text) AND ((pull_request_commits.pr_cmt_sha)::text <> (pull_request_meta.pr_sha)::text)) + GROUP BY pull_request_commits.pull_request_id) all_commit_counts ON ((pull_requests.pull_request_id = all_commit_counts.pull_request_id))) + LEFT JOIN ( SELECT max(pull_request_meta.pr_repo_meta_id) AS max, + pull_request_meta.pull_request_id, + pull_request_meta.pr_head_or_base, + pull_request_meta.pr_src_meta_label + FROM augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE ((pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND ((pull_request_meta.pr_head_or_base)::text = 'base'::text)) + GROUP BY pull_request_meta.pull_request_id, pull_request_meta.pr_head_or_base, pull_request_meta.pr_src_meta_label) base_labels ON ((base_labels.pull_request_id = all_commit_counts.pull_request_id))) + LEFT JOIN ( SELECT sum(commits.cmt_added) AS lines_added, + sum(commits.cmt_removed) AS lines_removed, + pull_request_commits.pull_request_id, + count(DISTINCT commits.cmt_filename) AS file_count + FROM augur_data.pull_request_commits, + augur_data.commits, + augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE (((commits.cmt_commit_hash)::text = (pull_request_commits.pr_cmt_sha)::text) AND (pull_requests_1.pull_request_id = pull_request_commits.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND (commits.repo_id = pull_requests_1.repo_id) AND ((commits.cmt_commit_hash)::text <> (pull_requests_1.pr_merge_commit_sha)::text) AND ((commits.cmt_commit_hash)::text <> (pull_request_meta.pr_sha)::text)) + GROUP BY pull_request_commits.pull_request_id) master_merged_counts ON ((base_labels.pull_request_id = master_merged_counts.pull_request_id))) + WHERE ((repo.repo_group_id = repo_groups.repo_group_id) AND (repo.repo_id = pull_requests.repo_id)) + ORDER BY response_times.merged_count DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_response_times OWNER TO augur; + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq +CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -2377,219 +2624,843 @@ CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq CACHE 1; -ALTER TABLE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; -- --- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_repo ( - pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, - pr_repo_meta_id bigint, - pr_repo_head_or_base character varying, - pr_src_repo_id bigint, - pr_src_node_id character varying, - pr_repo_name character varying, - pr_repo_full_name character varying, - pr_repo_private_bool boolean, +CREATE TABLE augur_data.repo_labor ( + repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_clone_date timestamp(0) without time zone, + rl_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + total_lines integer, + code_lines integer, + comment_lines integer, + blank_lines integer, + code_complexity integer, + repo_url character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - pr_cntrb_id uuid + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.pull_request_repo OWNER TO augur; +ALTER TABLE augur_data.repo_labor OWNER TO augur; -- --- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; +COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; -- --- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; +COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; -- --- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: explorer_repo_languages; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE MATERIALIZED VIEW augur_data.explorer_repo_languages AS + SELECT e.repo_id, + repo.repo_git, + repo.repo_name, + e.programming_language, + e.code_lines, + e.files + FROM augur_data.repo, + ( SELECT d.repo_id, + d.programming_language, + sum(d.code_lines) AS code_lines, + (count(*))::integer AS files + FROM ( SELECT repo_labor.repo_id, + repo_labor.programming_language, + repo_labor.code_lines + FROM augur_data.repo_labor, + ( SELECT repo_labor_1.repo_id, + max(repo_labor_1.data_collection_date) AS last_collected + FROM augur_data.repo_labor repo_labor_1 + GROUP BY repo_labor_1.repo_id) recent + WHERE ((repo_labor.repo_id = recent.repo_id) AND (repo_labor.data_collection_date > (recent.last_collected - ((5)::double precision * '00:01:00'::interval))))) d + GROUP BY d.repo_id, d.programming_language) e + WHERE (repo.repo_id = e.repo_id) + ORDER BY e.repo_id + WITH NO DATA; -ALTER TABLE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.explorer_repo_languages OWNER TO augur; -- --- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: user_groups; Type: TABLE; Schema: augur_operations; Owner: augur -- -CREATE TABLE augur_data.pull_request_review_message_ref ( - pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, - pr_review_id bigint NOT NULL, - repo_id bigint, - msg_id bigint NOT NULL, - pr_review_msg_url character varying, - pr_review_src_id bigint, - pr_review_msg_src_id bigint, - pr_review_msg_node_id character varying, - pr_review_msg_diff_hunk character varying, - pr_review_msg_path character varying, - pr_review_msg_position bigint, - pr_review_msg_original_position bigint, - pr_review_msg_commit_id character varying, - pr_review_msg_original_commit_id character varying, - pr_review_msg_updated_at timestamp(6) without time zone, - pr_review_msg_html_url character varying, - pr_url character varying, - pr_review_msg_author_association character varying, - pr_review_msg_start_line bigint, - pr_review_msg_original_start_line bigint, - pr_review_msg_start_side character varying, - pr_review_msg_line bigint, - pr_review_msg_original_line bigint, - pr_review_msg_side character varying, +CREATE TABLE augur_operations.user_groups ( + group_id bigint NOT NULL, + user_id integer NOT NULL, + name character varying NOT NULL, + favorited boolean DEFAULT false NOT NULL +); + + +ALTER TABLE augur_operations.user_groups OWNER TO augur; + +-- +-- Name: user_repos; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.user_repos ( + repo_id bigint NOT NULL, + group_id bigint NOT NULL +); + + +ALTER TABLE augur_operations.user_repos OWNER TO augur; + +-- +-- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.users ( + user_id integer NOT NULL, + login_name character varying NOT NULL, + login_hashword character varying NOT NULL, + email character varying NOT NULL, + text_phone character varying, + first_name character varying NOT NULL, + last_name character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + admin boolean NOT NULL, + email_verified boolean DEFAULT false NOT NULL +); + + +ALTER TABLE augur_operations.users OWNER TO augur; + +-- +-- Name: explorer_user_repos; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_user_repos AS + SELECT a.login_name, + a.user_id, + b.group_id, + c.repo_id + FROM augur_operations.users a, + augur_operations.user_groups b, + augur_operations.user_repos c + WHERE ((a.user_id = b.user_id) AND (b.group_id = c.group_id)) + ORDER BY a.user_id + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_user_repos OWNER TO augur; + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; + +-- +-- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_assignees ( + issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + issue_assignee_src_id bigint, + issue_assignee_src_node character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_assignees OWNER TO augur; + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; + +-- +-- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_labels ( + issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + label_text character varying, + label_description character varying, + label_color character varying, + label_src_id bigint, + label_src_node_id character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_labels OWNER TO augur; + +-- +-- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.libraries_library_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.libraries_library_id_seq OWNER TO augur; + +-- +-- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.libraries ( + library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, + repo_id bigint, + platform character varying, + name character varying, + created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + library_description character varying(2000) DEFAULT NULL::character varying, + keywords character varying, + library_homepage character varying(1000) DEFAULT NULL::character varying, + license character varying, + version_count integer, + latest_release_timestamp character varying, + latest_release_number character varying, + package_manager_id character varying, + dependency_count integer, + dependent_library_count integer, + primary_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.libraries OWNER TO augur; + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; + +-- +-- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_dependencies ( + lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, + library_id bigint, + manifest_platform character varying, + manifest_filepath character varying(1000) DEFAULT NULL::character varying, + manifest_kind character varying, + repo_id_branch character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_dependencies OWNER TO augur; + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_version_library_version_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.library_version_library_version_id_seq OWNER TO augur; + +-- +-- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_version ( + library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, + library_id bigint, + library_platform character varying, + version_number character varying, + version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_version OWNER TO augur; + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_models ( + model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, + model_name character varying, + model_description character varying, + look_back_days bigint, + training_days bigint, + batch_size bigint, + metric character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_results ( + result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_category character varying, + model_id bigint, + metric character varying, + contamination_factor double precision, + mean_absolute_error double precision, + remarks character varying, + metric_field character varying, + mean_absolute_actual_value double precision, + mean_absolute_prediction_value double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; + +-- +-- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis OWNER TO augur; + +-- +-- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; + +-- +-- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment OWNER TO augur; + +-- +-- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; + +-- +-- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.platform_pltfrm_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.platform_pltfrm_id_seq OWNER TO augur; + +-- +-- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.platform ( + pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, + pltfrm_name character varying, + pltfrm_version character varying, + pltfrm_release_date date, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; +ALTER TABLE augur_data.platform OWNER TO augur; -- --- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; -- --- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_reviewers ( - pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, +CREATE TABLE augur_data.pull_request_analysis ( + pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, pull_request_id bigint, - pr_source_id bigint, - repo_id bigint, - pr_reviewer_src_id bigint, + merge_probability numeric(256,250), + mechanism character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL ); -ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; +ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; -- --- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; +COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; -- --- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; +COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; -- --- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq - START WITH 1 +COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; -- --- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_reviews ( - pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, - pull_request_id bigint NOT NULL, +CREATE TABLE augur_data.pull_request_assignees ( + pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, repo_id bigint, - pr_review_author_association character varying, - pr_review_state character varying, - pr_review_body character varying, - pr_review_submitted_at timestamp(6) without time zone, - pr_review_src_id bigint, - pr_review_node_id character varying, - pr_review_html_url character varying, - pr_review_pull_request_url character varying, - pr_review_commit_id character varying, - platform_id bigint DEFAULT 25150, + pr_assignee_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL + contrib_id uuid ); -ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; +ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; -- --- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq + START WITH 25150 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; -- --- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_teams ( - pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, +CREATE TABLE augur_data.pull_request_files ( + pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, pull_request_id bigint, - pr_src_team_id bigint, - pr_src_team_node character varying, - pr_src_team_url character varying, - pr_team_name character varying, - pr_team_slug character varying, - pr_team_description character varying, - pr_team_privacy character varying, - pr_team_permission character varying, - pr_team_src_members_url character varying, - pr_team_src_repositories_url character varying, - pr_team_parent_id bigint, + repo_id bigint, + pr_file_additions bigint, + pr_file_deletions bigint, + pr_file_path character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -2597,13 +3468,24 @@ CREATE TABLE augur_data.pull_request_teams ( ); -ALTER TABLE augur_data.pull_request_teams OWNER TO augur; +ALTER TABLE augur_data.pull_request_files OWNER TO augur; -- --- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq +COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -2611,114 +3493,171 @@ CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq CACHE 1; -ALTER TABLE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; -- --- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_requests ( - pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, - repo_id bigint DEFAULT 0, - pr_url character varying, +CREATE TABLE augur_data.pull_request_labels ( + pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, pr_src_id bigint, pr_src_node_id character varying, - pr_html_url character varying, - pr_diff_url character varying, - pr_patch_url character varying, - pr_issue_url character varying, - pr_augur_issue_id bigint, - pr_src_number bigint, - pr_src_state character varying, - pr_src_locked boolean, - pr_src_title character varying, - pr_body text, - pr_created_at timestamp(0) without time zone, - pr_updated_at timestamp(0) without time zone, - pr_closed_at timestamp(0) without time zone, - pr_merged_at timestamp(0) without time zone, - pr_merge_commit_sha character varying, - pr_teams bigint, - pr_milestone character varying, - pr_commits_url character varying, - pr_review_comments_url character varying, - pr_review_comment_url character varying, - pr_comments_url character varying, - pr_statuses_url character varying, - pr_meta_head_id character varying, - pr_meta_base_id character varying, - pr_src_issue_url character varying, - pr_src_comments_url character varying, - pr_src_review_comments_url character varying, - pr_src_commits_url character varying, - pr_src_statuses_url character varying, - pr_src_author_association character varying, + pr_src_url character varying, + pr_src_description character varying, + pr_src_color character varying, + pr_src_default_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_labels OWNER TO augur; + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; + +-- +-- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_repo ( + pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, + pr_repo_meta_id bigint, + pr_repo_head_or_base character varying, + pr_src_repo_id bigint, + pr_src_node_id character varying, + pr_repo_name character varying, + pr_repo_full_name character varying, + pr_repo_private_bool boolean, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - pr_augur_contributor_id uuid + pr_cntrb_id uuid ); -ALTER TABLE augur_data.pull_requests OWNER TO augur; +ALTER TABLE augur_data.pull_request_repo OWNER TO augur; -- --- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; +COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; -- --- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; +COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; -- --- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; +CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; + -- --- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; +CREATE TABLE augur_data.pull_request_reviewers ( + pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_source_id bigint, + repo_id bigint, + pr_reviewer_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); +ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; + -- --- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; -- --- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; -- --- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; +CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; -- --- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; +CREATE TABLE augur_data.pull_request_teams ( + pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_src_team_id bigint, + pr_src_team_node character varying, + pr_src_team_url character varying, + pr_team_name character varying, + pr_team_slug character varying, + pr_team_description character varying, + pr_team_privacy character varying, + pr_team_permission character varying, + pr_team_src_members_url character varying, + pr_team_src_repositories_url character varying, + pr_team_parent_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); +ALTER TABLE augur_data.pull_request_teams OWNER TO augur; + -- -- Name: releases_release_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -2731,14 +3670,14 @@ CREATE SEQUENCE augur_data.releases_release_id_seq CACHE 1; -ALTER TABLE augur_data.releases_release_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.releases_release_id_seq OWNER TO augur; -- -- Name: releases; Type: TABLE; Schema: augur_data; Owner: augur -- CREATE TABLE augur_data.releases ( - release_id character(64) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, + release_id character(256) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, repo_id bigint NOT NULL, release_name character varying, release_description character varying, @@ -2761,104 +3700,74 @@ CREATE TABLE augur_data.releases ( ALTER TABLE augur_data.releases OWNER TO augur; -- --- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.repo_repo_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq + START WITH 25012 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.repo_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; -- --- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.repo ( - repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, - repo_group_id bigint NOT NULL, - repo_git character varying NOT NULL, - repo_path character varying DEFAULT 'NULL'::character varying, - repo_name character varying DEFAULT 'NULL'::character varying, - repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - repo_status character varying DEFAULT 'New'::character varying NOT NULL, - repo_type character varying DEFAULT ''::character varying, - url character varying, - owner_id integer, - description character varying, - primary_language character varying, - created_at character varying, - forked_from character varying, - updated_at timestamp(0) without time zone, - repo_archived_date_collected timestamp(0) with time zone, - repo_archived integer, +CREATE TABLE augur_data.repo_badging ( + badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, + repo_id bigint, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + data jsonb ); -ALTER TABLE augur_data.repo OWNER TO augur; - --- --- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; - +ALTER TABLE augur_data.repo_badging OWNER TO augur; -- --- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; +COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API +https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur +'; -- --- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_clones_data_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq - START WITH 25012 +CREATE SEQUENCE augur_data.repo_clones_data_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_clones_data_id_seq OWNER TO augur; -- --- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_clones_data; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.repo_badging ( - badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, - repo_id bigint, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - data jsonb +CREATE TABLE augur_data.repo_clones_data ( + repo_clone_data_id bigint DEFAULT nextval('augur_data.repo_clones_data_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + unique_clones bigint, + count_clones bigint, + clone_data_timestamp timestamp(6) without time zone ); -ALTER TABLE augur_data.repo_badging OWNER TO augur; - --- --- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API -https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur -'; - +ALTER TABLE augur_data.repo_clones_data OWNER TO augur; -- -- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur @@ -2872,7 +3781,7 @@ CREATE SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq CACHE 1; -ALTER TABLE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; -- -- Name: repo_cluster_messages; Type: TABLE; Schema: augur_data; Owner: augur @@ -2904,7 +3813,7 @@ CREATE SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq CACHE 1; -ALTER TABLE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; -- -- Name: repo_dependencies; Type: TABLE; Schema: augur_data; Owner: augur @@ -2972,7 +3881,7 @@ CREATE SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq CACHE 1; -ALTER TABLE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; -- -- Name: repo_deps_libyear; Type: TABLE; Schema: augur_data; Owner: augur @@ -3011,7 +3920,7 @@ CREATE SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 CACHE 1; -ALTER TABLE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; -- -- Name: repo_deps_scorecard; Type: TABLE; Schema: augur_data; Owner: augur @@ -3021,12 +3930,12 @@ CREATE TABLE augur_data.repo_deps_scorecard ( repo_deps_scorecard_id bigint DEFAULT nextval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1'::regclass) NOT NULL, repo_id bigint, name character varying, - status character varying, score character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + scorecard_check_details jsonb ); @@ -3044,7 +3953,7 @@ CREATE SEQUENCE augur_data.repo_group_insights_rgi_id_seq CACHE 1; -ALTER TABLE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; -- -- Name: repo_group_insights; Type: TABLE; Schema: augur_data; Owner: augur @@ -3082,48 +3991,6 @@ Worker Design Notes: The idea is that the "insight worker" will scan through a b COMMENT ON COLUMN augur_data.repo_group_insights.rgi_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; --- --- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; - --- --- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.repo_groups ( - repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, - rg_name character varying NOT NULL, - rg_description character varying DEFAULT 'NULL'::character varying, - rg_website character varying(128) DEFAULT 'NULL'::character varying, - rg_recache smallint DEFAULT 1, - rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - rg_type character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.repo_groups OWNER TO augur; - --- --- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; - - -- -- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -3136,7 +4003,7 @@ CREATE SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq CACHE 1; -ALTER TABLE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; -- -- Name: repo_groups_list_serve; Type: TABLE; Schema: augur_data; Owner: augur @@ -3170,7 +4037,7 @@ CREATE SEQUENCE augur_data.repo_info_repo_info_id_seq CACHE 1; -ALTER TABLE augur_data.repo_info_repo_info_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_info_repo_info_id_seq OWNER TO augur; -- -- Name: repo_info; Type: TABLE; Schema: augur_data; Owner: augur @@ -3229,7 +4096,7 @@ CREATE SEQUENCE augur_data.repo_insights_ri_id_seq CACHE 1; -ALTER TABLE augur_data.repo_insights_ri_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_insights_ri_id_seq OWNER TO augur; -- -- Name: repo_insights; Type: TABLE; Schema: augur_data; Owner: augur @@ -3282,7 +4149,7 @@ CREATE SEQUENCE augur_data.repo_insights_records_ri_id_seq CACHE 1; -ALTER TABLE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; -- -- Name: repo_insights_records; Type: TABLE; Schema: augur_data; Owner: augur @@ -3390,61 +4257,6 @@ COMMENT ON COLUMN augur_data.repo_insights_records.data_source IS 'Standard Augu COMMENT ON COLUMN augur_data.repo_insights_records.data_collection_date IS 'Standard Augur Metadata'; --- --- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; - --- --- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.repo_labor ( - repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, - repo_id bigint, - repo_clone_date timestamp(0) without time zone, - rl_analysis_date timestamp(0) without time zone, - programming_language character varying, - file_path character varying, - file_name character varying, - total_lines integer, - code_lines integer, - comment_lines integer, - blank_lines integer, - code_complexity integer, - repo_url character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.repo_labor OWNER TO augur; - --- --- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; - - --- --- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; - - -- -- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -3457,7 +4269,7 @@ CREATE SEQUENCE augur_data.repo_meta_rmeta_id_seq CACHE 1; -ALTER TABLE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; -- -- Name: repo_meta; Type: TABLE; Schema: augur_data; Owner: augur @@ -3496,7 +4308,7 @@ CREATE SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq CACHE 1; -ALTER TABLE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; -- -- Name: repo_sbom_scans; Type: TABLE; Schema: augur_data; Owner: augur @@ -3523,7 +4335,7 @@ CREATE SEQUENCE augur_data.repo_stats_rstat_id_seq CACHE 1; -ALTER TABLE augur_data.repo_stats_rstat_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_stats_rstat_id_seq OWNER TO augur; -- -- Name: repo_stats; Type: TABLE; Schema: augur_data; Owner: augur @@ -3562,7 +4374,7 @@ CREATE SEQUENCE augur_data.repo_test_coverage_repo_id_seq CACHE 1; -ALTER TABLE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; -- -- Name: repo_test_coverage; Type: TABLE; Schema: augur_data; Owner: augur @@ -3601,7 +4413,7 @@ CREATE SEQUENCE augur_data.repo_topic_repo_topic_id_seq CACHE 1; -ALTER TABLE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; -- -- Name: repo_topic; Type: TABLE; Schema: augur_data; Owner: augur @@ -3660,7 +4472,7 @@ CREATE SEQUENCE augur_data.topic_words_topic_words_id_seq CACHE 1; -ALTER TABLE augur_data.topic_words_topic_words_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.topic_words_topic_words_id_seq OWNER TO augur; -- -- Name: topic_words; Type: TABLE; Schema: augur_data; Owner: augur @@ -3711,7 +4523,7 @@ CREATE SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq CACHE 1; -ALTER TABLE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; -- -- Name: unresolved_commit_emails; Type: TABLE; Schema: augur_data; Owner: augur @@ -3742,7 +4554,7 @@ CREATE SEQUENCE augur_data.utility_log_id_seq1 CACHE 1; -ALTER TABLE augur_data.utility_log_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.utility_log_id_seq1 OWNER TO augur; -- -- Name: utility_log; Type: TABLE; Schema: augur_data; Owner: augur @@ -3770,7 +4582,7 @@ CREATE SEQUENCE augur_data.utility_log_id_seq CACHE 1; -ALTER TABLE augur_data.utility_log_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.utility_log_id_seq OWNER TO augur; -- -- Name: working_commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -3796,7 +4608,7 @@ CREATE SEQUENCE augur_operations.affiliations_corp_id_seq CACHE 1; -ALTER TABLE augur_operations.affiliations_corp_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.affiliations_corp_id_seq OWNER TO augur; -- -- Name: all; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3830,7 +4642,7 @@ CREATE SEQUENCE augur_operations.augur_settings_id_seq CACHE 1; -ALTER TABLE augur_operations.augur_settings_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.augur_settings_id_seq OWNER TO augur; -- -- Name: augur_settings; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3853,6 +4665,58 @@ ALTER TABLE augur_operations.augur_settings OWNER TO augur; COMMENT ON TABLE augur_operations.augur_settings IS 'Augur settings include the schema version, and the Augur API Key as of 10/25/2020. Future augur settings may be stored in this table, which has the basic structure of a name-value pair. '; +-- +-- Name: client_applications; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.client_applications ( + id character varying NOT NULL, + api_key character varying NOT NULL, + user_id integer NOT NULL, + name character varying NOT NULL, + redirect_url character varying NOT NULL +); + + +ALTER TABLE augur_operations.client_applications OWNER TO augur; + +-- +-- Name: collection_status; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.collection_status ( + repo_id bigint NOT NULL, + core_data_last_collected timestamp without time zone, + core_status character varying DEFAULT 'Pending'::character varying NOT NULL, + core_task_id character varying, + secondary_data_last_collected timestamp without time zone, + secondary_status character varying DEFAULT 'Pending'::character varying NOT NULL, + secondary_task_id character varying, + event_last_collected timestamp without time zone, + facade_status character varying DEFAULT 'Pending'::character varying NOT NULL, + facade_data_last_collected timestamp without time zone, + facade_task_id character varying, + core_weight bigint, + facade_weight bigint, + secondary_weight bigint, + issue_pr_sum bigint, + commit_sum bigint, + ml_status character varying DEFAULT 'Pending'::character varying NOT NULL, + ml_data_last_collected timestamp without time zone, + ml_task_id character varying, + ml_weight bigint, + CONSTRAINT core_data_last_collected_check CHECK (((NOT ((core_data_last_collected IS NULL) AND ((core_status)::text = 'Success'::text))) AND (NOT ((core_data_last_collected IS NOT NULL) AND ((core_status)::text = 'Pending'::text))))), + CONSTRAINT core_secondary_dependency_check CHECK ((NOT (((core_status)::text = 'Pending'::text) AND ((secondary_status)::text = 'Collecting'::text)))), + CONSTRAINT core_task_id_check CHECK (((NOT ((core_task_id IS NOT NULL) AND ((core_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying])::text[])))) AND (NOT ((core_task_id IS NULL) AND ((core_status)::text = 'Collecting'::text))))), + CONSTRAINT facade_data_last_collected_check CHECK (((NOT ((facade_data_last_collected IS NULL) AND ((facade_status)::text = 'Success'::text))) AND (NOT ((facade_data_last_collected IS NOT NULL) AND ((facade_status)::text = ANY ((ARRAY['Pending'::character varying, 'Initializing'::character varying, 'Update'::character varying])::text[])))))), + CONSTRAINT facade_task_id_check CHECK (((NOT ((facade_task_id IS NOT NULL) AND ((facade_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying, 'Failed Clone'::character varying, 'Initializing'::character varying])::text[])))) AND (NOT ((facade_task_id IS NULL) AND ((facade_status)::text = 'Collecting'::text))))), + CONSTRAINT secondary_data_last_collected_check CHECK (((NOT ((secondary_data_last_collected IS NULL) AND ((secondary_status)::text = 'Success'::text))) AND (NOT ((secondary_data_last_collected IS NOT NULL) AND ((secondary_status)::text = 'Pending'::text))))), + CONSTRAINT secondary_task_id_check CHECK (((NOT ((secondary_task_id IS NOT NULL) AND ((secondary_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying])::text[])))) AND (NOT ((secondary_task_id IS NULL) AND ((secondary_status)::text = 'Collecting'::text))))) +); + + +ALTER TABLE augur_operations.collection_status OWNER TO augur; + -- -- Name: config; Type: TABLE; Schema: augur_operations; Owner: augur -- @@ -3881,7 +4745,7 @@ CREATE SEQUENCE augur_operations.config_id_seq CACHE 1; -ALTER TABLE augur_operations.config_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.config_id_seq OWNER TO augur; -- -- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur @@ -3902,7 +4766,19 @@ CREATE SEQUENCE augur_operations.gh_worker_history_history_id_seq CACHE 1; -ALTER TABLE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; + +-- +-- Name: refresh_tokens; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.refresh_tokens ( + id character varying NOT NULL, + user_session_token character varying NOT NULL +); + + +ALTER TABLE augur_operations.refresh_tokens OWNER TO augur; -- -- Name: repos_fetch_log; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3915,36 +4791,95 @@ CREATE TABLE augur_operations.repos_fetch_log ( ); -ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; +ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; + +-- +-- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: subscription_types; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.subscription_types ( + id bigint NOT NULL, + name character varying NOT NULL +); + + +ALTER TABLE augur_operations.subscription_types OWNER TO augur; + +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.subscription_types_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_operations.subscription_types_id_seq OWNER TO augur; + +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.subscription_types_id_seq OWNED BY augur_operations.subscription_types.id; + + +-- +-- Name: subscriptions; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.subscriptions ( + application_id character varying NOT NULL, + type_id bigint NOT NULL +); + + +ALTER TABLE augur_operations.subscriptions OWNER TO augur; + +-- +-- Name: user_groups_group_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.user_groups_group_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_operations.user_groups_group_id_seq OWNER TO augur; -- --- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- Name: user_groups_group_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur -- -COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; +ALTER SEQUENCE augur_operations.user_groups_group_id_seq OWNED BY augur_operations.user_groups.group_id; -- --- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- Name: user_session_tokens; Type: TABLE; Schema: augur_operations; Owner: augur -- -CREATE TABLE augur_operations.users ( +CREATE TABLE augur_operations.user_session_tokens ( + token character varying NOT NULL, user_id integer NOT NULL, - login_name character varying NOT NULL, - login_hashword character varying NOT NULL, - email character varying NOT NULL, - text_phone character varying, - first_name character varying NOT NULL, - last_name character varying NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - admin boolean NOT NULL + created_at bigint, + expiration bigint, + application_id character varying ); -ALTER TABLE augur_operations.users OWNER TO augur; +ALTER TABLE augur_operations.user_session_tokens OWNER TO augur; -- -- Name: users_user_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur @@ -3959,7 +4894,7 @@ CREATE SEQUENCE augur_operations.users_user_id_seq CACHE 1; -ALTER TABLE augur_operations.users_user_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.users_user_id_seq OWNER TO augur; -- -- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur @@ -4031,7 +4966,7 @@ CREATE SEQUENCE augur_operations.worker_oauth_oauth_id_seq CACHE 1; -ALTER TABLE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; -- -- Name: worker_oauth; Type: TABLE; Schema: augur_operations; Owner: augur @@ -4109,6 +5044,17 @@ CREATE TABLE public.alembic_version ( ALTER TABLE public.alembic_version OWNER TO augur; +-- +-- Name: test; Type: TABLE; Schema: public; Owner: augur +-- + +CREATE TABLE public.test ( + test character varying(255) +); + + +ALTER TABLE public.test OWNER TO augur; + -- -- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur -- @@ -4121,7 +5067,7 @@ CREATE SEQUENCE spdx.annotation_types_annotation_type_id_seq CACHE 1; -ALTER TABLE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; -- -- Name: annotation_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4147,7 +5093,7 @@ CREATE SEQUENCE spdx.annotations_annotation_id_seq CACHE 1; -ALTER TABLE spdx.annotations_annotation_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.annotations_annotation_id_seq OWNER TO augur; -- -- Name: annotations; Type: TABLE; Schema: spdx; Owner: augur @@ -4178,7 +5124,7 @@ CREATE SEQUENCE spdx.augur_repo_map_map_id_seq CACHE 1; -ALTER TABLE spdx.augur_repo_map_map_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.augur_repo_map_map_id_seq OWNER TO augur; -- -- Name: augur_repo_map; Type: TABLE; Schema: spdx; Owner: augur @@ -4207,7 +5153,7 @@ CREATE SEQUENCE spdx.creator_types_creator_type_id_seq CACHE 1; -ALTER TABLE spdx.creator_types_creator_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.creator_types_creator_type_id_seq OWNER TO augur; -- -- Name: creator_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4233,7 +5179,7 @@ CREATE SEQUENCE spdx.creators_creator_id_seq CACHE 1; -ALTER TABLE spdx.creators_creator_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.creators_creator_id_seq OWNER TO augur; -- -- Name: creators; Type: TABLE; Schema: spdx; Owner: augur @@ -4261,7 +5207,7 @@ CREATE SEQUENCE spdx.document_namespaces_document_namespace_id_seq CACHE 1; -ALTER TABLE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; -- -- Name: document_namespaces; Type: TABLE; Schema: spdx; Owner: augur @@ -4287,7 +5233,7 @@ CREATE SEQUENCE spdx.documents_document_id_seq CACHE 1; -ALTER TABLE spdx.documents_document_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.documents_document_id_seq OWNER TO augur; -- -- Name: documents; Type: TABLE; Schema: spdx; Owner: augur @@ -4321,7 +5267,7 @@ CREATE SEQUENCE spdx.documents_creators_document_creator_id_seq CACHE 1; -ALTER TABLE spdx.documents_creators_document_creator_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.documents_creators_document_creator_id_seq OWNER TO augur; -- -- Name: documents_creators; Type: TABLE; Schema: spdx; Owner: augur @@ -4348,7 +5294,7 @@ CREATE SEQUENCE spdx.external_refs_external_ref_id_seq CACHE 1; -ALTER TABLE spdx.external_refs_external_ref_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.external_refs_external_ref_id_seq OWNER TO augur; -- -- Name: external_refs; Type: TABLE; Schema: spdx; Owner: augur @@ -4377,7 +5323,7 @@ CREATE SEQUENCE spdx.file_contributors_file_contributor_id_seq CACHE 1; -ALTER TABLE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; -- -- Name: file_contributors; Type: TABLE; Schema: spdx; Owner: augur @@ -4416,7 +5362,7 @@ CREATE SEQUENCE spdx.file_types_file_type_id_seq CACHE 1; -ALTER TABLE spdx.file_types_file_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.file_types_file_type_id_seq OWNER TO augur; -- -- Name: files_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur @@ -4430,7 +5376,7 @@ CREATE SEQUENCE spdx.files_file_id_seq CACHE 1; -ALTER TABLE spdx.files_file_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_file_id_seq OWNER TO augur; -- -- Name: files; Type: TABLE; Schema: spdx; Owner: augur @@ -4461,7 +5407,7 @@ CREATE SEQUENCE spdx.files_licenses_file_license_id_seq CACHE 1; -ALTER TABLE spdx.files_licenses_file_license_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_licenses_file_license_id_seq OWNER TO augur; -- -- Name: files_licenses; Type: TABLE; Schema: spdx; Owner: augur @@ -4489,7 +5435,7 @@ CREATE SEQUENCE spdx.files_scans_file_scan_id_seq CACHE 1; -ALTER TABLE spdx.files_scans_file_scan_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_scans_file_scan_id_seq OWNER TO augur; -- -- Name: files_scans; Type: TABLE; Schema: spdx; Owner: augur @@ -4516,7 +5462,7 @@ CREATE SEQUENCE spdx.identifiers_identifier_id_seq CACHE 1; -ALTER TABLE spdx.identifiers_identifier_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.identifiers_identifier_id_seq OWNER TO augur; -- -- Name: identifiers; Type: TABLE; Schema: spdx; Owner: augur @@ -4547,7 +5493,7 @@ CREATE SEQUENCE spdx.licenses_license_id_seq CACHE 1; -ALTER TABLE spdx.licenses_license_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.licenses_license_id_seq OWNER TO augur; -- -- Name: licenses; Type: TABLE; Schema: spdx; Owner: augur @@ -4577,7 +5523,7 @@ CREATE SEQUENCE spdx.packages_package_id_seq CACHE 1; -ALTER TABLE spdx.packages_package_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_package_id_seq OWNER TO augur; -- -- Name: packages; Type: TABLE; Schema: spdx; Owner: augur @@ -4622,7 +5568,7 @@ CREATE SEQUENCE spdx.packages_files_package_file_id_seq CACHE 1; -ALTER TABLE spdx.packages_files_package_file_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_files_package_file_id_seq OWNER TO augur; -- -- Name: packages_files; Type: TABLE; Schema: spdx; Owner: augur @@ -4652,7 +5598,7 @@ CREATE SEQUENCE spdx.packages_scans_package_scan_id_seq CACHE 1; -ALTER TABLE spdx.packages_scans_package_scan_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_scans_package_scan_id_seq OWNER TO augur; -- -- Name: packages_scans; Type: TABLE; Schema: spdx; Owner: augur @@ -4679,7 +5625,7 @@ CREATE SEQUENCE spdx.projects_package_id_seq CACHE 1; -ALTER TABLE spdx.projects_package_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.projects_package_id_seq OWNER TO augur; -- -- Name: projects; Type: TABLE; Schema: spdx; Owner: augur @@ -4707,7 +5653,7 @@ CREATE SEQUENCE spdx.relationship_types_relationship_type_id_seq CACHE 1; -ALTER TABLE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; -- -- Name: relationship_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4733,7 +5679,7 @@ CREATE SEQUENCE spdx.relationships_relationship_id_seq CACHE 1; -ALTER TABLE spdx.relationships_relationship_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.relationships_relationship_id_seq OWNER TO augur; -- -- Name: relationships; Type: TABLE; Schema: spdx; Owner: augur @@ -4774,7 +5720,7 @@ CREATE SEQUENCE spdx.scanners_scanner_id_seq CACHE 1; -ALTER TABLE spdx.scanners_scanner_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.scanners_scanner_id_seq OWNER TO augur; -- -- Name: scanners; Type: TABLE; Schema: spdx; Owner: augur @@ -4795,6 +5741,13 @@ ALTER TABLE spdx.scanners OWNER TO augur; ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextval('augur_data.chaoss_user_chaoss_id_seq'::regclass); +-- +-- Name: dei_badging id; Type: DEFAULT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging ALTER COLUMN id SET DEFAULT nextval('augur_data.dei_badging_id_seq'::regclass); + + -- -- Name: config id; Type: DEFAULT; Schema: augur_operations; Owner: augur -- @@ -4802,6 +5755,20 @@ ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextv ALTER TABLE ONLY augur_operations.config ALTER COLUMN id SET DEFAULT nextval('augur_operations.config_id_seq'::regclass); +-- +-- Name: subscription_types id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types ALTER COLUMN id SET DEFAULT nextval('augur_operations.subscription_types_id_seq'::regclass); + + +-- +-- Name: user_groups group_id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_groups ALTER COLUMN group_id SET DEFAULT nextval('augur_operations.user_groups_group_id_seq'::regclass); + + -- -- Name: users user_id; Type: DEFAULT; Schema: augur_operations; Owner: augur -- @@ -5491,6 +6458,14 @@ COPY augur_data.contributors_aliases (cntrb_alias_id, canonical_email, alias_ema \. +-- +-- Data for Name: dei_badging; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dei_badging (id, badging_id, level, repo_id) FROM stdin; +\. + + -- -- Data for Name: discourse_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur -- @@ -5810,14 +6785,14 @@ COPY augur_data.releases (release_id, repo_id, release_name, release_description -- Data for Name: repo; Type: TABLE DATA; Schema: augur_data; Owner: augur -- -COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_status, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; -25452 10 https://github.com/chaoss/whitepaper \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 -24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 -24442 10 https://github.com/operate-first/blueprint \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 -25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2020-04-17 21:40:39 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 -1 1 https://github.com/chaoss/augur \N \N 2021-08-10 14:28:44 New \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 -25430 10 https://github.com/SociallyCompute/update-test \N \N 2021-10-07 08:50:13 New \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N -25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +25452 10 https://github.com/chaoss/whitepaper \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +24442 10 https://github.com/operate-first/blueprint \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 +1 1 https://github.com/chaoss/augur \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 +25430 10 https://github.com/SociallyCompute/update-test \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N +25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 \. @@ -5829,6 +6804,14 @@ COPY augur_data.repo_badging (badge_collection_id, repo_id, created_at, tool_sou \. +-- +-- Data for Name: repo_clones_data; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_clones_data (repo_clone_data_id, repo_id, unique_clones, count_clones, clone_data_timestamp) FROM stdin; +\. + + -- -- Data for Name: repo_cluster_messages; Type: TABLE DATA; Schema: augur_data; Owner: augur -- @@ -5857,7 +6840,7 @@ COPY augur_data.repo_deps_libyear (repo_deps_libyear_id, repo_id, name, requirem -- Data for Name: repo_deps_scorecard; Type: TABLE DATA; Schema: augur_data; Owner: augur -- -COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, status, score, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, score, tool_source, tool_version, data_source, data_collection_date, scorecard_check_details) FROM stdin; \. @@ -5876,6 +6859,7 @@ COPY augur_data.repo_group_insights (rgi_id, repo_group_id, rgi_metric, rgi_valu COPY augur_data.repo_groups (repo_group_id, rg_name, rg_description, rg_website, rg_recache, rg_last_modified, rg_type, tool_source, tool_version, data_source, data_collection_date) FROM stdin; 1 Default Repo Group The default repo group created by the schema generation script 0 2019-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 10 Default Repo Group The default repo group created by the schema generation script 0 2021-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +25430 Frontend Repos DO NOT DELETE OR FRONTEND REPOS WILL BREAK 0 2023-02-17 15:00:00 \N \N \N \N \N \. @@ -6045,46 +7029,35 @@ COPY augur_operations.augur_settings (id, setting, value, last_modified) FROM st \. +-- +-- Data for Name: client_applications; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.client_applications (id, api_key, user_id, name, redirect_url) FROM stdin; +\. + + +-- +-- Data for Name: collection_status; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.collection_status (repo_id, core_data_last_collected, core_status, core_task_id, secondary_data_last_collected, secondary_status, secondary_task_id, event_last_collected, facade_status, facade_data_last_collected, facade_task_id, core_weight, facade_weight, secondary_weight, issue_pr_sum, commit_sum, ml_status, ml_data_last_collected, ml_task_id, ml_weight) FROM stdin; +\. + + -- -- Data for Name: config; Type: TABLE DATA; Schema: augur_operations; Owner: augur -- COPY augur_operations.config (id, section_name, setting_name, value, type) FROM stdin; -1 Augur developer 0 int -2 Augur version 1 int -5 Facade check_updates 1 int -6 Facade clone_repos 1 int -7 Facade create_xlsx_summary_files 1 int -8 Facade delete_marked_repos 0 int -9 Facade fix_affiliations 1 int -10 Facade force_analysis 1 int -11 Facade force_invalidate_caches 1 int -12 Facade force_updates 1 int -13 Facade limited_run 0 int -14 Facade multithreaded 1 int -15 Facade nuke_stored_affiliations 0 int -16 Facade pull_repos 1 int -17 Facade rebuild_caches 1 int -18 Facade run_analysis 1 int -20 Server cache_expire 3600 str -21 Server host 0.0.0.0 str -22 Server port 5000 int -23 Server workers 6 int -24 Server timeout 6000 int -25 Server ssl false bool -26 Server ssl_cert_file \N \N -27 Server ssl_key_file \N \N -29 Logging log_level INFO str -30 Logging verbose 0 int -31 Logging quiet 0 int -32 Logging debug 0 int -33 Celery concurrency 12 int -34 Redis cache_group 0 int -35 Redis connection_string redis://localhost:6379/ str -19 Facade repo_directory /facade str -28 Logging logs_directory /logs str -3 Keys github_api_key 0 str -4 Keys gitlab_api_key 0 str +\. + + +-- +-- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.refresh_tokens (id, user_session_token) FROM stdin; \. @@ -6096,11 +7069,54 @@ COPY augur_operations.repos_fetch_log (repos_id, status, date) FROM stdin; \. +-- +-- Data for Name: subscription_types; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.subscription_types (id, name) FROM stdin; +\. + + +-- +-- Data for Name: subscriptions; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.subscriptions (application_id, type_id) FROM stdin; +\. + + +-- +-- Data for Name: user_groups; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_groups (group_id, user_id, name, favorited) FROM stdin; +1 1 default f +\. + + +-- +-- Data for Name: user_repos; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_repos (repo_id, group_id) FROM stdin; +1 1 +\. + + +-- +-- Data for Name: user_session_tokens; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_session_tokens (token, user_id, created_at, expiration, application_id) FROM stdin; +\. + + -- -- Data for Name: users; Type: TABLE DATA; Schema: augur_operations; Owner: augur -- -COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin) FROM stdin; +COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin, email_verified) FROM stdin; +1 cli_user pbkdf2:sha256:260000$oDmAfipU8Ef8TAau$835fce1fc3290b57b5e02ec83aef4613cc06664e6e7535bb6d267dc44563d5d5 cli_user \N cli_user cli_user Schema Generaation \N Schema Generation 2022-10-02 21:49:13 f f \. @@ -6269,7 +7285,15 @@ COPY augur_operations.working_commits (repos_id, working_commit) FROM stdin; -- COPY public.alembic_version (version_num) FROM stdin; -11 +28 +\. + + +-- +-- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: augur +-- + +COPY public.test (test) FROM stdin; \. @@ -6918,6 +7942,13 @@ SELECT pg_catalog.setval('augur_data.contributors_cntrb_id_seq', 25430, false); SELECT pg_catalog.setval('augur_data.contributors_history_cntrb_history_id_seq', 25430, false); +-- +-- Name: dei_badging_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.dei_badging_id_seq', 1, false); + + -- -- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- @@ -7156,6 +8187,13 @@ SELECT pg_catalog.setval('augur_data.releases_release_id_seq', 1, false); SELECT pg_catalog.setval('augur_data.repo_badging_badge_collection_id_seq', 25012, false); +-- +-- Name: repo_clones_data_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_clones_data_id_seq', 1, false); + + -- -- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- @@ -7202,7 +8240,7 @@ SELECT pg_catalog.setval('augur_data.repo_groups_list_serve_rgls_id_seq', 25430, -- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- -SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, false); +SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, true); -- @@ -7244,7 +8282,7 @@ SELECT pg_catalog.setval('augur_data.repo_meta_rmeta_id_seq', 25430, false); -- Name: repo_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- -SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25430, false); +SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25480, false); -- @@ -7321,7 +8359,7 @@ SELECT pg_catalog.setval('augur_operations.augur_settings_id_seq', 1, false); -- Name: config_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur -- -SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); +SELECT pg_catalog.setval('augur_operations.config_id_seq', 50, true); -- @@ -7331,11 +8369,25 @@ SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); SELECT pg_catalog.setval('augur_operations.gh_worker_history_history_id_seq', 15000, false); +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.subscription_types_id_seq', 1, false); + + +-- +-- Name: user_groups_group_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.user_groups_group_id_seq', 2, false); + + -- -- Name: users_user_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur -- -SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 1, false); +SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 2, false); -- @@ -7506,14 +8558,6 @@ SELECT pg_catalog.setval('spdx.relationships_relationship_id_seq', 1, false); SELECT pg_catalog.setval('spdx.scanners_scanner_id_seq', 1, false); --- --- Name: contributors GH-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.contributors - ADD CONSTRAINT "GH-UNIQUE-C" UNIQUE (gh_login) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: contributors GL-UNIQUE-B; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7530,14 +8574,6 @@ ALTER TABLE ONLY augur_data.contributors ADD CONSTRAINT "GL-UNIQUE-C" UNIQUE (gl_username) DEFERRABLE INITIALLY DEFERRED; --- --- Name: contributors GL-cntrb-LOGIN-UNIQUE; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.contributors - ADD CONSTRAINT "GL-cntrb-LOGIN-UNIQUE" UNIQUE (cntrb_login); - - -- -- Name: pull_request_assignees assigniees-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7642,6 +8678,38 @@ ALTER TABLE ONLY augur_data.contributors_aliases ADD CONSTRAINT contributors_aliases_pkey PRIMARY KEY (cntrb_alias_id); +-- +-- Name: dei_badging dei_badging_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging + ADD CONSTRAINT dei_badging_pkey PRIMARY KEY (id, repo_id); + + +-- +-- Name: repo_dependencies deps-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT "deps-insert-unique" UNIQUE (repo_id, dep_name, data_collection_date); + + +-- +-- Name: repo_deps_libyear deps-libyear-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT "deps-libyear-insert-unique" UNIQUE (repo_id, name, data_collection_date); + + +-- +-- Name: repo_deps_scorecard deps-scorecard-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT "deps-scorecard-insert-unique" UNIQUE (repo_id, name); + + -- -- Name: discourse_insights discourse_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7775,7 +8843,7 @@ ALTER TABLE ONLY augur_data.lstm_anomaly_results -- ALTER TABLE ONLY augur_data.message - ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id); + ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id, pltfrm_id); -- @@ -7850,6 +8918,14 @@ ALTER TABLE ONLY augur_data.pull_request_review_message_ref ADD CONSTRAINT pr_review_msg_ref_id PRIMARY KEY (pr_review_msg_ref_id); +-- +-- Name: pull_request_reviews pr_review_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pr_review_unique UNIQUE (pr_review_src_id); + + -- -- Name: pull_request_files prfiles_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8002,6 +9078,14 @@ ALTER TABLE ONLY augur_data.repo_badging ADD CONSTRAINT repo_badging_pkey PRIMARY KEY (badge_collection_id); +-- +-- Name: repo_clones_data repo_clones_data_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_clones_data + ADD CONSTRAINT repo_clones_data_pkey PRIMARY KEY (repo_clone_data_id); + + -- -- Name: repo_cluster_messages repo_cluster_messages_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8159,7 +9243,7 @@ ALTER TABLE ONLY augur_data.repo_groups_list_serve -- ALTER TABLE ONLY augur_data.repo_labor - ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name); -- @@ -8170,21 +9254,6 @@ ALTER TABLE ONLY augur_data.settings ADD CONSTRAINT settings_pkey PRIMARY KEY (id); --- --- Name: pull_request_reviews sourcepr-review-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.pull_request_reviews - ADD CONSTRAINT "sourcepr-review-id" UNIQUE (pr_review_src_id, tool_source); - - --- --- Name: CONSTRAINT "sourcepr-review-id" ON pull_request_reviews; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON CONSTRAINT "sourcepr-review-id" ON augur_data.pull_request_reviews IS 'Natural Key from Source, plus tool source to account for different platforms like GitHub and gitlab. '; - - -- -- Name: platform theplat; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8319,6 +9388,22 @@ ALTER TABLE ONLY augur_operations.augur_settings ADD CONSTRAINT augur_settings_pkey PRIMARY KEY (id); +-- +-- Name: client_applications client_applications_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.client_applications + ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id); + + +-- +-- Name: collection_status collection_status_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.collection_status + ADD CONSTRAINT collection_status_pkey PRIMARY KEY (repo_id); + + -- -- Name: config config_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- @@ -8344,43 +9429,115 @@ ALTER TABLE ONLY augur_operations.worker_job -- --- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: refresh_tokens refresh_token_user_session_token_id_unique; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_token_user_session_token_id_unique UNIQUE (user_session_token); + + +-- +-- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_settings_facade + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: subscription_types subscription_type_title_unique; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types + ADD CONSTRAINT subscription_type_title_unique UNIQUE (name); + + +-- +-- Name: subscription_types subscription_types_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types + ADD CONSTRAINT subscription_types_pkey PRIMARY KEY (id); + + +-- +-- Name: subscriptions subscriptions_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (application_id, type_id); + + +-- +-- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); + + +-- +-- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-email" UNIQUE (email); + + +-- +-- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); + + +-- +-- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.worker_settings_facade - ADD CONSTRAINT settings_pkey PRIMARY KEY (id); +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); -- --- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_groups user_groups_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.config - ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_pkey PRIMARY KEY (group_id); -- --- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_groups user_groups_user_id_name_key; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-email" UNIQUE (email); +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_user_id_name_key UNIQUE (user_id, name); -- --- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_repos user_repos_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_pkey PRIMARY KEY (group_id, repo_id); -- --- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_session_tokens user_session_tokens_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_tokens_pkey PRIMARY KEY (token); -- @@ -8750,6 +9907,34 @@ ALTER TABLE ONLY spdx.scanners CREATE INDEX "REPO_DEP" ON augur_data.library_dependencies USING btree (library_id); +-- +-- Name: api_get_all_repo_prs_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repo_prs_repo_id_idx ON augur_data.api_get_all_repo_prs USING btree (repo_id); + + +-- +-- Name: api_get_all_repos_commits_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repos_commits_repo_id_idx ON augur_data.api_get_all_repos_commits USING btree (repo_id); + + +-- +-- Name: api_get_all_repos_issues_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repos_issues_repo_id_idx ON augur_data.api_get_all_repos_issues USING btree (repo_id); + + +-- +-- Name: augur_new_contributors_cntrb_id_created_at_repo_id_repo_nam_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX augur_new_contributors_cntrb_id_created_at_repo_id_repo_nam_idx ON augur_data.augur_new_contributors USING btree (cntrb_id, created_at, repo_id, repo_name, login, rank); + + -- -- Name: author_affiliation; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -8883,6 +10068,76 @@ CREATE INDEX contributors_idx_cntrb_email3 ON augur_data.contributors USING btre CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); +-- +-- Name: explorer_commits_and_committers__repo_id_cmt_committer_date_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_commits_and_committers__repo_id_cmt_committer_date_idx ON augur_data.explorer_commits_and_committers_daily_count USING btree (repo_id, cmt_committer_date); + + +-- +-- Name: explorer_contributor_actions_cntrb_id_created_at_repo_id_ac_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_contributor_actions_cntrb_id_created_at_repo_id_ac_idx ON augur_data.explorer_contributor_actions USING btree (cntrb_id, created_at, repo_id, action, repo_name, login, rank); + + +-- +-- Name: explorer_entry_list_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_entry_list_repo_id_idx ON augur_data.explorer_entry_list USING btree (repo_id); + + +-- +-- Name: explorer_issue_assignments_issue_id_id_node_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_issue_assignments_issue_id_id_node_id_idx ON augur_data.explorer_issue_assignments USING btree (issue_id, id, node_id); + + +-- +-- Name: explorer_new_contributors_cntrb_id_created_at_month_year_re_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_new_contributors_cntrb_id_created_at_month_year_re_idx ON augur_data.explorer_new_contributors USING btree (cntrb_id, created_at, month, year, repo_id, full_name, repo_name, login, rank); + + +-- +-- Name: explorer_pr_assignments_pull_request_id_id_node_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_assignments_pull_request_id_id_node_id_idx ON augur_data.explorer_pr_assignments USING btree (pull_request_id, id, node_id); + + +-- +-- Name: explorer_pr_response_pull_request_id_id_cntrb_id_msg_cntrb__idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_response_pull_request_id_id_cntrb_id_msg_cntrb__idx ON augur_data.explorer_pr_response USING btree (pull_request_id, id, cntrb_id, msg_cntrb_id, msg_timestamp); + + +-- +-- Name: explorer_pr_response_times_repo_id_pr_src_id_pr_src_meta_la_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_response_times_repo_id_pr_src_id_pr_src_meta_la_idx ON augur_data.explorer_pr_response_times USING btree (repo_id, pr_src_id, pr_src_meta_label); + + +-- +-- Name: explorer_repo_languages_repo_id_programming_language_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_repo_languages_repo_id_programming_language_idx ON augur_data.explorer_repo_languages USING btree (repo_id, programming_language); + + +-- +-- Name: explorer_user_repos_login_name_user_id_group_id_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_user_repos_login_name_user_id_group_id_repo_id_idx ON augur_data.explorer_user_repos USING btree (login_name, user_id, group_id, repo_id); + + -- -- Name: forked; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -8890,6 +10145,13 @@ CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); CREATE INDEX forked ON augur_data.repo USING btree (forked_from); +-- +-- Name: gh_login; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX gh_login ON augur_data.contributors USING btree (gh_login NULLS FIRST); + + -- -- Name: id_node; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9016,6 +10278,13 @@ CREATE INDEX "pr-cntrb-idx-repo" ON augur_data.pull_request_repo USING btree (pr CREATE INDEX "pr-reviewers-cntrb-idx1" ON augur_data.pull_request_reviewers USING btree (cntrb_id); +-- +-- Name: pr_ID_prs_table; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_ID_prs_table" ON augur_data.pull_requests USING btree (pull_request_id); + + -- -- Name: pr_anal_idx; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9037,6 +10306,20 @@ CREATE INDEX pr_events_ibfk_1 ON augur_data.pull_request_events USING btree (pul CREATE INDEX pr_events_ibfk_2 ON augur_data.pull_request_events USING btree (cntrb_id); +-- +-- Name: pr_id_pr_files; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_id_pr_files ON augur_data.pull_request_files USING btree (pull_request_id); + + +-- +-- Name: pr_id_pr_reviews; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_id_pr_reviews ON augur_data.pull_request_reviews USING btree (pull_request_id); + + -- -- Name: pr_meta-cntrbid-idx; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9317,6 +10600,14 @@ CREATE INDEX "type,projects_id" ON augur_data.unknown_cache USING btree (type, r CREATE INDEX "repos_id,statusops" ON augur_operations.repos_fetch_log USING btree (repos_id, status); +-- +-- Name: commits cmt_ght_author_cntrb_id_fk; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT cmt_ght_author_cntrb_id_fk FOREIGN KEY (cmt_ght_author_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: contributor_repo contributor_repo_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -9373,22 +10664,6 @@ ALTER TABLE ONLY augur_data.commit_parents ADD CONSTRAINT fk_commit_parents_commits_2 FOREIGN KEY (parent_id) REFERENCES augur_data.commits(cmt_id); --- --- Name: commits fk_commits_contributors_3; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.commits - ADD CONSTRAINT fk_commits_contributors_3 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: commits fk_commits_contributors_4; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.commits - ADD CONSTRAINT fk_commits_contributors_4 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: commits fk_commits_repo_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -10012,6 +11287,14 @@ ALTER TABLE ONLY augur_data.pull_requests ADD CONSTRAINT pull_requests_pr_augur_contributor_id_fkey FOREIGN KEY (pr_augur_contributor_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; +-- +-- Name: repo_clones_data repo_clones_data_repo_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_clones_data + ADD CONSTRAINT repo_clones_data_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: repo_dependencies repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -10052,6 +11335,94 @@ ALTER TABLE ONLY augur_data.repo_sbom_scans ADD CONSTRAINT repo_linker_sbom FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; +-- +-- Name: dei_badging user_repo_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging + ADD CONSTRAINT user_repo_user_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: client_applications client_application_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.client_applications + ADD CONSTRAINT client_application_user_id_fkey FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + +-- +-- Name: collection_status collection_status_repo_id_fk; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.collection_status + ADD CONSTRAINT collection_status_repo_id_fk FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: refresh_tokens refresh_token_session_token_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_token_session_token_id_fkey FOREIGN KEY (user_session_token) REFERENCES augur_operations.user_session_tokens(token); + + +-- +-- Name: subscriptions subscriptions_application_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_application_id_fkey FOREIGN KEY (application_id) REFERENCES augur_operations.client_applications(id); + + +-- +-- Name: subscriptions subscriptions_type_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_type_id_fkey FOREIGN KEY (type_id) REFERENCES augur_operations.subscription_types(id); + + +-- +-- Name: user_groups user_groups_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_user_id_fkey FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + +-- +-- Name: user_repos user_repos_group_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_group_id_fkey FOREIGN KEY (group_id) REFERENCES augur_operations.user_groups(group_id); + + +-- +-- Name: user_repos user_repos_repo_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: user_session_tokens user_session_token_application_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_token_application_id_fkey FOREIGN KEY (application_id) REFERENCES augur_operations.client_applications(id); + + +-- +-- Name: user_session_tokens user_session_token_user_fk; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_token_user_fk FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + -- -- Name: annotations annotations_annotation_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur -- @@ -10324,6 +11695,104 @@ ALTER TABLE ONLY spdx.relationships ADD CONSTRAINT relationships_right_identifier_id_fkey FOREIGN KEY (right_identifier_id) REFERENCES spdx.identifiers(identifier_id); +-- +-- Name: api_get_all_repo_prs; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repo_prs; + + +-- +-- Name: api_get_all_repos_commits; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_commits; + + +-- +-- Name: api_get_all_repos_issues; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_issues; + + +-- +-- Name: augur_new_contributors; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.augur_new_contributors; + + +-- +-- Name: explorer_commits_and_committers_daily_count; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count; + + +-- +-- Name: explorer_contributor_actions; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_contributor_actions; + + +-- +-- Name: explorer_entry_list; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_entry_list; + + +-- +-- Name: explorer_issue_assignments; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_issue_assignments; + + +-- +-- Name: explorer_new_contributors; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_new_contributors; + + +-- +-- Name: explorer_pr_assignments; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_assignments; + + +-- +-- Name: explorer_pr_response; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_response; + + +-- +-- Name: explorer_pr_response_times; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_response_times; + + +-- +-- Name: explorer_repo_languages; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_repo_languages; + + +-- +-- Name: explorer_user_repos; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_user_repos; + + -- -- PostgreSQL database dump complete -- diff --git a/docker/database/augur-retired-sql.schema b/docker/database/augur-retired-sql.schema new file mode 100644 index 0000000000..ac3872a1d5 --- /dev/null +++ b/docker/database/augur-retired-sql.schema @@ -0,0 +1,10330 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) +-- Dumped by pg_dump version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: augur_data; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA augur_data; + + +ALTER SCHEMA augur_data OWNER TO augur; + +-- +-- Name: augur_operations; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA augur_operations; + + +ALTER SCHEMA augur_operations OWNER TO augur; + +-- +-- Name: spdx; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA spdx; + + +ALTER SCHEMA spdx OWNER TO augur; + +-- +-- Name: toss_specific; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA toss_specific; + + +ALTER SCHEMA toss_specific OWNER TO augur; + +-- +-- Name: refresh_aggregates(); Type: PROCEDURE; Schema: augur_data; Owner: augur +-- + +CREATE PROCEDURE augur_data.refresh_aggregates() + LANGUAGE plpgsql + AS $$ + begin + perform pg_advisory_lock(124); + execute 'REFRESH MATERIALIZED VIEW "augur_data"."issue_reporter_created_at"'; + perform pg_advisory_unlock(124); + end; +$$; + + +ALTER PROCEDURE augur_data.refresh_aggregates() OWNER TO augur; + +-- +-- Name: create_constraint_if_not_exists(text, text, text); Type: FUNCTION; Schema: public; Owner: augur +-- + +CREATE FUNCTION public.create_constraint_if_not_exists(t_name text, c_name text, constraint_sql text) RETURNS void + LANGUAGE plpgsql + AS $$ + BEGIN + -- Look for our constraint + IF NOT EXISTS (SELECT constraint_name + FROM information_schema.constraint_column_usage + WHERE constraint_name = c_name) THEN + EXECUTE 'ALTER TABLE ' || t_name || ' ADD CONSTRAINT ' || c_name || ' ' || constraint_sql; + END IF; + END; +$$; + + +ALTER FUNCTION public.create_constraint_if_not_exists(t_name text, c_name text, constraint_sql text) OWNER TO augur; + +-- +-- Name: pc_chartoint(character varying); Type: FUNCTION; Schema: public; Owner: augur +-- + +CREATE FUNCTION public.pc_chartoint(chartoconvert character varying) RETURNS integer + LANGUAGE sql IMMUTABLE STRICT + AS $_$ +SELECT CASE WHEN trim($1) SIMILAR TO '[0-9]+' + THEN CAST(trim($1) AS integer) + ELSE NULL END; + +$_$; + + +ALTER FUNCTION public.pc_chartoint(chartoconvert character varying) OWNER TO augur; + +-- +-- Name: refresh_aggregates(); Type: PROCEDURE; Schema: public; Owner: augur +-- + +CREATE PROCEDURE public.refresh_aggregates() + LANGUAGE plpgsql + AS $$ + begin + perform pg_advisory_lock(124); + execute 'REFRESH MATERIALIZED VIEW "augur_data"."issue_reporter_created_at"'; + perform pg_advisory_unlock(124); + end; +$$; + + +ALTER PROCEDURE public.refresh_aggregates() OWNER TO augur; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: analysis_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.analysis_log ( + repos_id integer NOT NULL, + status character varying NOT NULL, + date_attempted timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.analysis_log OWNER TO augur; + +-- +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; + +-- +-- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.chaoss_metric_status ( + cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, + cm_group character varying, + cm_source character varying, + cm_type character varying, + cm_backend_status character varying, + cm_frontend_status character varying, + cm_defined boolean, + cm_api_endpoint_repo character varying, + cm_api_endpoint_rg character varying, + cm_name character varying, + cm_working_group character varying, + cm_info json, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cm_working_group_focus_area character varying +); + + +ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; + +-- +-- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; + + +-- +-- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.chaoss_user ( + chaoss_id bigint NOT NULL, + chaoss_login_name character varying, + chaoss_login_hashword character varying, + chaoss_email character varying, + chaoss_text_phone character varying, + chaoss_first_name character varying, + chaoss_last_name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT now() +); + + +ALTER TABLE augur_data.chaoss_user OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; + +-- +-- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commit_comment_ref ( + cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, + cmt_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + user_id bigint NOT NULL, + body text, + line bigint, + "position" bigint, + commit_comment_src_node_id character varying, + cmt_comment_src_id bigint NOT NULL, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; + +-- +-- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; + + +-- +-- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; + + +-- +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_parents_parent_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commit_parents_parent_id_seq OWNER TO augur; + +-- +-- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commit_parents ( + cmt_id bigint NOT NULL, + parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.commit_parents OWNER TO augur; + +-- +-- Name: commits_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commits_cmt_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commits_cmt_id_seq OWNER TO augur; + +-- +-- Name: commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commits ( + cmt_id bigint DEFAULT nextval('augur_data.commits_cmt_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + cmt_commit_hash character varying(80) NOT NULL, + cmt_author_name character varying NOT NULL, + cmt_author_raw_email character varying NOT NULL, + cmt_author_email character varying NOT NULL, + cmt_author_date character varying(10) NOT NULL, + cmt_author_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_committer_name character varying NOT NULL, + cmt_committer_raw_email character varying NOT NULL, + cmt_committer_email character varying NOT NULL, + cmt_committer_date character varying NOT NULL, + cmt_committer_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_added integer NOT NULL, + cmt_removed integer NOT NULL, + cmt_whitespace integer NOT NULL, + cmt_filename character varying NOT NULL, + cmt_date_attempted timestamp(0) without time zone NOT NULL, + cmt_ght_committer_id integer, + cmt_ght_committed_at timestamp(0) without time zone, + cmt_committer_timestamp timestamp(0) with time zone, + cmt_author_timestamp timestamp(0) with time zone, + cmt_author_platform_username character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cmt_ght_author_id uuid +); + + +ALTER TABLE augur_data.commits OWNER TO augur; + +-- +-- Name: TABLE commits; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.commits IS 'Commits. +Each row represents changes to one FILE within a single commit. So you will encounter multiple rows per commit hash in many cases. '; + + +-- +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; + +-- +-- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributor_affiliations ( + ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, + ca_domain character varying(64) NOT NULL, + ca_start_date date DEFAULT '1970-01-01'::date, + ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + ca_affiliation character varying, + ca_active smallint DEFAULT 1, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; + +-- +-- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; + + +-- +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; + +-- +-- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributor_repo ( + cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, + repo_git character varying NOT NULL, + repo_name character varying NOT NULL, + gh_repo_id bigint NOT NULL, + cntrb_category character varying, + event_id bigint, + created_at timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributor_repo OWNER TO augur; + +-- +-- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. +From: [ + { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + } +] +'; + + +-- +-- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; + + +-- +-- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; + + +-- +-- Name: contributors; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributors ( + cntrb_login character varying, + cntrb_email character varying, + cntrb_full_name character varying, + cntrb_company character varying, + cntrb_created_at timestamp(0) without time zone, + cntrb_type character varying, + cntrb_fake smallint DEFAULT 0, + cntrb_deleted smallint DEFAULT 0, + cntrb_long numeric(11,8) DEFAULT NULL::numeric, + cntrb_lat numeric(10,8) DEFAULT NULL::numeric, + cntrb_country_code character(3) DEFAULT NULL::bpchar, + cntrb_state character varying, + cntrb_city character varying, + cntrb_location character varying, + cntrb_canonical character varying, + cntrb_last_used timestamp(0) with time zone DEFAULT NULL::timestamp with time zone, + gh_user_id bigint, + gh_login character varying, + gh_url character varying, + gh_html_url character varying, + gh_node_id character varying, + gh_avatar_url character varying, + gh_gravatar_id character varying, + gh_followers_url character varying, + gh_following_url character varying, + gh_gists_url character varying, + gh_starred_url character varying, + gh_subscriptions_url character varying, + gh_organizations_url character varying, + gh_repos_url character varying, + gh_events_url character varying, + gh_received_events_url character varying, + gh_type character varying, + gh_site_admin character varying, + gl_web_url character varying, + gl_avatar_url character varying, + gl_state character varying, + gl_username character varying, + gl_full_name character varying, + gl_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributors OWNER TO augur; + +-- +-- Name: TABLE contributors; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributors IS 'For GitHub, this should be repeated from gh_login. for other systems, it should be that systems login. +Github now allows a user to change their login name, but their user id remains the same in this case. So, the natural key is the combination of id and login, but there should never be repeated logins. '; + + +-- +-- Name: COLUMN contributors.cntrb_login; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_login IS 'Will be a double population with the same value as gh_login for github, but the local value for other systems. '; + + +-- +-- Name: COLUMN contributors.cntrb_email; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_email IS 'This needs to be here for matching contributor ids, which are augur, to the commit information. '; + + +-- +-- Name: COLUMN contributors.cntrb_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_type IS 'Present in another models. It is not currently used in Augur. '; + + +-- +-- Name: COLUMN contributors.gh_login; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gh_login IS 'populated with the github user name for github originated data. '; + + +-- +-- Name: COLUMN contributors.gl_web_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_web_url IS '“web_url” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_avatar_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_avatar_url IS '“avatar_url” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_state; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_state IS '“state” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_username; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_username IS '“username” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_full_name; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_full_name IS '“name” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_id IS '"id" value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; + +-- +-- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributors_aliases ( + cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, + canonical_email character varying NOT NULL, + alias_email character varying NOT NULL, + cntrb_active smallint DEFAULT 1 NOT NULL, + cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributors_aliases OWNER TO augur; + +-- +-- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. + +The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; + +-- +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_cntrb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_cntrb_id_seq OWNER TO augur; + +-- +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; + +-- +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; + +-- +-- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.discourse_insights ( + msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, + msg_id bigint, + discourse_act character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.discourse_insights OWNER TO augur; + +-- +-- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; + + +-- +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; + +-- +-- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_annual ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; + +-- +-- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_annual ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; + +-- +-- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_monthly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; + +-- +-- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_weekly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; + +-- +-- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_monthly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; + +-- +-- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_weekly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; + +-- +-- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.exclude ( + id integer NOT NULL, + projects_id integer NOT NULL, + email character varying DEFAULT 'NULL'::character varying, + domain character varying DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_data.exclude OWNER TO augur; + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; + +-- +-- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_assignees ( + issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + issue_assignee_src_id bigint, + issue_assignee_src_node character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_assignees OWNER TO augur; + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_events_event_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_events_event_id_seq OWNER TO augur; + +-- +-- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_events ( + event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, + issue_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + node_id character varying, + node_url character varying, + platform_id bigint NOT NULL, + issue_event_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_events OWNER TO augur; + +-- +-- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + + +-- +-- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; + +-- +-- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_labels ( + issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + label_text character varying, + label_description character varying, + label_color character varying, + label_src_id bigint, + label_src_node_id character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_labels OWNER TO augur; + +-- +-- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; + + +-- +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_message_ref ( + issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + msg_id bigint, + issue_msg_ref_src_node_id character varying, + issue_msg_ref_src_comment_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_message_ref OWNER TO augur; + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_seq + START WITH 31000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_seq OWNER TO augur; + +-- +-- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issues ( + issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, + repo_id bigint, + pull_request bigint, + pull_request_id bigint, + created_at timestamp(0) without time zone, + issue_title character varying, + issue_body character varying, + comment_count bigint, + updated_at timestamp(0) without time zone, + closed_at timestamp(0) without time zone, + due_on timestamp(0) without time zone, + repository_url character varying, + issue_url character varying, + labels_url character varying, + comments_url character varying, + events_url character varying, + html_url character varying, + issue_state character varying, + issue_node_id character varying, + gh_issue_number bigint, + gh_issue_id bigint, + gh_user_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + reporter_id uuid, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issues OWNER TO augur; + +-- +-- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; + + +-- +-- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.libraries_library_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.libraries_library_id_seq OWNER TO augur; + +-- +-- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.libraries ( + library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, + repo_id bigint, + platform character varying, + name character varying, + created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + library_description character varying(2000) DEFAULT NULL::character varying, + keywords character varying, + library_homepage character varying(1000) DEFAULT NULL::character varying, + license character varying, + version_count integer, + latest_release_timestamp character varying, + latest_release_number character varying, + package_manager_id character varying, + dependency_count integer, + dependent_library_count integer, + primary_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.libraries OWNER TO augur; + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; + +-- +-- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_dependencies ( + lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, + library_id bigint, + manifest_platform character varying, + manifest_filepath character varying(1000) DEFAULT NULL::character varying, + manifest_kind character varying, + repo_id_branch character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_dependencies OWNER TO augur; + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_version_library_version_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.library_version_library_version_id_seq OWNER TO augur; + +-- +-- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_version ( + library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, + library_id bigint, + library_platform character varying, + version_number character varying, + version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_version OWNER TO augur; + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_models ( + model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, + model_name character varying, + model_description character varying, + look_back_days bigint, + training_days bigint, + batch_size bigint, + metric character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_results ( + result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_category character varying, + model_id bigint, + metric character varying, + contamination_factor double precision, + mean_absolute_error double precision, + remarks character varying, + metric_field character varying, + mean_absolute_actual_value double precision, + mean_absolute_prediction_value double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; + +-- +-- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; + + +-- +-- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_msg_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_msg_id_seq OWNER TO augur; + +-- +-- Name: message; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message ( + msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, + rgls_id bigint, + platform_msg_id bigint, + platform_node_id character varying, + repo_id bigint, + msg_text character varying, + msg_timestamp timestamp(0) without time zone, + msg_sender_email character varying, + msg_header character varying, + pltfrm_id bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.message OWNER TO augur; + +-- +-- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis OWNER TO augur; + +-- +-- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; + +-- +-- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment OWNER TO augur; + +-- +-- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; + +-- +-- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.platform_pltfrm_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.platform_pltfrm_id_seq OWNER TO augur; + +-- +-- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.platform ( + pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, + pltfrm_name character varying, + pltfrm_version character varying, + pltfrm_release_date date, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.platform OWNER TO augur; + +-- +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; + +-- +-- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_analysis ( + pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + merge_probability numeric(256,250), + mechanism character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; + +-- +-- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; + + +-- +-- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; + + +-- +-- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; + +-- +-- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_assignees ( + pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_assignee_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + contrib_id uuid +); + + +ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; + +-- +-- Name: pull_request_commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_commits ( + pr_cmt_id bigint DEFAULT nextval('augur_data.pull_request_commits_pr_cmt_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_cmt_sha character varying, + pr_cmt_node_id character varying, + pr_cmt_message character varying, + pr_cmt_comments_url character varying, + pr_cmt_timestamp timestamp(0) without time zone, + pr_cmt_author_email character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_cmt_author_cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_commits OWNER TO augur; + +-- +-- Name: TABLE pull_request_commits; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_commits IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: COLUMN pull_request_commits.pr_cmt_sha; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_commits.pr_cmt_sha IS 'This is the commit SHA for a pull request commit. If the PR is not to the master branch of the main repository (or, in rare cases, from it), then you will NOT find a corresponding commit SHA in the commit table. (see table comment for further explanation). '; + + +-- +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; + +-- +-- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_events ( + pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + issue_event_src_id bigint, + node_id character varying, + node_url character varying, + platform_id bigint DEFAULT 25150 NOT NULL, + pr_platform_event_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_events OWNER TO augur; + +-- +-- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; + + +-- +-- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + + +-- +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq + START WITH 25150 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; + +-- +-- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_files ( + pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_file_additions bigint, + pr_file_deletions bigint, + pr_file_path character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_files OWNER TO augur; + +-- +-- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; + +-- +-- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_labels ( + pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_src_id bigint, + pr_src_node_id character varying, + pr_src_url character varying, + pr_src_description character varying, + pr_src_color character varying, + pr_src_default_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_labels OWNER TO augur; + +-- +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_message_ref ( + pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + msg_id bigint, + pr_message_ref_src_comment_id bigint, + pr_message_ref_src_node_id character varying, + pr_issue_url character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; + +-- +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; + +-- +-- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_meta ( + pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_head_or_base character varying, + pr_src_meta_label character varying, + pr_src_meta_ref character varying, + pr_sha character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_meta OWNER TO augur; + +-- +-- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; + + +-- +-- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; + + +-- +-- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a representation of the repo:branch information in the pull request. Head is issueing the pull request and base is taking the pull request. For example: (We do not store all of this) + + "head": { + "label": "chaoss:pull-request-worker", + "ref": "pull-request-worker", + "sha": "6b380c3d6d625616f79d702612ebab6d204614f2", + "user": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 78134122, + "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", + "name": "augur", + "full_name": "chaoss/augur", + "private": false, + "owner": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/chaoss/augur", + "description": "Python library and web service for Open Source Software Health and Sustainability metrics & data collection.", + "fork": false, + "url": "https://api.github.com/repos/chaoss/augur", + "forks_url": "https://api.github.com/repos/chaoss/augur/forks", + "keys_url": "https://api.github.com/repos/chaoss/augur/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/chaoss/augur/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/chaoss/augur/teams", + "hooks_url": "https://api.github.com/repos/chaoss/augur/hooks", + "issue_events_url": "https://api.github.com/repos/chaoss/augur/issues/events{/number}", + "events_url": "https://api.github.com/repos/chaoss/augur/events", + "assignees_url": "https://api.github.com/repos/chaoss/augur/assignees{/user}", + "branches_url": "https://api.github.com/repos/chaoss/augur/branches{/branch}", + "tags_url": "https://api.github.com/repos/chaoss/augur/tags", + "blobs_url": "https://api.github.com/repos/chaoss/augur/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/chaoss/augur/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/chaoss/augur/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/chaoss/augur/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/chaoss/augur/statuses/{sha}", + "languages_url": "https://api.github.com/repos/chaoss/augur/languages", + "stargazers_url": "https://api.github.com/repos/chaoss/augur/stargazers", + "contributors_url": "https://api.github.com/repos/chaoss/augur/contributors", + "subscribers_url": "https://api.github.com/repos/chaoss/augur/subscribers", + "subscription_url": "https://api.github.com/repos/chaoss/augur/subscription", + "commits_url": "https://api.github.com/repos/chaoss/augur/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/chaoss/augur/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/chaoss/augur/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/chaoss/augur/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/chaoss/augur/contents/{+path}", + "compare_url": "https://api.github.com/repos/chaoss/augur/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/chaoss/augur/merges", + "archive_url": "https://api.github.com/repos/chaoss/augur/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/chaoss/augur/downloads", + "issues_url": "https://api.github.com/repos/chaoss/augur/issues{/number}", + "pulls_url": "https://api.github.com/repos/chaoss/augur/pulls{/number}", + "milestones_url": "https://api.github.com/repos/chaoss/augur/milestones{/number}", + "notifications_url": "https://api.github.com/repos/chaoss/augur/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/chaoss/augur/labels{/name}", + "releases_url": "https://api.github.com/repos/chaoss/augur/releases{/id}", + "deployments_url": "https://api.github.com/repos/chaoss/augur/deployments", + "created_at": "2017-01-05T17:34:54Z", + "updated_at": "2019-11-15T00:56:12Z", + "pushed_at": "2019-12-02T06:27:26Z", + "git_url": "git://github.com/chaoss/augur.git", + "ssh_url": "git@github.com:chaoss/augur.git", + "clone_url": "https://github.com/chaoss/augur.git", + "svn_url": "https://github.com/chaoss/augur", + "homepage": "http://augur.osshealth.io/", + "size": 82004, + "stargazers_count": 153, + "watchers_count": 153, + "language": "Python", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": true, + "forks_count": 205, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 205, + "open_issues": 14, + "watchers": 153, + "default_branch": "master" + } + }, + "base": { + "label": "chaoss:dev", + "ref": "dev", + "sha": "bfd2d34b51659613dd842cf83c3873f7699c2a0e", + "user": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 78134122, + "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", + "name": "augur", + "full_name": "chaoss/augur", + "private": false, + "owner": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, +'; + + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; + +-- +-- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_repo ( + pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, + pr_repo_meta_id bigint, + pr_repo_head_or_base character varying, + pr_src_repo_id bigint, + pr_src_node_id character varying, + pr_repo_name character varying, + pr_repo_full_name character varying, + pr_repo_private_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_repo OWNER TO augur; + +-- +-- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; + + +-- +-- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; + + +-- +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_review_message_ref ( + pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, + pr_review_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + pr_review_msg_url character varying, + pr_review_src_id bigint, + pr_review_msg_src_id bigint, + pr_review_msg_node_id character varying, + pr_review_msg_diff_hunk character varying, + pr_review_msg_path character varying, + pr_review_msg_position bigint, + pr_review_msg_original_position bigint, + pr_review_msg_commit_id character varying, + pr_review_msg_original_commit_id character varying, + pr_review_msg_updated_at timestamp(6) without time zone, + pr_review_msg_html_url character varying, + pr_url character varying, + pr_review_msg_author_association character varying, + pr_review_msg_start_line bigint, + pr_review_msg_original_start_line bigint, + pr_review_msg_start_side character varying, + pr_review_msg_line bigint, + pr_review_msg_original_line bigint, + pr_review_msg_side character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; + +-- +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; + +-- +-- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_reviewers ( + pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_source_id bigint, + repo_id bigint, + pr_reviewer_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; + +-- +-- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; + + +-- +-- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; + + +-- +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; + +-- +-- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_reviews ( + pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + pr_review_author_association character varying, + pr_review_state character varying, + pr_review_body character varying, + pr_review_submitted_at timestamp(6) without time zone, + pr_review_src_id bigint, + pr_review_node_id character varying, + pr_review_html_url character varying, + pr_review_pull_request_url character varying, + pr_review_commit_id character varying, + platform_id bigint DEFAULT 25150, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; + +-- +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; + +-- +-- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_teams ( + pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_src_team_id bigint, + pr_src_team_node character varying, + pr_src_team_url character varying, + pr_team_name character varying, + pr_team_slug character varying, + pr_team_description character varying, + pr_team_privacy character varying, + pr_team_permission character varying, + pr_team_src_members_url character varying, + pr_team_src_repositories_url character varying, + pr_team_parent_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_teams OWNER TO augur; + +-- +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; + +-- +-- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_requests ( + pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, + repo_id bigint DEFAULT 0, + pr_url character varying, + pr_src_id bigint, + pr_src_node_id character varying, + pr_html_url character varying, + pr_diff_url character varying, + pr_patch_url character varying, + pr_issue_url character varying, + pr_augur_issue_id bigint, + pr_src_number bigint, + pr_src_state character varying, + pr_src_locked boolean, + pr_src_title character varying, + pr_body text, + pr_created_at timestamp(0) without time zone, + pr_updated_at timestamp(0) without time zone, + pr_closed_at timestamp(0) without time zone, + pr_merged_at timestamp(0) without time zone, + pr_merge_commit_sha character varying, + pr_teams bigint, + pr_milestone character varying, + pr_commits_url character varying, + pr_review_comments_url character varying, + pr_review_comment_url character varying, + pr_comments_url character varying, + pr_statuses_url character varying, + pr_meta_head_id character varying, + pr_meta_base_id character varying, + pr_src_issue_url character varying, + pr_src_comments_url character varying, + pr_src_review_comments_url character varying, + pr_src_commits_url character varying, + pr_src_statuses_url character varying, + pr_src_author_association character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_augur_contributor_id uuid +); + + +ALTER TABLE augur_data.pull_requests OWNER TO augur; + +-- +-- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; + + +-- +-- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; + + +-- +-- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; + + +-- +-- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; + + +-- +-- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; + + +-- +-- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; + + +-- +-- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; + + +-- +-- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; + + +-- +-- Name: releases_release_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.releases_release_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.releases_release_id_seq OWNER TO augur; + +-- +-- Name: releases; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.releases ( + release_id character(64) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + release_name character varying, + release_description character varying, + release_author character varying, + release_created_at timestamp(6) without time zone, + release_published_at timestamp(6) without time zone, + release_updated_at timestamp(6) without time zone, + release_is_draft boolean, + release_is_prerelease boolean, + release_tag_name character varying, + release_url character varying, + tag_only boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.releases OWNER TO augur; + +-- +-- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_repo_id_seq OWNER TO augur; + +-- +-- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo ( + repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + repo_git character varying NOT NULL, + repo_path character varying DEFAULT 'NULL'::character varying, + repo_name character varying DEFAULT 'NULL'::character varying, + repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + repo_status character varying DEFAULT 'New'::character varying NOT NULL, + repo_type character varying DEFAULT ''::character varying, + url character varying, + owner_id integer, + description character varying, + primary_language character varying, + created_at character varying, + forked_from character varying, + updated_at timestamp(0) without time zone, + repo_archived_date_collected timestamp(0) with time zone, + repo_archived integer, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo OWNER TO augur; + +-- +-- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; + + +-- +-- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; + + +-- +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq + START WITH 25012 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; + +-- +-- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_badging ( + badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, + repo_id bigint, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + data jsonb +); + + +ALTER TABLE augur_data.repo_badging OWNER TO augur; + +-- +-- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API +https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur +'; + + +-- +-- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; + +-- +-- Name: repo_cluster_messages; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_cluster_messages ( + msg_cluster_id bigint DEFAULT nextval('augur_data.repo_cluster_messages_msg_cluster_id_seq'::regclass) NOT NULL, + repo_id bigint, + cluster_content integer, + cluster_mechanism integer, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_cluster_messages OWNER TO augur; + +-- +-- Name: repo_dependencies_repo_dependencies_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; + +-- +-- Name: repo_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_dependencies ( + repo_dependencies_id bigint DEFAULT nextval('augur_data.repo_dependencies_repo_dependencies_id_seq'::regclass) NOT NULL, + repo_id bigint, + dep_name character varying, + dep_count integer, + dep_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_dependencies OWNER TO augur; + +-- +-- Name: TABLE repo_dependencies; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_dependencies IS 'Contains the dependencies for a repo.'; + + +-- +-- Name: COLUMN repo_dependencies.repo_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.repo_id IS 'Forign key for repo id. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_name; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_name IS 'Name of the dependancy found in project. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_count IS 'Number of times the dependancy was found. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_language; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_language IS 'Language of the dependancy. '; + + +-- +-- Name: repo_deps_libyear_repo_deps_libyear_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; + +-- +-- Name: repo_deps_libyear; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_deps_libyear ( + repo_deps_libyear_id bigint DEFAULT nextval('augur_data.repo_deps_libyear_repo_deps_libyear_id_seq'::regclass) NOT NULL, + repo_id bigint, + name character varying, + requirement character varying, + type character varying, + package_manager character varying, + current_verion character varying, + latest_version character varying, + current_release_date character varying, + latest_release_date character varying, + libyear double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_deps_libyear OWNER TO augur; + +-- +-- Name: repo_deps_scorecard_repo_deps_scorecard_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; + +-- +-- Name: repo_deps_scorecard; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_deps_scorecard ( + repo_deps_scorecard_id bigint DEFAULT nextval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1'::regclass) NOT NULL, + repo_id bigint, + name character varying, + status character varying, + score character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_deps_scorecard OWNER TO augur; + +-- +-- Name: repo_group_insights_rgi_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_group_insights_rgi_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; + +-- +-- Name: repo_group_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_group_insights ( + rgi_id bigint DEFAULT nextval('augur_data.repo_group_insights_rgi_id_seq'::regclass) NOT NULL, + repo_group_id bigint, + rgi_metric character varying, + rgi_value character varying, + cms_id bigint, + rgi_fresh boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_group_insights OWNER TO augur; + +-- +-- Name: TABLE repo_group_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_group_insights IS 'This table is output from an analytical worker inside of Augur. It runs through the different metrics on a REPOSITORY_GROUP and identifies the five to ten most “interesting” metrics as defined by some kind of delta or other factor. The algorithm is going to evolve. + +Worker Design Notes: The idea is that the "insight worker" will scan through a bunch of active metrics or "synthetic metrics" to list the most important insights. '; + + +-- +-- Name: COLUMN repo_group_insights.rgi_fresh; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_group_insights.rgi_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; + + +-- +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; + +-- +-- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_groups ( + repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, + rg_name character varying NOT NULL, + rg_description character varying DEFAULT 'NULL'::character varying, + rg_website character varying(128) DEFAULT 'NULL'::character varying, + rg_recache smallint DEFAULT 1, + rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + rg_type character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_groups OWNER TO augur; + +-- +-- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; + + +-- +-- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; + +-- +-- Name: repo_groups_list_serve; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_groups_list_serve ( + rgls_id bigint DEFAULT nextval('augur_data.repo_groups_list_serve_rgls_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + rgls_name character varying, + rgls_description character varying(3000), + rgls_sponsor character varying, + rgls_email character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_groups_list_serve OWNER TO augur; + +-- +-- Name: repo_info_repo_info_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_info_repo_info_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_info_repo_info_id_seq OWNER TO augur; + +-- +-- Name: repo_info; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_info ( + repo_info_id bigint DEFAULT nextval('augur_data.repo_info_repo_info_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + last_updated timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + issues_enabled character varying, + open_issues integer, + pull_requests_enabled character varying, + wiki_enabled character varying, + pages_enabled character varying, + fork_count integer, + default_branch character varying, + watchers_count integer, + "UUID" integer, + license character varying, + stars_count integer, + committers_count integer, + issue_contributors_count character varying, + changelog_file character varying, + contributing_file character varying, + license_file character varying, + code_of_conduct_file character varying, + security_issue_file character varying, + security_audit_file character varying, + status character varying, + keywords character varying, + commit_count bigint, + issues_count bigint, + issues_closed bigint, + pull_request_count bigint, + pull_requests_open bigint, + pull_requests_closed bigint, + pull_requests_merged bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_info OWNER TO augur; + +-- +-- Name: repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_insights_ri_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_insights_ri_id_seq OWNER TO augur; + +-- +-- Name: repo_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_insights ( + ri_id bigint DEFAULT nextval('augur_data.repo_insights_ri_id_seq'::regclass) NOT NULL, + repo_id bigint, + ri_metric character varying, + ri_value character varying, + ri_date timestamp(0) without time zone, + ri_fresh boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + ri_score numeric, + ri_field character varying, + ri_detection_method character varying +); + + +ALTER TABLE augur_data.repo_insights OWNER TO augur; + +-- +-- Name: TABLE repo_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_insights IS 'This table is output from an analytical worker inside of Augur. It runs through the different metrics on a repository and identifies the five to ten most “interesting” metrics as defined by some kind of delta or other factor. The algorithm is going to evolve. + +Worker Design Notes: The idea is that the "insight worker" will scan through a bunch of active metrics or "synthetic metrics" to list the most important insights. '; + + +-- +-- Name: COLUMN repo_insights.ri_fresh; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights.ri_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; + + +-- +-- Name: repo_insights_records_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_insights_records_ri_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; + +-- +-- Name: repo_insights_records; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_insights_records ( + ri_id bigint DEFAULT nextval('augur_data.repo_insights_records_ri_id_seq'::regclass) NOT NULL, + repo_id bigint, + ri_metric character varying, + ri_field character varying, + ri_value character varying, + ri_date timestamp(6) without time zone, + ri_score double precision, + ri_detection_method character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_insights_records OWNER TO augur; + +-- +-- Name: COLUMN repo_insights_records.ri_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_id IS 'Primary key. '; + + +-- +-- Name: COLUMN repo_insights_records.repo_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.repo_id IS 'Refers to repo table primary key. Will have a foreign key'; + + +-- +-- Name: COLUMN repo_insights_records.ri_metric; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_metric IS 'The metric endpoint'; + + +-- +-- Name: COLUMN repo_insights_records.ri_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_field IS 'The field in the metric endpoint'; + + +-- +-- Name: COLUMN repo_insights_records.ri_value; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_value IS 'The value of the endpoint in ri_field'; + + +-- +-- Name: COLUMN repo_insights_records.ri_date; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_date IS 'The date the insight is for; in other words, some anomaly occurred on this date. '; + + +-- +-- Name: COLUMN repo_insights_records.ri_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_score IS 'A Score, derived from the algorithm used. '; + + +-- +-- Name: COLUMN repo_insights_records.ri_detection_method; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_detection_method IS 'A confidence interval or other expression of the type of threshold and the value of a threshold met in order for it to be "an insight". Example. "95% confidence interval". '; + + +-- +-- Name: COLUMN repo_insights_records.tool_source; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.tool_source IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.tool_version; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.tool_version IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.data_source; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.data_source IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.data_collection_date; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.data_collection_date IS 'Standard Augur Metadata'; + + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; + +-- +-- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_labor ( + repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_clone_date timestamp(0) without time zone, + rl_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + total_lines integer, + code_lines integer, + comment_lines integer, + blank_lines integer, + code_complexity integer, + repo_url character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_labor OWNER TO augur; + +-- +-- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; + + +-- +-- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; + + +-- +-- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_meta_rmeta_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; + +-- +-- Name: repo_meta; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_meta ( + repo_id bigint NOT NULL, + rmeta_id bigint DEFAULT nextval('augur_data.repo_meta_rmeta_id_seq'::regclass) NOT NULL, + rmeta_name character varying, + rmeta_value character varying DEFAULT 0, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_meta OWNER TO augur; + +-- +-- Name: TABLE repo_meta; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_meta IS 'Project Languages'; + + +-- +-- Name: repo_sbom_scans_rsb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; + +-- +-- Name: repo_sbom_scans; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_sbom_scans ( + rsb_id bigint DEFAULT nextval('augur_data.repo_sbom_scans_rsb_id_seq'::regclass) NOT NULL, + repo_id bigint, + sbom_scan json +); + + +ALTER TABLE augur_data.repo_sbom_scans OWNER TO augur; + +-- +-- Name: repo_stats_rstat_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_stats_rstat_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_stats_rstat_id_seq OWNER TO augur; + +-- +-- Name: repo_stats; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_stats ( + repo_id bigint NOT NULL, + rstat_id bigint DEFAULT nextval('augur_data.repo_stats_rstat_id_seq'::regclass) NOT NULL, + rstat_name character varying(400), + rstat_value bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_stats OWNER TO augur; + +-- +-- Name: TABLE repo_stats; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_stats IS 'Project Watchers'; + + +-- +-- Name: repo_test_coverage_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_test_coverage_repo_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; + +-- +-- Name: repo_test_coverage; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_test_coverage ( + repo_id bigint DEFAULT nextval('augur_data.repo_test_coverage_repo_id_seq'::regclass) NOT NULL, + repo_clone_date timestamp(0) without time zone, + rtc_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + testing_tool character varying, + file_statement_count bigint, + file_subroutine_count bigint, + file_statements_tested bigint, + file_subroutines_tested bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_test_coverage OWNER TO augur; + +-- +-- Name: repo_topic_repo_topic_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_topic_repo_topic_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; + +-- +-- Name: repo_topic; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_topic ( + repo_topic_id bigint DEFAULT nextval('augur_data.repo_topic_repo_topic_id_seq'::regclass) NOT NULL, + repo_id bigint, + topic_id integer, + topic_prob double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_topic OWNER TO augur; + +-- +-- Name: repos_fetch_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repos_fetch_log ( + repos_id integer NOT NULL, + status character varying(128) NOT NULL, + date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.repos_fetch_log OWNER TO augur; + +-- +-- Name: settings; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.settings ( + id integer NOT NULL, + setting character varying(32) NOT NULL, + value character varying NOT NULL, + last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.settings OWNER TO augur; + +-- +-- Name: topic_words_topic_words_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.topic_words_topic_words_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.topic_words_topic_words_id_seq OWNER TO augur; + +-- +-- Name: topic_words; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.topic_words ( + topic_words_id bigint DEFAULT nextval('augur_data.topic_words_topic_words_id_seq'::regclass) NOT NULL, + topic_id bigint, + word character varying, + word_prob double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.topic_words OWNER TO augur; + +-- +-- Name: unknown_cache; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.unknown_cache ( + type character varying(10) NOT NULL, + repo_group_id integer NOT NULL, + email character varying(128) NOT NULL, + domain character varying(128) DEFAULT 'NULL'::character varying, + added bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.unknown_cache OWNER TO augur; + +-- +-- Name: unresolved_commit_emails_email_unresolved_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; + +-- +-- Name: unresolved_commit_emails; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.unresolved_commit_emails ( + email_unresolved_id bigint DEFAULT nextval('augur_data.unresolved_commit_emails_email_unresolved_id_seq'::regclass) NOT NULL, + email character varying NOT NULL, + name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.unresolved_commit_emails OWNER TO augur; + +-- +-- Name: utility_log_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.utility_log_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.utility_log_id_seq1 OWNER TO augur; + +-- +-- Name: utility_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.utility_log ( + id bigint DEFAULT nextval('augur_data.utility_log_id_seq1'::regclass) NOT NULL, + level character varying(8) NOT NULL, + status character varying NOT NULL, + attempted timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.utility_log OWNER TO augur; + +-- +-- Name: utility_log_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.utility_log_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.utility_log_id_seq OWNER TO augur; + +-- +-- Name: working_commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.working_commits ( + repos_id integer NOT NULL, + working_commit character varying(40) DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_data.working_commits OWNER TO augur; + +-- +-- Name: affiliations_corp_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.affiliations_corp_id_seq + START WITH 620000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.affiliations_corp_id_seq OWNER TO augur; + +-- +-- Name: all; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations."all" ( + "Name" character varying, + "Bytes" character varying, + "Lines" character varying, + "Code" character varying, + "Comment" character varying, + "Blank" character varying, + "Complexity" character varying, + "Count" character varying, + "WeightedComplexity" character varying, + "Files" character varying +); + + +ALTER TABLE augur_operations."all" OWNER TO augur; + +-- +-- Name: augur_settings_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.augur_settings_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.augur_settings_id_seq OWNER TO augur; + +-- +-- Name: augur_settings; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.augur_settings ( + id bigint DEFAULT nextval('augur_operations.augur_settings_id_seq'::regclass) NOT NULL, + setting character varying, + value character varying, + last_modified timestamp(0) without time zone DEFAULT CURRENT_DATE +); + + +ALTER TABLE augur_operations.augur_settings OWNER TO augur; + +-- +-- Name: TABLE augur_settings; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.augur_settings IS 'Augur settings include the schema version, and the Augur API Key as of 10/25/2020. Future augur settings may be stored in this table, which has the basic structure of a name-value pair. '; + + +-- +-- Name: config; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.config ( + id smallint NOT NULL, + section_name character varying NOT NULL, + setting_name character varying NOT NULL, + value character varying, + type character varying +); + + +ALTER TABLE augur_operations.config OWNER TO augur; + +-- +-- Name: config_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.config_id_seq + AS smallint + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.config_id_seq OWNER TO augur; + +-- +-- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.config_id_seq OWNED BY augur_operations.config.id; + + +-- +-- Name: gh_worker_history_history_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.gh_worker_history_history_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; + +-- +-- Name: repos_fetch_log; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.repos_fetch_log ( + repos_id integer NOT NULL, + status character varying(128) NOT NULL, + date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; + +-- +-- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.users ( + user_id integer NOT NULL, + login_name character varying NOT NULL, + login_hashword character varying NOT NULL, + email character varying NOT NULL, + text_phone character varying, + first_name character varying NOT NULL, + last_name character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + admin boolean NOT NULL +); + + +ALTER TABLE augur_operations.users OWNER TO augur; + +-- +-- Name: users_user_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.users_user_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.users_user_id_seq OWNER TO augur; + +-- +-- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.users_user_id_seq OWNED BY augur_operations.users.user_id; + + +-- +-- Name: worker_history; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_history ( + history_id bigint DEFAULT nextval('augur_operations.gh_worker_history_history_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker character varying(255) NOT NULL, + job_model character varying(255) NOT NULL, + oauth_id integer, + "timestamp" timestamp(0) without time zone NOT NULL, + status character varying(7) NOT NULL, + total_results integer +); + + +ALTER TABLE augur_operations.worker_history OWNER TO augur; + +-- +-- Name: TABLE worker_history; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_history IS 'This table stores the complete history of job execution, including success and failure. It is useful for troubleshooting. '; + + +-- +-- Name: worker_job; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_job ( + job_model character varying(255) NOT NULL, + state integer DEFAULT 0 NOT NULL, + zombie_head integer, + since_id_str character varying(255) DEFAULT '0'::character varying NOT NULL, + description character varying(255) DEFAULT 'None'::character varying, + last_count integer, + last_run timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + analysis_state integer DEFAULT 0, + oauth_id integer NOT NULL +); + + +ALTER TABLE augur_operations.worker_job OWNER TO augur; + +-- +-- Name: TABLE worker_job; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_job IS 'This table stores the jobs workers collect data for. A job is found in the code, and in the augur.config.json under the construct of a “model”. '; + + +-- +-- Name: worker_oauth_oauth_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.worker_oauth_oauth_id_seq + START WITH 1000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; + +-- +-- Name: worker_oauth; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_oauth ( + oauth_id bigint DEFAULT nextval('augur_operations.worker_oauth_oauth_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL, + consumer_key character varying(255) NOT NULL, + consumer_secret character varying(255) NOT NULL, + access_token character varying(255) NOT NULL, + access_token_secret character varying(255) NOT NULL, + repo_directory character varying, + platform character varying DEFAULT 'github'::character varying +); + + +ALTER TABLE augur_operations.worker_oauth OWNER TO augur; + +-- +-- Name: TABLE worker_oauth; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_oauth IS 'This table stores credentials for retrieving data from platform API’s. Entries in this table must comply with the terms of service for each platform. '; + + +-- +-- Name: worker_settings_facade; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_settings_facade ( + id integer NOT NULL, + setting character varying(32) NOT NULL, + value character varying NOT NULL, + last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_operations.worker_settings_facade OWNER TO augur; + +-- +-- Name: TABLE worker_settings_facade; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_settings_facade IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: working_commits; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.working_commits ( + repos_id integer NOT NULL, + working_commit character varying(40) DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_operations.working_commits OWNER TO augur; + +-- +-- Name: TABLE working_commits; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.working_commits IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: alembic_version; Type: TABLE; Schema: public; Owner: augur +-- + +CREATE TABLE public.alembic_version ( + version_num character varying(32) NOT NULL +); + + +ALTER TABLE public.alembic_version OWNER TO augur; + +-- +-- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.annotation_types_annotation_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; + +-- +-- Name: annotation_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.annotation_types ( + annotation_type_id integer DEFAULT nextval('spdx.annotation_types_annotation_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.annotation_types OWNER TO augur; + +-- +-- Name: annotations_annotation_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.annotations_annotation_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.annotations_annotation_id_seq OWNER TO augur; + +-- +-- Name: annotations; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.annotations ( + annotation_id integer DEFAULT nextval('spdx.annotations_annotation_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + annotation_type_id integer NOT NULL, + identifier_id integer NOT NULL, + creator_id integer NOT NULL, + created_ts timestamp(6) with time zone, + comment text NOT NULL +); + + +ALTER TABLE spdx.annotations OWNER TO augur; + +-- +-- Name: augur_repo_map_map_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.augur_repo_map_map_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.augur_repo_map_map_id_seq OWNER TO augur; + +-- +-- Name: augur_repo_map; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.augur_repo_map ( + map_id integer DEFAULT nextval('spdx.augur_repo_map_map_id_seq'::regclass) NOT NULL, + dosocs_pkg_id integer, + dosocs_pkg_name text, + repo_id integer, + repo_path text +); + + +ALTER TABLE spdx.augur_repo_map OWNER TO augur; + +-- +-- Name: creator_types_creator_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.creator_types_creator_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.creator_types_creator_type_id_seq OWNER TO augur; + +-- +-- Name: creator_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.creator_types ( + creator_type_id integer DEFAULT nextval('spdx.creator_types_creator_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.creator_types OWNER TO augur; + +-- +-- Name: creators_creator_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.creators_creator_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.creators_creator_id_seq OWNER TO augur; + +-- +-- Name: creators; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.creators ( + creator_id integer DEFAULT nextval('spdx.creators_creator_id_seq'::regclass) NOT NULL, + creator_type_id integer NOT NULL, + name character varying(255) NOT NULL, + email character varying(255) NOT NULL +); + + +ALTER TABLE spdx.creators OWNER TO augur; + +-- +-- Name: document_namespaces_document_namespace_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.document_namespaces_document_namespace_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; + +-- +-- Name: document_namespaces; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.document_namespaces ( + document_namespace_id integer DEFAULT nextval('spdx.document_namespaces_document_namespace_id_seq'::regclass) NOT NULL, + uri character varying(500) NOT NULL +); + + +ALTER TABLE spdx.document_namespaces OWNER TO augur; + +-- +-- Name: documents_document_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.documents_document_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.documents_document_id_seq OWNER TO augur; + +-- +-- Name: documents; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.documents ( + document_id integer DEFAULT nextval('spdx.documents_document_id_seq'::regclass) NOT NULL, + document_namespace_id integer NOT NULL, + data_license_id integer NOT NULL, + spdx_version character varying(255) NOT NULL, + name character varying(255) NOT NULL, + license_list_version character varying(255) NOT NULL, + created_ts timestamp(6) with time zone NOT NULL, + creator_comment text NOT NULL, + document_comment text NOT NULL, + package_id integer NOT NULL +); + + +ALTER TABLE spdx.documents OWNER TO augur; + +-- +-- Name: documents_creators_document_creator_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.documents_creators_document_creator_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.documents_creators_document_creator_id_seq OWNER TO augur; + +-- +-- Name: documents_creators; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.documents_creators ( + document_creator_id integer DEFAULT nextval('spdx.documents_creators_document_creator_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + creator_id integer NOT NULL +); + + +ALTER TABLE spdx.documents_creators OWNER TO augur; + +-- +-- Name: external_refs_external_ref_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.external_refs_external_ref_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.external_refs_external_ref_id_seq OWNER TO augur; + +-- +-- Name: external_refs; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.external_refs ( + external_ref_id integer DEFAULT nextval('spdx.external_refs_external_ref_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + document_namespace_id integer NOT NULL, + id_string character varying(255) NOT NULL, + sha256 character varying(64) NOT NULL +); + + +ALTER TABLE spdx.external_refs OWNER TO augur; + +-- +-- Name: file_contributors_file_contributor_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.file_contributors_file_contributor_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; + +-- +-- Name: file_contributors; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.file_contributors ( + file_contributor_id integer DEFAULT nextval('spdx.file_contributors_file_contributor_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + contributor text NOT NULL +); + + +ALTER TABLE spdx.file_contributors OWNER TO augur; + +-- +-- Name: file_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.file_types ( + file_type_id integer, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.file_types OWNER TO augur; + +-- +-- Name: file_types_file_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.file_types_file_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.file_types_file_type_id_seq OWNER TO augur; + +-- +-- Name: files_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_file_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_file_id_seq OWNER TO augur; + +-- +-- Name: files; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files ( + file_id integer DEFAULT nextval('spdx.files_file_id_seq'::regclass) NOT NULL, + file_type_id integer, + sha256 character varying(64) NOT NULL, + copyright_text text, + package_id integer, + comment text NOT NULL, + notice text NOT NULL +); + + +ALTER TABLE spdx.files OWNER TO augur; + +-- +-- Name: files_licenses_file_license_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_licenses_file_license_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_licenses_file_license_id_seq OWNER TO augur; + +-- +-- Name: files_licenses; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files_licenses ( + file_license_id integer DEFAULT nextval('spdx.files_licenses_file_license_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + license_id integer NOT NULL, + extracted_text text NOT NULL +); + + +ALTER TABLE spdx.files_licenses OWNER TO augur; + +-- +-- Name: files_scans_file_scan_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_scans_file_scan_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_scans_file_scan_id_seq OWNER TO augur; + +-- +-- Name: files_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files_scans ( + file_scan_id integer DEFAULT nextval('spdx.files_scans_file_scan_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + scanner_id integer NOT NULL +); + + +ALTER TABLE spdx.files_scans OWNER TO augur; + +-- +-- Name: identifiers_identifier_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.identifiers_identifier_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.identifiers_identifier_id_seq OWNER TO augur; + +-- +-- Name: identifiers; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.identifiers ( + identifier_id integer DEFAULT nextval('spdx.identifiers_identifier_id_seq'::regclass) NOT NULL, + document_namespace_id integer NOT NULL, + id_string character varying(255) NOT NULL, + document_id integer, + package_id integer, + package_file_id integer, + CONSTRAINT ck_identifier_exactly_one CHECK ((((((document_id IS NOT NULL))::integer + ((package_id IS NOT NULL))::integer) + ((package_file_id IS NOT NULL))::integer) = 1)) +); + + +ALTER TABLE spdx.identifiers OWNER TO augur; + +-- +-- Name: licenses_license_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.licenses_license_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.licenses_license_id_seq OWNER TO augur; + +-- +-- Name: licenses; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.licenses ( + license_id integer DEFAULT nextval('spdx.licenses_license_id_seq'::regclass) NOT NULL, + name character varying(255), + short_name character varying(255) NOT NULL, + cross_reference text NOT NULL, + comment text NOT NULL, + is_spdx_official boolean NOT NULL +); + + +ALTER TABLE spdx.licenses OWNER TO augur; + +-- +-- Name: packages_package_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_package_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_package_id_seq OWNER TO augur; + +-- +-- Name: packages; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages ( + package_id integer DEFAULT nextval('spdx.packages_package_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL, + version character varying(255) NOT NULL, + file_name text NOT NULL, + supplier_id integer, + originator_id integer, + download_location text, + verification_code character varying(64) NOT NULL, + ver_code_excluded_file_id integer, + sha256 character varying(64), + home_page text, + source_info text NOT NULL, + concluded_license_id integer, + declared_license_id integer, + license_comment text NOT NULL, + copyright_text text, + summary text NOT NULL, + description text NOT NULL, + comment text NOT NULL, + dosocs2_dir_code character varying(64), + CONSTRAINT uc_sha256_ds2_dir_code_exactly_one CHECK (((((sha256 IS NOT NULL))::integer + ((dosocs2_dir_code IS NOT NULL))::integer) = 1)) +); + + +ALTER TABLE spdx.packages OWNER TO augur; + +-- +-- Name: packages_files_package_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_files_package_file_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_files_package_file_id_seq OWNER TO augur; + +-- +-- Name: packages_files; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages_files ( + package_file_id integer DEFAULT nextval('spdx.packages_files_package_file_id_seq'::regclass) NOT NULL, + package_id integer NOT NULL, + file_id integer NOT NULL, + concluded_license_id integer, + license_comment text NOT NULL, + file_name text NOT NULL +); + + +ALTER TABLE spdx.packages_files OWNER TO augur; + +-- +-- Name: packages_scans_package_scan_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_scans_package_scan_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_scans_package_scan_id_seq OWNER TO augur; + +-- +-- Name: packages_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages_scans ( + package_scan_id integer DEFAULT nextval('spdx.packages_scans_package_scan_id_seq'::regclass) NOT NULL, + package_id integer NOT NULL, + scanner_id integer NOT NULL +); + + +ALTER TABLE spdx.packages_scans OWNER TO augur; + +-- +-- Name: projects_package_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.projects_package_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.projects_package_id_seq OWNER TO augur; + +-- +-- Name: projects; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.projects ( + package_id integer DEFAULT nextval('spdx.projects_package_id_seq'::regclass) NOT NULL, + name text NOT NULL, + homepage text NOT NULL, + uri text NOT NULL +); + + +ALTER TABLE spdx.projects OWNER TO augur; + +-- +-- Name: relationship_types_relationship_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.relationship_types_relationship_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; + +-- +-- Name: relationship_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.relationship_types ( + relationship_type_id integer DEFAULT nextval('spdx.relationship_types_relationship_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.relationship_types OWNER TO augur; + +-- +-- Name: relationships_relationship_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.relationships_relationship_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.relationships_relationship_id_seq OWNER TO augur; + +-- +-- Name: relationships; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.relationships ( + relationship_id integer DEFAULT nextval('spdx.relationships_relationship_id_seq'::regclass) NOT NULL, + left_identifier_id integer NOT NULL, + right_identifier_id integer NOT NULL, + relationship_type_id integer NOT NULL, + relationship_comment text NOT NULL +); + + +ALTER TABLE spdx.relationships OWNER TO augur; + +-- +-- Name: sbom_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.sbom_scans ( + repo_id integer, + sbom_scan json +); + + +ALTER TABLE spdx.sbom_scans OWNER TO augur; + +-- +-- Name: scanners_scanner_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.scanners_scanner_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.scanners_scanner_id_seq OWNER TO augur; + +-- +-- Name: scanners; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.scanners ( + scanner_id integer DEFAULT nextval('spdx.scanners_scanner_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.scanners OWNER TO augur; + +-- +-- Name: chaoss_user chaoss_id; Type: DEFAULT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextval('augur_data.chaoss_user_chaoss_id_seq'::regclass); + + +-- +-- Name: config id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config ALTER COLUMN id SET DEFAULT nextval('augur_operations.config_id_seq'::regclass); + + +-- +-- Name: users user_id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users ALTER COLUMN user_id SET DEFAULT nextval('augur_operations.users_user_id_seq'::regclass); + + +-- +-- Data for Name: analysis_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.analysis_log (repos_id, status, date_attempted) FROM stdin; +\. + + +-- +-- Data for Name: chaoss_metric_status; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.chaoss_metric_status (cms_id, cm_group, cm_source, cm_type, cm_backend_status, cm_frontend_status, cm_defined, cm_api_endpoint_repo, cm_api_endpoint_rg, cm_name, cm_working_group, cm_info, tool_source, tool_version, data_source, data_collection_date, cm_working_group_focus_area) FROM stdin; +2 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/issues \N Open Issues growth-maturity-decline "open-issues" Insight Worker 0.0.1 githubapi 2019-06-20 22:41:41 \N +3 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues \N Open Issues growth-maturity-decline "open-issues" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:42:15 \N +4 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/issues/closed \N Closed Issues growth-maturity-decline "closed-issues" Insight Worker 0.0.1 githubapi 2019-06-20 22:45:53 \N +5 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues/closed \N Closed Issues growth-maturity-decline "closed-issues" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:26 \N +6 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues/response_time \N First Response To Issue Duration growth-maturity-decline "first-response-to-issue-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:27 \N +7 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/commits \N Code Commits growth-maturity-decline "code-commits" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:29 \N +8 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/commits \N Code Commits growth-maturity-decline "code-commits" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:30 \N +9 growth-maturity-decline githubapi metric implemented unimplemented t /api/unstable///lines_changed \N Lines Of Code Changed growth-maturity-decline "lines-of-code-changed" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:32 \N +10 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/maintainer_response_time \N Maintainer Response To Merge Request Duration growth-maturity-decline "maintainer-response-to-merge-request-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:33 \N +11 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/code_review_iteration \N Code Review Iteration growth-maturity-decline "code-review-iteration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:35 \N +12 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/forks \N Forks growth-maturity-decline "forks" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:36 \N +13 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls \N Pull Requests Open growth-maturity-decline "pull-requests-open" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:38 \N +14 growth-maturity-decline ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/closed \N Pull Requests Closed growth-maturity-decline "pull-requests-closed" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:39 \N +15 growth-maturity-decline ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/response_time \N Pull Request Comment Duration growth-maturity-decline "pull-request-comment-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:41 \N +16 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/comments \N Pull Request Comments growth-maturity-decline "pull-request-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:42 \N +17 growth-maturity-decline augur_db metric implemented unimplemented t /api/unstable/repo-groups//repos//contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:44 \N +18 growth-maturity-decline githubapi metric implemented unimplemented t /api/unstable///githubapi/contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:45 \N +19 growth-maturity-decline ghtorrent metric implemented implemented t /api/unstable///contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:47 \N +20 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/community_engagement \N Community Engagement growth-maturity-decline "community-engagement" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:48 \N +21 growth-maturity-decline augur_db metric implemented unimplemented t /api/unstable/repo-groups//repos//sub-projects \N Sub Projects growth-maturity-decline "sub-projects" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:50 \N +22 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/contribution_acceptance \N Contribution Acceptance growth-maturity-decline "contribution-acceptance" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:51 \N +23 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//code-changes \N Code Changes experimental "code-changes" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:53 \N +24 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//pull-requests-merge-contributor-new \N Pull Requests Merge Contributor New experimental "pull-requests-merge-contributor-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:55 \N +25 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-first-time-opened \N Issues First Time Opened experimental "issues-first-time-opened" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:56 \N +26 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-first-time-closed \N Issues First Time Closed experimental "issues-first-time-closed" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:58 \N +27 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//contributors-new \N Contributors New experimental "contributors-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:59 \N +28 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//code-changes-lines \N Code Changes Lines experimental "code-changes-lines" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:01 \N +29 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-new \N Issues New experimental "issues-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:02 \N +30 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-closed \N Issues Closed experimental "issues-closed" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:04 \N +31 experimental augur_db metric implemented unimplemented f none \N Issue Duration experimental "issue-duration" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:05 \N +32 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issue-backlog \N Issue Backlog experimental "issue-backlog" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:07 \N +33 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-open-age \N Issues Open Age experimental "issues-open-age" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:08 \N +34 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-closed-resolution-duration \N Issues Closed Resolution Duration experimental "issues-closed-resolution-duration" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:10 \N +35 experimental augur_db metric implemented unimplemented f none \N Lines Changed By Author experimental "lines-changed-by-author" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:11 \N +36 experimental augur_db git implemented unimplemented f /api/unstable/repo-groups \N Repo Groups experimental "repo-groups" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:13 \N +37 experimental augur_db git implemented unimplemented f /api/unstable/repos \N Downloaded Repos experimental "downloaded-repos" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:15 \N +38 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//open-issues-count \N Open Issues Count experimental "closed-issues-count" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:16 \N +39 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//closed-issues-count \N Closed Issues Count experimental "closed-issues-count" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:18 \N +40 experimental augur_db git implemented unimplemented f /api/unstable/repos// \N Get Repo experimental "get-repo" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:19 \N +41 experimental downloads timeseries implemented implemented f /api/unstable///timeseries/downloads \N Downloads experimental "downloads" Insight Worker 0.0.1 downloads 2019-06-20 22:50:21 \N +42 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_closed \N Pull Requests Closed experimental "pull_requests_closed" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:22 \N +43 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_merged \N Pull Requests Merged experimental "pull_requests_merged" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:24 \N +44 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_open \N Pull Requests Open experimental "pull_requests_open" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:25 \N +45 experimental githubapi metric implemented unimplemented t /api/unstable///githubapi/repository_size \N Repository Size experimental "repository-size" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:27 \N +46 experimental githubapi metric implemented implemented t /api/unstable///bus_factor \N Bus Factor experimental "bus-factor" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:28 \N +47 experimental githubapi timeseries implemented implemented f /api/unstable///timeseries/tags/major \N Major Tags experimental "major-tags" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:30 \N +48 experimental githubapi timeseries implemented implemented f /api/unstable///timeseries/tags \N Tags experimental "tags" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:31 \N +49 experimental facade git implemented unimplemented f /api/unstable/git/repos \N Downloaded Repos experimental "downloaded-repos" Insight Worker 0.0.1 facade 2019-06-20 22:50:33 \N +50 experimental facade git implemented implemented f /api/unstable/git/changes_by_author \N Lines Changed By Author experimental "lines-changed-by-author" Insight Worker 0.0.1 facade 2019-06-20 22:50:35 \N +51 experimental facade git implemented unimplemented f /api/unstable/git/lines_changed_by_week \N Lines Changed By Week experimental "lines-changed-by-week" Insight Worker 0.0.1 facade 2019-06-20 22:50:36 \N +52 experimental facade git implemented unimplemented f /api/unstable/git/lines_changed_by_month \N Lines Changed By Month experimental "lines-changed-by-month" Insight Worker 0.0.1 facade 2019-06-20 22:50:38 \N +53 experimental facade git implemented unimplemented f /api/unstable/git/commits_by_week \N Commits By Week experimental "commits-by-week" Insight Worker 0.0.1 facade 2019-06-20 22:50:40 \N +54 experimental facade git implemented implemented f /api/unstable/git/facade_project \N Facade Project experimental "facade-project" Insight Worker 0.0.1 facade 2019-06-20 22:50:41 \N +55 experimental facade metric implemented unimplemented f none \N Annual Commit Count Ranked By New Repo In Repo Group experimental "annual-commit-count-ranked-by-new-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:43 \N +56 experimental facade metric implemented unimplemented f none \N Annual Lines Of Code Count Ranked By New Repo In Repo Group experimental "annual-lines-of-code-count-ranked-by-new-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:44 \N +57 experimental facade metric implemented unimplemented f none \N Annual Commit Count Ranked By Repo In Repo Group experimental "annual-commit-count-ranked-by-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:46 \N +58 experimental facade metric implemented unimplemented f none \N Annual Lines Of Code Count Ranked By Repo In Repo Group experimental "annual-lines-of-code-count-ranked-by-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:48 \N +59 experimental facade metric implemented unimplemented f none \N Lines Of Code Commit Counts By Calendar Year Grouped experimental "lines-of-code-commit-counts-by-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:49 \N +60 experimental facade metric implemented unimplemented f none \N Unaffiliated Contributors Lines Of Code Commit Counts By Calendar Year Grouped experimental "unaffiliated-contributors-lines-of-code-commit-counts-by-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:51 \N +61 experimental facade metric implemented unimplemented f none \N Repo Group Lines Of Code Commit Counts Calendar Year Grouped experimental "repo-group-lines-of-code-commit-counts-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:52 \N +62 experimental ghtorrent metric implemented implemented f /api/unstable///contributing_github_organizations \N Contributing Github Organizations experimental "contributing-github-organizations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:54 \N +63 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/new_contributing_github_organizations \N New Contributing Github Organizations experimental "new-contributing-github-organizations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:56 \N +64 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issue_comments \N Issue Comments experimental "issue-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:57 \N +65 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/made_closed \N Pull Requests Made Closed experimental "pull-requests-made-closed" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:59 \N +66 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/watchers \N Watchers experimental "watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:00 \N +67 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/commits100 \N Commits100 experimental "commits100" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:02 \N +68 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/commits/comments \N Commit Comments experimental "commit-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:03 \N +69 experimental ghtorrent metric implemented implemented f /api/unstable///committer_locations \N Committer Locations experimental "committer-locations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:05 \N +70 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/total_committers \N Total Committers experimental "total-committers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:07 \N +71 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/issues/activity \N Issue Activity experimental "issue-activity" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:08 \N +72 experimental ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/acceptance_rate \N Pull Request Acceptance Rate experimental "pull-request-acceptance-rate" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:10 \N +73 experimental ghtorrent metric implemented implemented f /api/unstable///community_age \N Community Age experimental "community-age" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:11 \N +74 experimental ghtorrent metric implemented unimplemented f /api/unstable///timeseries/contributions \N Contributions experimental "contributions" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:13 \N +75 experimental ghtorrent metric implemented implemented f /api/unstable///project_age \N Project Age experimental "project-age" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:14 \N +76 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/fakes \N Fakes experimental "fakes" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:16 \N +77 experimental ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/total_watchers \N Total Watchers experimental "total-watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:18 \N +78 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/new_watchers \N New Watchers experimental "new-watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:19 \N +79 experimental librariesio metric implemented implemented f /api/unstable///dependencies \N Dependencies experimental "dependencies" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:21 \N +80 experimental librariesio metric implemented implemented f /api/unstable///dependency_stats \N Dependency Stats experimental "dependency-stats" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:23 \N +81 experimental librariesio metric implemented implemented f /api/unstable///dependents \N Dependents experimental "dependents" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:25 \N +\. + + +-- +-- Data for Name: chaoss_user; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.chaoss_user (chaoss_id, chaoss_login_name, chaoss_login_hashword, chaoss_email, chaoss_text_phone, chaoss_first_name, chaoss_last_name, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commit_comment_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commit_comment_ref (cmt_comment_id, cmt_id, repo_id, msg_id, user_id, body, line, "position", commit_comment_src_node_id, cmt_comment_src_id, created_at, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commit_parents; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commit_parents (cmt_id, parent_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commits (cmt_id, repo_id, cmt_commit_hash, cmt_author_name, cmt_author_raw_email, cmt_author_email, cmt_author_date, cmt_author_affiliation, cmt_committer_name, cmt_committer_raw_email, cmt_committer_email, cmt_committer_date, cmt_committer_affiliation, cmt_added, cmt_removed, cmt_whitespace, cmt_filename, cmt_date_attempted, cmt_ght_committer_id, cmt_ght_committed_at, cmt_committer_timestamp, cmt_author_timestamp, cmt_author_platform_username, tool_source, tool_version, data_source, data_collection_date, cmt_ght_author_id) FROM stdin; +\. + + +-- +-- Data for Name: contributor_affiliations; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributor_affiliations (ca_id, ca_domain, ca_start_date, ca_last_used, ca_affiliation, ca_active, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 samsung.com 1970-01-01 2018-08-01 18:37:54 Samsung 1 load 1.0 load 1970-01-01 00:00:00 +2 linuxfoundation.org 1970-01-01 2018-08-01 18:37:54 Linux Foundation 1 load 1.0 load 1970-01-01 00:00:00 +3 ibm.com 1970-01-01 2018-08-01 18:37:54 IBM 1 load 1.0 load 1970-01-01 00:00:00 +8 walmart.com 1970-01-01 2018-09-01 06:00:00 Walmart 1 load 1.0 load 1970-01-01 00:00:00 +9 exxonmobil.com 1970-01-01 2018-09-01 06:00:00 Exxon Mobil 1 load 1.0 load 1970-01-01 00:00:00 +10 ge.com 1970-01-01 2018-09-01 06:00:00 General Electric 1 load 1.0 load 1970-01-01 00:00:00 +11 dupont.com 1970-01-01 2018-09-01 06:00:00 DuPont 1 load 1.0 load 1970-01-01 00:00:00 +12 avnet.com 1970-01-01 2018-09-01 06:00:00 Avnet 1 load 1.0 load 1970-01-01 00:00:00 +13 macysinc.com 1970-01-01 2018-09-01 06:00:00 Macys 1 load 1.0 load 1970-01-01 00:00:00 +14 enterpriseproducts.com 1970-01-01 2018-09-01 06:00:00 Enterprise Products Partners 1 load 1.0 load 1970-01-01 00:00:00 +15 travelers.com 1970-01-01 2018-09-01 06:00:00 Travelers Cos. 1 load 1.0 load 1970-01-01 00:00:00 +16 pmi.com 1970-01-01 2018-09-01 06:00:00 Philip Morris International 1 load 1.0 load 1970-01-01 00:00:00 +17 riteaid.com 1970-01-01 2018-09-01 06:00:00 Rite Aid 1 load 1.0 load 1970-01-01 00:00:00 +18 techdata.com 1970-01-01 2018-09-01 06:00:00 Tech Data 1 load 1.0 load 1970-01-01 00:00:00 +25156 pivotal.io 1970-01-01 2020-03-25 00:30:57 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:30:57 +25157 vmware.com 1970-01-01 2020-03-25 00:33:35 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:33:35 +25158 rabbitmq.com 1970-01-01 2020-03-25 00:33:43 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:33:43 +25161 pivotallabs.com 1970-01-01 2020-03-25 00:43:53 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:43:53 +25162 cloudcredo.com 1970-01-01 2020-03-25 00:44:18 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:18 +25163 gopivotal.com 1970-01-01 2020-03-25 00:44:25 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:25 +25164 heptio.com 1970-01-01 2020-03-25 00:44:32 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:32 +19 aboutmcdonalds.com 1970-01-01 2018-09-01 06:00:00 McDonalds 1 load 1.0 load 1970-01-01 00:00:00 +20 qualcomm.com 1970-01-01 2018-09-01 06:00:00 Qualcomm 1 load 1.0 load 1970-01-01 00:00:00 +21 amerisourcebergen.com 1970-01-01 2018-09-01 06:00:00 AmerisourceBergen 1 load 1.0 load 1970-01-01 00:00:00 +22 searsholdings.com 1970-01-01 2018-09-01 06:00:00 Sears Holdings 1 load 1.0 load 1970-01-01 00:00:00 +23 capitalone.com 1970-01-01 2018-09-01 06:00:00 Capital One Financial 1 load 1.0 load 1970-01-01 00:00:00 +24 emc.com 1970-01-01 2018-09-01 06:00:00 EMC 1 load 1.0 load 1970-01-01 00:00:00 +25 usaa.com 1970-01-01 2018-09-01 06:00:00 USAA 1 load 1.0 load 1970-01-01 00:00:00 +26 duke-energy.com 1970-01-01 2018-09-01 06:00:00 Duke Energy 1 load 1.0 load 1970-01-01 00:00:00 +27 twc.com 1970-01-01 2018-09-01 06:00:00 Time Warner Cable 1 load 1.0 load 1970-01-01 00:00:00 +28 halliburton.com 1970-01-01 2018-09-01 06:00:00 Halliburton 1 load 1.0 load 1970-01-01 00:00:00 +29 northropgrumman.com 1970-01-01 2018-09-01 06:00:00 Northrop Grumman 1 load 1.0 load 1970-01-01 00:00:00 +30 arrow.com 1970-01-01 2018-09-01 06:00:00 Arrow Electronics 1 load 1.0 load 1970-01-01 00:00:00 +31 raytheon.com 1970-01-01 2018-09-01 06:00:00 Raytheon 1 load 1.0 load 1970-01-01 00:00:00 +32 verizon.com 1970-01-01 2018-09-01 06:00:00 Verizon 1 load 1.0 load 1970-01-01 00:00:00 +33 plainsallamerican.com 1970-01-01 2018-09-01 06:00:00 Plains GP Holdings 1 load 1.0 load 1970-01-01 00:00:00 +34 usfoods.com 1970-01-01 2018-09-01 06:00:00 US Foods 1 load 1.0 load 1970-01-01 00:00:00 +35 abbvie.com 1970-01-01 2018-09-01 06:00:00 AbbVie 1 load 1.0 load 1970-01-01 00:00:00 +36 centene.com 1970-01-01 2018-09-01 06:00:00 Centene 1 load 1.0 load 1970-01-01 00:00:00 +37 chs.net 1970-01-01 2018-09-01 06:00:00 Community Health Systems 1 load 1.0 load 1970-01-01 00:00:00 +38 arconic.com 1970-01-01 2018-09-01 06:00:00 Arconic 1 load 1.0 load 1970-01-01 00:00:00 +39 internationalpaper.com 1970-01-01 2018-09-01 06:00:00 International Paper 1 load 1.0 load 1970-01-01 00:00:00 +40 emerson.com 1970-01-01 2018-09-01 06:00:00 Emerson Electric 1 load 1.0 load 1970-01-01 00:00:00 +41 up.com 1970-01-01 2018-09-01 06:00:00 Union Pacific 1 load 1.0 load 1970-01-01 00:00:00 +42 amgen.com 1970-01-01 2018-09-01 06:00:00 Amgen 1 load 1.0 load 1970-01-01 00:00:00 +43 chevron.com 1970-01-01 2018-09-01 06:00:00 Chevron 1 load 1.0 load 1970-01-01 00:00:00 +44 usbank.com 1970-01-01 2018-09-01 06:00:00 U.S. Bancorp 1 load 1.0 load 1970-01-01 00:00:00 +45 staples.com 1970-01-01 2018-09-01 06:00:00 Staples 1 load 1.0 load 1970-01-01 00:00:00 +46 danaher.com 1970-01-01 2018-09-01 06:00:00 Danaher 1 load 1.0 load 1970-01-01 00:00:00 +47 whirlpoolcorp.com 1970-01-01 2018-09-01 06:00:00 Whirlpool 1 load 1.0 load 1970-01-01 00:00:00 +48 aflac.com 1970-01-01 2018-09-01 06:00:00 Aflac 1 load 1.0 load 1970-01-01 00:00:00 +49 autonation.com 1970-01-01 2018-09-01 06:00:00 AutoNation 1 load 1.0 load 1970-01-01 00:00:00 +50 progressive.com 1970-01-01 2018-09-01 06:00:00 Progressive 1 load 1.0 load 1970-01-01 00:00:00 +51 abbott.com 1970-01-01 2018-09-01 06:00:00 Abbott Laboratories 1 load 1.0 load 1970-01-01 00:00:00 +52 dollargeneral.com 1970-01-01 2018-09-01 06:00:00 Dollar General 1 load 1.0 load 1970-01-01 00:00:00 +53 tenethealth.com 1970-01-01 2018-09-01 06:00:00 Tenet Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +54 costco.com 1970-01-01 2018-09-01 06:00:00 Costco 1 load 1.0 load 1970-01-01 00:00:00 +55 lilly.com 1970-01-01 2018-09-01 06:00:00 Eli Lilly 1 load 1.0 load 1970-01-01 00:00:00 +56 southwest.com 1970-01-01 2018-09-01 06:00:00 Southwest Airlines 1 load 1.0 load 1970-01-01 00:00:00 +57 penskeautomotive.com 1970-01-01 2018-09-01 06:00:00 Penske Automotive Group 1 load 1.0 load 1970-01-01 00:00:00 +58 manpowergroup.com 1970-01-01 2018-09-01 06:00:00 ManpowerGroup 1 load 1.0 load 1970-01-01 00:00:00 +59 kohlscorporation.com 1970-01-01 2018-09-01 06:00:00 Kohls 1 load 1.0 load 1970-01-01 00:00:00 +60 starbucks.com 1970-01-01 2018-09-01 06:00:00 Starbucks 1 load 1.0 load 1970-01-01 00:00:00 +61 paccar.com 1970-01-01 2018-09-01 06:00:00 Paccar 1 load 1.0 load 1970-01-01 00:00:00 +62 cummins.com 1970-01-01 2018-09-01 06:00:00 Cummins 1 load 1.0 load 1970-01-01 00:00:00 +63 altria.com 1970-01-01 2018-09-01 06:00:00 Altria Group 1 load 1.0 load 1970-01-01 00:00:00 +64 xerox.com 1970-01-01 2018-09-01 06:00:00 Xerox 1 load 1.0 load 1970-01-01 00:00:00 +65 fanniemae.com 1970-01-01 2018-09-01 06:00:00 Fannie Mae 1 load 1.0 load 1970-01-01 00:00:00 +66 kimberly-clark.com 1970-01-01 2018-09-01 06:00:00 Kimberly-Clark 1 load 1.0 load 1970-01-01 00:00:00 +67 thehartford.com 1970-01-01 2018-09-01 06:00:00 Hartford Financial Services Group 1 load 1.0 load 1970-01-01 00:00:00 +68 kraftheinzcompany.com 1970-01-01 2018-09-01 06:00:00 Kraft Heinz 1 load 1.0 load 1970-01-01 00:00:00 +69 lear.com 1970-01-01 2018-09-01 06:00:00 Lear 1 load 1.0 load 1970-01-01 00:00:00 +70 fluor.com 1970-01-01 2018-09-01 06:00:00 Fluor 1 load 1.0 load 1970-01-01 00:00:00 +71 aecom.com 1970-01-01 2018-09-01 06:00:00 AECOM 1 load 1.0 load 1970-01-01 00:00:00 +72 facebook.com 1970-01-01 2018-09-01 06:00:00 Facebook 1 load 1.0 load 1970-01-01 00:00:00 +73 jabil.com 1970-01-01 2018-09-01 06:00:00 Jabil Circuit 1 load 1.0 load 1970-01-01 00:00:00 +74 centurylink.com 1970-01-01 2018-09-01 06:00:00 CenturyLink 1 load 1.0 load 1970-01-01 00:00:00 +75 supervalu.com 1970-01-01 2018-09-01 06:00:00 Supervalu 1 load 1.0 load 1970-01-01 00:00:00 +76 thekrogerco.com 1970-01-01 2018-09-01 06:00:00 Kroger 1 load 1.0 load 1970-01-01 00:00:00 +77 generalmills.com 1970-01-01 2018-09-01 06:00:00 General Mills 1 load 1.0 load 1970-01-01 00:00:00 +78 southerncompany.com 1970-01-01 2018-09-01 06:00:00 Southern 1 load 1.0 load 1970-01-01 00:00:00 +79 nexteraenergy.com 1970-01-01 2018-09-01 06:00:00 NextEra Energy 1 load 1.0 load 1970-01-01 00:00:00 +80 thermofisher.com 1970-01-01 2018-09-01 06:00:00 Thermo Fisher Scientific 1 load 1.0 load 1970-01-01 00:00:00 +81 aep.com 1970-01-01 2018-09-01 06:00:00 American Electric Power 1 load 1.0 load 1970-01-01 00:00:00 +82 pge.com 1970-01-01 2018-09-01 06:00:00 PG&E Corp. 1 load 1.0 load 1970-01-01 00:00:00 +83 nglenergypartners.com 1970-01-01 2018-09-01 06:00:00 NGL Energy Partners 1 load 1.0 load 1970-01-01 00:00:00 +84 bms.com 1970-01-01 2018-09-01 06:00:00 Bristol-Myers Squibb 1 load 1.0 load 1970-01-01 00:00:00 +85 goodyear.com 1970-01-01 2018-09-01 06:00:00 Goodyear Tire & Rubber 1 load 1.0 load 1970-01-01 00:00:00 +86 nucor.com 1970-01-01 2018-09-01 06:00:00 Nucor 1 load 1.0 load 1970-01-01 00:00:00 +87 amazon.com 1970-01-01 2018-09-01 06:00:00 Amazon.com 1 load 1.0 load 1970-01-01 00:00:00 +88 pnc.com 1970-01-01 2018-09-01 06:00:00 PNC Financial Services Group 1 load 1.0 load 1970-01-01 00:00:00 +89 healthnet.com 1970-01-01 2018-09-01 06:00:00 Health Net 1 load 1.0 load 1970-01-01 00:00:00 +90 micron.com 1970-01-01 2018-09-01 06:00:00 Micron Technology 1 load 1.0 load 1970-01-01 00:00:00 +91 colgatepalmolive.com 1970-01-01 2018-09-01 06:00:00 Colgate-Palmolive 1 load 1.0 load 1970-01-01 00:00:00 +92 fcx.com 1970-01-01 2018-09-01 06:00:00 Freeport-McMoRan 1 load 1.0 load 1970-01-01 00:00:00 +93 conagrafoods.com 1970-01-01 2018-09-01 06:00:00 ConAgra Foods 1 load 1.0 load 1970-01-01 00:00:00 +94 gapinc.com 1970-01-01 2018-09-01 06:00:00 Gap 1 load 1.0 load 1970-01-01 00:00:00 +95 bakerhughes.com 1970-01-01 2018-09-01 06:00:00 Baker Hughes 1 load 1.0 load 1970-01-01 00:00:00 +96 bnymellon.com 1970-01-01 2018-09-01 06:00:00 Bank of New York Mellon Corp. 1 load 1.0 load 1970-01-01 00:00:00 +97 dollartree.com 1970-01-01 2018-09-01 06:00:00 Dollar Tree 1 load 1.0 load 1970-01-01 00:00:00 +98 walgreensbootsalliance.com 1970-01-01 2018-09-01 06:00:00 Walgreens 1 load 1.0 load 1970-01-01 00:00:00 +99 wholefoodsmarket.com 1970-01-01 2018-09-01 06:00:00 Whole Foods Market 1 load 1.0 load 1970-01-01 00:00:00 +100 ppg.com 1970-01-01 2018-09-01 06:00:00 PPG Industries 1 load 1.0 load 1970-01-01 00:00:00 +101 genpt.com 1970-01-01 2018-09-01 06:00:00 Genuine Parts 1 load 1.0 load 1970-01-01 00:00:00 +102 ielp.com 1970-01-01 2018-09-01 06:00:00 Icahn Enterprises 1 load 1.0 load 1970-01-01 00:00:00 +103 pfgc.com 1970-01-01 2018-09-01 06:00:00 Performance Food Group 1 load 1.0 load 1970-01-01 00:00:00 +104 omnicomgroup.com 1970-01-01 2018-09-01 06:00:00 Omnicom Group 1 load 1.0 load 1970-01-01 00:00:00 +105 dish.com 1970-01-01 2018-09-01 06:00:00 DISH Network 1 load 1.0 load 1970-01-01 00:00:00 +106 firstenergycorp.com 1970-01-01 2018-09-01 06:00:00 FirstEnergy 1 load 1.0 load 1970-01-01 00:00:00 +107 monsanto.com 1970-01-01 2018-09-01 06:00:00 Monsanto 1 load 1.0 load 1970-01-01 00:00:00 +108 aes.com 1970-01-01 2018-09-01 06:00:00 AES 1 load 1.0 load 1970-01-01 00:00:00 +109 hp.com 1970-01-01 2018-09-01 06:00:00 HP 1 load 1.0 load 1970-01-01 00:00:00 +110 carmax.com 1970-01-01 2018-09-01 06:00:00 CarMax 1 load 1.0 load 1970-01-01 00:00:00 +111 nov.com 1970-01-01 2018-09-01 06:00:00 National Oilwell Varco 1 load 1.0 load 1970-01-01 00:00:00 +112 nrgenergy.com 1970-01-01 2018-09-01 06:00:00 NRG Energy 1 load 1.0 load 1970-01-01 00:00:00 +113 westerndigital.com 1970-01-01 2018-09-01 06:00:00 Western Digital 1 load 1.0 load 1970-01-01 00:00:00 +114 marriott.com 1970-01-01 2018-09-01 06:00:00 Marriott International 1 load 1.0 load 1970-01-01 00:00:00 +115 officedepot.com 1970-01-01 2018-09-01 06:00:00 Office Depot 1 load 1.0 load 1970-01-01 00:00:00 +116 nordstrom.com 1970-01-01 2018-09-01 06:00:00 Nordstrom 1 load 1.0 load 1970-01-01 00:00:00 +117 kindermorgan.com 1970-01-01 2018-09-01 06:00:00 Kinder Morgan 1 load 1.0 load 1970-01-01 00:00:00 +118 aramark.com 1970-01-01 2018-09-01 06:00:00 Aramark 1 load 1.0 load 1970-01-01 00:00:00 +119 davita.com 1970-01-01 2018-09-01 06:00:00 DaVita 1 load 1.0 load 1970-01-01 00:00:00 +120 apple.com 1970-01-01 2018-09-01 06:00:00 Apple 1 load 1.0 load 1970-01-01 00:00:00 +121 cardinal.com 1970-01-01 2018-09-01 06:00:00 Cardinal Health 1 load 1.0 load 1970-01-01 00:00:00 +122 molinahealthcare.com 1970-01-01 2018-09-01 06:00:00 Molina Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +123 wellcare.com 1970-01-01 2018-09-01 06:00:00 WellCare Health Plans 1 load 1.0 load 1970-01-01 00:00:00 +124 cbscorporation.com 1970-01-01 2018-09-01 06:00:00 CBS 1 load 1.0 load 1970-01-01 00:00:00 +125 visa.com 1970-01-01 2018-09-01 06:00:00 Visa 1 load 1.0 load 1970-01-01 00:00:00 +126 lfg.com 1970-01-01 2018-09-01 06:00:00 Lincoln National 1 load 1.0 load 1970-01-01 00:00:00 +127 ecolab.com 1970-01-01 2018-09-01 06:00:00 Ecolab 1 load 1.0 load 1970-01-01 00:00:00 +128 kelloggcompany.com 1970-01-01 2018-09-01 06:00:00 Kellogg 1 load 1.0 load 1970-01-01 00:00:00 +129 chrobinson.com 1970-01-01 2018-09-01 06:00:00 C.H. Robinson Worldwide 1 load 1.0 load 1970-01-01 00:00:00 +130 textron.com 1970-01-01 2018-09-01 06:00:00 Textron 1 load 1.0 load 1970-01-01 00:00:00 +131 loews.com 1970-01-01 2018-09-01 06:00:00 Loews 1 load 1.0 load 1970-01-01 00:00:00 +132 express-scripts.com 1970-01-01 2018-09-01 06:00:00 Express Scripts Holding 1 load 1.0 load 1970-01-01 00:00:00 +133 itw.com 1970-01-01 2018-09-01 06:00:00 Illinois Tool Works 1 load 1.0 load 1970-01-01 00:00:00 +134 synnex.com 1970-01-01 2018-09-01 06:00:00 Synnex 1 load 1.0 load 1970-01-01 00:00:00 +135 viacom.com 1970-01-01 2018-09-01 06:00:00 Viacom 1 load 1.0 load 1970-01-01 00:00:00 +136 hollyfrontier.com 1970-01-01 2018-09-01 06:00:00 HollyFrontier 1 load 1.0 load 1970-01-01 00:00:00 +137 landolakesinc.com 1970-01-01 2018-09-01 06:00:00 Land O Lakes 1 load 1.0 load 1970-01-01 00:00:00 +138 devonenergy.com 1970-01-01 2018-09-01 06:00:00 Devon Energy 1 load 1.0 load 1970-01-01 00:00:00 +139 pbfenergy.com 1970-01-01 2018-09-01 06:00:00 PBF Energy 1 load 1.0 load 1970-01-01 00:00:00 +140 yum.com 1970-01-01 2018-09-01 06:00:00 Yum Brands 1 load 1.0 load 1970-01-01 00:00:00 +141 ti.com 1970-01-01 2018-09-01 06:00:00 Texas Instruments 1 load 1.0 load 1970-01-01 00:00:00 +142 cdw.com 1970-01-01 2018-09-01 06:00:00 CDW 1 load 1.0 load 1970-01-01 00:00:00 +143 jpmorganchase.com 1970-01-01 2018-09-01 06:00:00 J.P. Morgan Chase 1 load 1.0 load 1970-01-01 00:00:00 +144 wm.com 1970-01-01 2018-09-01 06:00:00 Waste Management 1 load 1.0 load 1970-01-01 00:00:00 +145 mmc.com 1970-01-01 2018-09-01 06:00:00 Marsh & McLennan 1 load 1.0 load 1970-01-01 00:00:00 +146 chk.com 1970-01-01 2018-09-01 06:00:00 Chesapeake Energy 1 load 1.0 load 1970-01-01 00:00:00 +147 parker.com 1970-01-01 2018-09-01 06:00:00 Parker-Hannifin 1 load 1.0 load 1970-01-01 00:00:00 +148 oxy.com 1970-01-01 2018-09-01 06:00:00 Occidental Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +149 guardianlife.com 1970-01-01 2018-09-01 06:00:00 Guardian Life Ins. Co. of America 1 load 1.0 load 1970-01-01 00:00:00 +150 farmers.com 1970-01-01 2018-09-01 06:00:00 Farmers Insurance Exchange 1 load 1.0 load 1970-01-01 00:00:00 +151 jcpenney.com 1970-01-01 2018-09-01 06:00:00 J.C. Penney 1 load 1.0 load 1970-01-01 00:00:00 +152 conedison.com 1970-01-01 2018-09-01 06:00:00 Consolidated Edison 1 load 1.0 load 1970-01-01 00:00:00 +153 cognizant.com 1970-01-01 2018-09-01 06:00:00 Cognizant Technology Solutions 1 load 1.0 load 1970-01-01 00:00:00 +154 boeing.com 1970-01-01 2018-09-01 06:00:00 Boeing 1 load 1.0 load 1970-01-01 00:00:00 +155 vfc.com 1970-01-01 2018-09-01 06:00:00 VF 1 load 1.0 load 1970-01-01 00:00:00 +156 ameriprise.com 1970-01-01 2018-09-01 06:00:00 Ameriprise Financial 1 load 1.0 load 1970-01-01 00:00:00 +157 csc.com 1970-01-01 2018-09-01 06:00:00 Computer Sciences 1 load 1.0 load 1970-01-01 00:00:00 +158 lb.com 1970-01-01 2018-09-01 06:00:00 L Brands 1 load 1.0 load 1970-01-01 00:00:00 +159 jacobs.com 1970-01-01 2018-09-01 06:00:00 Jacobs Engineering Group 1 load 1.0 load 1970-01-01 00:00:00 +160 principal.com 1970-01-01 2018-09-01 06:00:00 Principal Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +161 rossstores.com 1970-01-01 2018-09-01 06:00:00 Ross Stores 1 load 1.0 load 1970-01-01 00:00:00 +162 bedbathandbeyond.com 1970-01-01 2018-09-01 06:00:00 Bed Bath & Beyond 1 load 1.0 load 1970-01-01 00:00:00 +163 csx.com 1970-01-01 2018-09-01 06:00:00 CSX 1 load 1.0 load 1970-01-01 00:00:00 +164 toysrusinc.com 1970-01-01 2018-09-01 06:00:00 Toys \\"R\\" Us 1 load 1.0 load 1970-01-01 00:00:00 +165 microsoft.com 1970-01-01 2018-09-01 06:00:00 Microsoft 1 load 1.0 load 1970-01-01 00:00:00 +166 sands.com 1970-01-01 2018-09-01 06:00:00 Las Vegas Sands 1 load 1.0 load 1970-01-01 00:00:00 +167 leucadia.com 1970-01-01 2018-09-01 06:00:00 Leucadia National 1 load 1.0 load 1970-01-01 00:00:00 +168 dom.com 1970-01-01 2018-09-01 06:00:00 Dominion Resources 1 load 1.0 load 1970-01-01 00:00:00 +169 ussteel.com 1970-01-01 2018-09-01 06:00:00 United States Steel 1 load 1.0 load 1970-01-01 00:00:00 +170 l-3com.com 1970-01-01 2018-09-01 06:00:00 L-3 Communications 1 load 1.0 load 1970-01-01 00:00:00 +171 edisoninvestor.com 1970-01-01 2018-09-01 06:00:00 Edison International 1 load 1.0 load 1970-01-01 00:00:00 +172 entergy.com 1970-01-01 2018-09-01 06:00:00 Entergy 1 load 1.0 load 1970-01-01 00:00:00 +173 adp.com 1970-01-01 2018-09-01 06:00:00 ADP 1 load 1.0 load 1970-01-01 00:00:00 +174 firstdata.com 1970-01-01 2018-09-01 06:00:00 First Data 1 load 1.0 load 1970-01-01 00:00:00 +175 blackrock.com 1970-01-01 2018-09-01 06:00:00 BlackRock 1 load 1.0 load 1970-01-01 00:00:00 +176 bankofamerica.com 1970-01-01 2018-09-01 06:00:00 Bank of America Corp. 1 load 1.0 load 1970-01-01 00:00:00 +177 westrock.com 1970-01-01 2018-09-01 06:00:00 WestRock 1 load 1.0 load 1970-01-01 00:00:00 +178 voya.com 1970-01-01 2018-09-01 06:00:00 Voya Financial 1 load 1.0 load 1970-01-01 00:00:00 +179 sherwin.com 1970-01-01 2018-09-01 06:00:00 Sherwin-Williams 1 load 1.0 load 1970-01-01 00:00:00 +180 hiltonworldwide.com 1970-01-01 2018-09-01 06:00:00 Hilton Worldwide Holdings 1 load 1.0 load 1970-01-01 00:00:00 +181 rrdonnelley.com 1970-01-01 2018-09-01 06:00:00 R.R. Donnelley & Sons 1 load 1.0 load 1970-01-01 00:00:00 +182 stanleyblackanddecker.com 1970-01-01 2018-09-01 06:00:00 Stanley Black & Decker 1 load 1.0 load 1970-01-01 00:00:00 +183 xcelenergy.com 1970-01-01 2018-09-01 06:00:00 Xcel Energy 1 load 1.0 load 1970-01-01 00:00:00 +184 corporate.murphyusa.com 1970-01-01 2018-09-01 06:00:00 Murphy USA 1 load 1.0 load 1970-01-01 00:00:00 +185 cbre.com 1970-01-01 2018-09-01 06:00:00 CBRE Group 1 load 1.0 load 1970-01-01 00:00:00 +186 drhorton.com 1970-01-01 2018-09-01 06:00:00 D.R. Horton 1 load 1.0 load 1970-01-01 00:00:00 +187 wellsfargo.com 1970-01-01 2018-09-01 06:00:00 Wells Fargo 1 load 1.0 load 1970-01-01 00:00:00 +188 elcompanies.com 1970-01-01 2018-09-01 06:00:00 Estee Lauder 1 load 1.0 load 1970-01-01 00:00:00 +189 praxair.com 1970-01-01 2018-09-01 06:00:00 Praxair 1 load 1.0 load 1970-01-01 00:00:00 +190 biogen.com 1970-01-01 2018-09-01 06:00:00 Biogen 1 load 1.0 load 1970-01-01 00:00:00 +191 statestreet.com 1970-01-01 2018-09-01 06:00:00 State Street Corp. 1 load 1.0 load 1970-01-01 00:00:00 +192 unum.com 1970-01-01 2018-09-01 06:00:00 Unum Group 1 load 1.0 load 1970-01-01 00:00:00 +193 reynoldsamerican.com 1970-01-01 2018-09-01 06:00:00 Reynolds American 1 load 1.0 load 1970-01-01 00:00:00 +194 group1auto.com 1970-01-01 2018-09-01 06:00:00 Group 1 Automotive 1 load 1.0 load 1970-01-01 00:00:00 +195 henryschein.com 1970-01-01 2018-09-01 06:00:00 Henry Schein 1 load 1.0 load 1970-01-01 00:00:00 +196 hertz.com 1970-01-01 2018-09-01 06:00:00 Hertz Global Holdings 1 load 1.0 load 1970-01-01 00:00:00 +197 nscorp.com 1970-01-01 2018-09-01 06:00:00 Norfolk Southern 1 load 1.0 load 1970-01-01 00:00:00 +198 homedepot.com 1970-01-01 2018-09-01 06:00:00 Home Depot 1 load 1.0 load 1970-01-01 00:00:00 +199 rgare.com 1970-01-01 2018-09-01 06:00:00 Reinsurance Group of America 1 load 1.0 load 1970-01-01 00:00:00 +200 pseg.com 1970-01-01 2018-09-01 06:00:00 Public Service Enterprise Group 1 load 1.0 load 1970-01-01 00:00:00 +201 bbt.com 1970-01-01 2018-09-01 06:00:00 BB&T Corp. 1 load 1.0 load 1970-01-01 00:00:00 +202 dteenergy.com 1970-01-01 2018-09-01 06:00:00 DTE Energy 1 load 1.0 load 1970-01-01 00:00:00 +203 assurant.com 1970-01-01 2018-09-01 06:00:00 Assurant 1 load 1.0 load 1970-01-01 00:00:00 +204 globalp.com 1970-01-01 2018-09-01 06:00:00 Global Partners 1 load 1.0 load 1970-01-01 00:00:00 +205 huntsman.com 1970-01-01 2018-09-01 06:00:00 Huntsman 1 load 1.0 load 1970-01-01 00:00:00 +206 bd.com 1970-01-01 2018-09-01 06:00:00 Becton Dickinson 1 load 1.0 load 1970-01-01 00:00:00 +207 sempra.com 1970-01-01 2018-09-01 06:00:00 Sempra Energy 1 load 1.0 load 1970-01-01 00:00:00 +208 autozone.com 1970-01-01 2018-09-01 06:00:00 AutoZone 1 load 1.0 load 1970-01-01 00:00:00 +209 citigroup.com 1970-01-01 2018-09-01 06:00:00 Citigroup 1 load 1.0 load 1970-01-01 00:00:00 +210 navistar.com 1970-01-01 2018-09-01 06:00:00 Navistar International 1 load 1.0 load 1970-01-01 00:00:00 +211 precast.com 1970-01-01 2018-09-01 06:00:00 Precision Castparts 1 load 1.0 load 1970-01-01 00:00:00 +212 discoverfinancial.com 1970-01-01 2018-09-01 06:00:00 Discover Financial Services 1 load 1.0 load 1970-01-01 00:00:00 +213 libertyinteractive.com 1970-01-01 2018-09-01 06:00:00 Liberty Interactive 1 load 1.0 load 1970-01-01 00:00:00 +214 grainger.com 1970-01-01 2018-09-01 06:00:00 W.W. Grainger 1 load 1.0 load 1970-01-01 00:00:00 +215 baxter.com 1970-01-01 2018-09-01 06:00:00 Baxter International 1 load 1.0 load 1970-01-01 00:00:00 +216 stryker.com 1970-01-01 2018-09-01 06:00:00 Stryker 1 load 1.0 load 1970-01-01 00:00:00 +217 airproducts.com 1970-01-01 2018-09-01 06:00:00 Air Products & Chemicals 1 load 1.0 load 1970-01-01 00:00:00 +218 wnr.com 1970-01-01 2018-09-01 06:00:00 Western Refining 1 load 1.0 load 1970-01-01 00:00:00 +219 uhsinc.com 1970-01-01 2018-09-01 06:00:00 Universal Health Services 1 load 1.0 load 1970-01-01 00:00:00 +220 phillips66.com 1970-01-01 2018-09-01 06:00:00 Phillips 66 1 load 1.0 load 1970-01-01 00:00:00 +221 owens-minor.com 1970-01-01 2018-09-01 06:00:00 Owens & Minor 1 load 1.0 load 1970-01-01 00:00:00 +222 charter.com 1970-01-01 2018-09-01 06:00:00 Charter Communications 1 load 1.0 load 1970-01-01 00:00:00 +223 advanceautoparts.com 1970-01-01 2018-09-01 06:00:00 Advance Auto Parts 1 load 1.0 load 1970-01-01 00:00:00 +224 mastercard.com 1970-01-01 2018-09-01 06:00:00 MasterCard 1 load 1.0 load 1970-01-01 00:00:00 +225 appliedmaterials.com 1970-01-01 2018-09-01 06:00:00 Applied Materials 1 load 1.0 load 1970-01-01 00:00:00 +226 eastman.com 1970-01-01 2018-09-01 06:00:00 Eastman Chemical 1 load 1.0 load 1970-01-01 00:00:00 +227 sonicautomotive.com 1970-01-01 2018-09-01 06:00:00 Sonic Automotive 1 load 1.0 load 1970-01-01 00:00:00 +228 ally.com 1970-01-01 2018-09-01 06:00:00 Ally Financial 1 load 1.0 load 1970-01-01 00:00:00 +229 cstbrands.com 1970-01-01 2018-09-01 06:00:00 CST Brands 1 load 1.0 load 1970-01-01 00:00:00 +230 ebay.com 1970-01-01 2018-09-01 06:00:00 eBay 1 load 1.0 load 1970-01-01 00:00:00 +231 berkshirehathaway.com 1970-01-01 2018-09-01 06:00:00 Berkshire Hathaway 1 load 1.0 load 1970-01-01 00:00:00 +233 lennar.com 1970-01-01 2018-09-01 06:00:00 Lennar 1 load 1.0 load 1970-01-01 00:00:00 +234 gamestopcorp.com 1970-01-01 2018-09-01 06:00:00 GameStop 1 load 1.0 load 1970-01-01 00:00:00 +235 rsac.com 1970-01-01 2018-09-01 06:00:00 Reliance Steel & Aluminum 1 load 1.0 load 1970-01-01 00:00:00 +236 hormelfoods.com 1970-01-01 2018-09-01 06:00:00 Hormel Foods 1 load 1.0 load 1970-01-01 00:00:00 +237 celgene.com 1970-01-01 2018-09-01 06:00:00 Celgene 1 load 1.0 load 1970-01-01 00:00:00 +238 genworth.com 1970-01-01 2018-09-01 06:00:00 Genworth Financial 1 load 1.0 load 1970-01-01 00:00:00 +239 paypal.com 1970-01-01 2018-09-01 06:00:00 PayPal Holdings 1 load 1.0 load 1970-01-01 00:00:00 +240 pricelinegroup.com 1970-01-01 2018-09-01 06:00:00 Priceline Group 1 load 1.0 load 1970-01-01 00:00:00 +241 mgmresorts.com 1970-01-01 2018-09-01 06:00:00 MGM Resorts International 1 load 1.0 load 1970-01-01 00:00:00 +242 autoliv.com 1970-01-01 2018-09-01 06:00:00 Autoliv 1 load 1.0 load 1970-01-01 00:00:00 +243 valero.com 1970-01-01 2018-09-01 06:00:00 Valero Energy 1 load 1.0 load 1970-01-01 00:00:00 +244 fnf.com 1970-01-01 2018-09-01 06:00:00 Fidelity National Financial 1 load 1.0 load 1970-01-01 00:00:00 +245 republicservices.com 1970-01-01 2018-09-01 06:00:00 Republic Services 1 load 1.0 load 1970-01-01 00:00:00 +246 corning.com 1970-01-01 2018-09-01 06:00:00 Corning 1 load 1.0 load 1970-01-01 00:00:00 +247 kiewit.com 1970-01-01 2018-09-01 06:00:00 Peter Kiewit Sons 1 load 1.0 load 1970-01-01 00:00:00 +248 univar.com 1970-01-01 2018-09-01 06:00:00 Univar 1 load 1.0 load 1970-01-01 00:00:00 +249 mosaicco.com 1970-01-01 2018-09-01 06:00:00 Mosaic 1 load 1.0 load 1970-01-01 00:00:00 +250 core-mark.com 1970-01-01 2018-09-01 06:00:00 Core-Mark Holding 1 load 1.0 load 1970-01-01 00:00:00 +251 thrivent.com 1970-01-01 2018-09-01 06:00:00 Thrivent Financial for Lutherans 1 load 1.0 load 1970-01-01 00:00:00 +252 c-a-m.com 1970-01-01 2018-09-01 06:00:00 Cameron International 1 load 1.0 load 1970-01-01 00:00:00 +253 hdsupply.com 1970-01-01 2018-09-01 06:00:00 HD Supply Holdings 1 load 1.0 load 1970-01-01 00:00:00 +254 antheminc.com 1970-01-01 2018-09-01 06:00:00 Anthem 1 load 1.0 load 1970-01-01 00:00:00 +255 crowncork.com 1970-01-01 2018-09-01 06:00:00 Crown Holdings 1 load 1.0 load 1970-01-01 00:00:00 +256 eogresources.com 1970-01-01 2018-09-01 06:00:00 EOG Resources 1 load 1.0 load 1970-01-01 00:00:00 +257 veritivcorp.com 1970-01-01 2018-09-01 06:00:00 Veritiv 1 load 1.0 load 1970-01-01 00:00:00 +258 anadarko.com 1970-01-01 2018-09-01 06:00:00 Anadarko Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +259 labcorp.com 1970-01-01 2018-09-01 06:00:00 Laboratory Corp. of America 1 load 1.0 load 1970-01-01 00:00:00 +260 pacificlife.com 1970-01-01 2018-09-01 06:00:00 Pacific Life 1 load 1.0 load 1970-01-01 00:00:00 +261 newscorp.com 1970-01-01 2018-09-01 06:00:00 News Corp. 1 load 1.0 load 1970-01-01 00:00:00 +262 jarden.com 1970-01-01 2018-09-01 06:00:00 Jarden 1 load 1.0 load 1970-01-01 00:00:00 +263 suntrust.com 1970-01-01 2018-09-01 06:00:00 SunTrust Banks 1 load 1.0 load 1970-01-01 00:00:00 +264 avisbudgetgroup.com 1970-01-01 2018-09-01 06:00:00 Avis Budget Group 1 load 1.0 load 1970-01-01 00:00:00 +265 pg.com 1970-01-01 2018-09-01 06:00:00 Procter & Gamble 1 load 1.0 load 1970-01-01 00:00:00 +266 broadcom.com 1970-01-01 2018-09-01 06:00:00 Broadcom 1 load 1.0 load 1970-01-01 00:00:00 +267 amfam.com 1970-01-01 2018-09-01 06:00:00 American Family Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +268 level3.com 1970-01-01 2018-09-01 06:00:00 Level 3 Communications 1 load 1.0 load 1970-01-01 00:00:00 +269 tenneco.com 1970-01-01 2018-09-01 06:00:00 Tenneco 1 load 1.0 load 1970-01-01 00:00:00 +270 unfi.com 1970-01-01 2018-09-01 06:00:00 United Natural Foods 1 load 1.0 load 1970-01-01 00:00:00 +271 deanfoods.com 1970-01-01 2018-09-01 06:00:00 Dean Foods 1 load 1.0 load 1970-01-01 00:00:00 +272 campbellsoupcompany.com 1970-01-01 2018-09-01 06:00:00 Campbell Soup 1 load 1.0 load 1970-01-01 00:00:00 +273 mohawkind.com 1970-01-01 2018-09-01 06:00:00 Mohawk Industries 1 load 1.0 load 1970-01-01 00:00:00 +274 borgwarner.com 1970-01-01 2018-09-01 06:00:00 BorgWarner 1 load 1.0 load 1970-01-01 00:00:00 +275 pvh.com 1970-01-01 2018-09-01 06:00:00 PVH 1 load 1.0 load 1970-01-01 00:00:00 +276 statefarm.com 1970-01-01 2018-09-01 06:00:00 State Farm Insurance Cos. 1 load 1.0 load 1970-01-01 00:00:00 +277 ball.com 1970-01-01 2018-09-01 06:00:00 Ball 1 load 1.0 load 1970-01-01 00:00:00 +278 oreillyauto.com 1970-01-01 2018-09-01 06:00:00 O Reilly Automotive 1 load 1.0 load 1970-01-01 00:00:00 +279 eversource.com 1970-01-01 2018-09-01 06:00:00 Eversource Energy 1 load 1.0 load 1970-01-01 00:00:00 +280 franklinresources.com 1970-01-01 2018-09-01 06:00:00 Franklin Resources 1 load 1.0 load 1970-01-01 00:00:00 +281 masco.com 1970-01-01 2018-09-01 06:00:00 Masco 1 load 1.0 load 1970-01-01 00:00:00 +282 lithia.com 1970-01-01 2018-09-01 06:00:00 Lithia Motors 1 load 1.0 load 1970-01-01 00:00:00 +283 kkr.com 1970-01-01 2018-09-01 06:00:00 KKR 1 load 1.0 load 1970-01-01 00:00:00 +284 oneok.com 1970-01-01 2018-09-01 06:00:00 Oneok 1 load 1.0 load 1970-01-01 00:00:00 +285 newmont.com 1970-01-01 2018-09-01 06:00:00 Newmont Mining 1 load 1.0 load 1970-01-01 00:00:00 +286 pplweb.com 1970-01-01 2018-09-01 06:00:00 PPL 1 load 1.0 load 1970-01-01 00:00:00 +287 google.com 1970-01-01 2018-09-01 06:00:00 Alphabet 1 load 1.0 load 1970-01-01 00:00:00 +288 spartannash.com 1970-01-01 2018-09-01 06:00:00 SpartanNash 1 load 1.0 load 1970-01-01 00:00:00 +289 quantaservices.com 1970-01-01 2018-09-01 06:00:00 Quanta Services 1 load 1.0 load 1970-01-01 00:00:00 +290 xpo.com 1970-01-01 2018-09-01 06:00:00 XPO Logistics 1 load 1.0 load 1970-01-01 00:00:00 +291 ralphlauren.com 1970-01-01 2018-09-01 06:00:00 Ralph Lauren 1 load 1.0 load 1970-01-01 00:00:00 +292 interpublic.com 1970-01-01 2018-09-01 06:00:00 Interpublic Group 1 load 1.0 load 1970-01-01 00:00:00 +293 steeldynamics.com 1970-01-01 2018-09-01 06:00:00 Steel Dynamics 1 load 1.0 load 1970-01-01 00:00:00 +294 wesco.com 1970-01-01 2018-09-01 06:00:00 WESCO International 1 load 1.0 load 1970-01-01 00:00:00 +295 questdiagnostics.com 1970-01-01 2018-09-01 06:00:00 Quest Diagnostics 1 load 1.0 load 1970-01-01 00:00:00 +296 bostonscientific.com 1970-01-01 2018-09-01 06:00:00 Boston Scientific 1 load 1.0 load 1970-01-01 00:00:00 +297 agcocorp.com 1970-01-01 2018-09-01 06:00:00 AGCO 1 load 1.0 load 1970-01-01 00:00:00 +298 comcastcorporation.com 1970-01-01 2018-09-01 06:00:00 Comcast 1 load 1.0 load 1970-01-01 00:00:00 +299 footlocker-inc.com 1970-01-01 2018-09-01 06:00:00 Foot Locker 1 load 1.0 load 1970-01-01 00:00:00 +300 thehersheycompany.com 1970-01-01 2018-09-01 06:00:00 Hershey 1 load 1.0 load 1970-01-01 00:00:00 +450 nvrinc.com 1970-01-01 2018-09-01 06:00:00 NVR 1 load 1.0 load 1970-01-01 00:00:00 +301 centerpointenergy.com 1970-01-01 2018-09-01 06:00:00 CenterPoint Energy 1 load 1.0 load 1970-01-01 00:00:00 +302 williams.com 1970-01-01 2018-09-01 06:00:00 Williams 1 load 1.0 load 1970-01-01 00:00:00 +303 dickssportinggoods.com 1970-01-01 2018-09-01 06:00:00 Dicks Sporting Goods 1 load 1.0 load 1970-01-01 00:00:00 +304 livenation.com 1970-01-01 2018-09-01 06:00:00 Live Nation Entertainment 1 load 1.0 load 1970-01-01 00:00:00 +305 mutualofomaha.com 1970-01-01 2018-09-01 06:00:00 Mutual of Omaha Insurance 1 load 1.0 load 1970-01-01 00:00:00 +306 wrberkley.com 1970-01-01 2018-09-01 06:00:00 W.R. Berkley 1 load 1.0 load 1970-01-01 00:00:00 +307 lkqcorp.com 1970-01-01 2018-09-01 06:00:00 LKQ 1 load 1.0 load 1970-01-01 00:00:00 +308 avoncompany.com 1970-01-01 2018-09-01 06:00:00 Avon Products 1 load 1.0 load 1970-01-01 00:00:00 +309 target.com 1970-01-01 2018-09-01 06:00:00 Target 1 load 1.0 load 1970-01-01 00:00:00 +310 darden.com 1970-01-01 2018-09-01 06:00:00 Darden Restaurants 1 load 1.0 load 1970-01-01 00:00:00 +311 kindredhealthcare.com 1970-01-01 2018-09-01 06:00:00 Kindred Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +312 weyerhaeuser.com 1970-01-01 2018-09-01 06:00:00 Weyerhaeuser 1 load 1.0 load 1970-01-01 00:00:00 +313 caseys.com 1970-01-01 2018-09-01 06:00:00 Caseys General Stores 1 load 1.0 load 1970-01-01 00:00:00 +314 sealedair.com 1970-01-01 2018-09-01 06:00:00 Sealed Air 1 load 1.0 load 1970-01-01 00:00:00 +315 53.com 1970-01-01 2018-09-01 06:00:00 Fifth Third Bancorp 1 load 1.0 load 1970-01-01 00:00:00 +316 dovercorporation.com 1970-01-01 2018-09-01 06:00:00 Dover 1 load 1.0 load 1970-01-01 00:00:00 +317 huntingtoningalls.com 1970-01-01 2018-09-01 06:00:00 Huntington Ingalls Industries 1 load 1.0 load 1970-01-01 00:00:00 +318 netflix.com 1970-01-01 2018-09-01 06:00:00 Netflix 1 load 1.0 load 1970-01-01 00:00:00 +319 dillards.com 1970-01-01 2018-09-01 06:00:00 Dillards 1 load 1.0 load 1970-01-01 00:00:00 +320 jnj.com 1970-01-01 2018-09-01 06:00:00 Johnson & Johnson 1 load 1.0 load 1970-01-01 00:00:00 +321 emcorgroup.com 1970-01-01 2018-09-01 06:00:00 EMCOR Group 1 load 1.0 load 1970-01-01 00:00:00 +322 edwardjones.com 1970-01-01 2018-09-01 06:00:00 Jones Financial 1 load 1.0 load 1970-01-01 00:00:00 +323 aksteel.com 1970-01-01 2018-09-01 06:00:00 AK Steel Holding 1 load 1.0 load 1970-01-01 00:00:00 +324 ugicorp.com 1970-01-01 2018-09-01 06:00:00 UGI 1 load 1.0 load 1970-01-01 00:00:00 +325 expediainc.com 1970-01-01 2018-09-01 06:00:00 Expedia 1 load 1.0 load 1970-01-01 00:00:00 +326 salesforce.com 1970-01-01 2018-09-01 06:00:00 salesforce.com 1 load 1.0 load 1970-01-01 00:00:00 +327 targaresources.com 1970-01-01 2018-09-01 06:00:00 Targa Resources 1 load 1.0 load 1970-01-01 00:00:00 +328 apachecorp.com 1970-01-01 2018-09-01 06:00:00 Apache 1 load 1.0 load 1970-01-01 00:00:00 +329 spiritaero.com 1970-01-01 2018-09-01 06:00:00 Spirit AeroSystems Holdings 1 load 1.0 load 1970-01-01 00:00:00 +330 expeditors.com 1970-01-01 2018-09-01 06:00:00 Expeditors International of Washington 1 load 1.0 load 1970-01-01 00:00:00 +331 metlife.com 1970-01-01 2018-09-01 06:00:00 MetLife 1 load 1.0 load 1970-01-01 00:00:00 +332 anixter.com 1970-01-01 2018-09-01 06:00:00 Anixter International 1 load 1.0 load 1970-01-01 00:00:00 +333 fisglobal.com 1970-01-01 2018-09-01 06:00:00 Fidelity National Information Services 1 load 1.0 load 1970-01-01 00:00:00 +334 asburyauto.com 1970-01-01 2018-09-01 06:00:00 Asbury Automotive Group 1 load 1.0 load 1970-01-01 00:00:00 +335 hess.com 1970-01-01 2018-09-01 06:00:00 Hess 1 load 1.0 load 1970-01-01 00:00:00 +336 ryder.com 1970-01-01 2018-09-01 06:00:00 Ryder System 1 load 1.0 load 1970-01-01 00:00:00 +337 terex.com 1970-01-01 2018-09-01 06:00:00 Terex 1 load 1.0 load 1970-01-01 00:00:00 +338 cokecce.com 1970-01-01 2018-09-01 06:00:00 Coca-Cola European Partners 1 load 1.0 load 1970-01-01 00:00:00 +339 auto-owners.com 1970-01-01 2018-09-01 06:00:00 Auto-Owners Insurance 1 load 1.0 load 1970-01-01 00:00:00 +340 cablevision.com 1970-01-01 2018-09-01 06:00:00 Cablevision Systems 1 load 1.0 load 1970-01-01 00:00:00 +341 symantec.com 1970-01-01 2018-09-01 06:00:00 Symantec 1 load 1.0 load 1970-01-01 00:00:00 +342 mckesson.com 1970-01-01 2018-09-01 06:00:00 McKesson 1 load 1.0 load 1970-01-01 00:00:00 +343 adm.com 1970-01-01 2018-09-01 06:00:00 Archer Daniels Midland 1 load 1.0 load 1970-01-01 00:00:00 +344 aboutschwab.com 1970-01-01 2018-09-01 06:00:00 Charles Schwab 1 load 1.0 load 1970-01-01 00:00:00 +345 calpine.com 1970-01-01 2018-09-01 06:00:00 Calpine 1 load 1.0 load 1970-01-01 00:00:00 +346 cmsenergy.com 1970-01-01 2018-09-01 06:00:00 CMS Energy 1 load 1.0 load 1970-01-01 00:00:00 +347 alliancedata.com 1970-01-01 2018-09-01 06:00:00 Alliance Data Systems 1 load 1.0 load 1970-01-01 00:00:00 +348 jetblue.com 1970-01-01 2018-09-01 06:00:00 JetBlue Airways 1 load 1.0 load 1970-01-01 00:00:00 +349 discoverycommunications.com 1970-01-01 2018-09-01 06:00:00 Discovery Communications 1 load 1.0 load 1970-01-01 00:00:00 +350 trin.net 1970-01-01 2018-09-01 06:00:00 Trinity Industries 1 load 1.0 load 1970-01-01 00:00:00 +351 sanmina.com 1970-01-01 2018-09-01 06:00:00 Sanmina 1 load 1.0 load 1970-01-01 00:00:00 +352 ncr.com 1970-01-01 2018-09-01 06:00:00 NCR 1 load 1.0 load 1970-01-01 00:00:00 +353 fmctechnologies.com 1970-01-01 2018-09-01 06:00:00 FMC Technologies 1 load 1.0 load 1970-01-01 00:00:00 +354 marathonpetroleum.com 1970-01-01 2018-09-01 06:00:00 Marathon Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +355 erieinsurance.com 1970-01-01 2018-09-01 06:00:00 Erie Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +356 rockwellautomation.com 1970-01-01 2018-09-01 06:00:00 Rockwell Automation 1 load 1.0 load 1970-01-01 00:00:00 +357 drpeppersnapplegroup.com 1970-01-01 2018-09-01 06:00:00 Dr Pepper Snapple Group 1 load 1.0 load 1970-01-01 00:00:00 +358 iheartmedia.com 1970-01-01 2018-09-01 06:00:00 iHeartMedia 1 load 1.0 load 1970-01-01 00:00:00 +359 tractorsupply.com 1970-01-01 2018-09-01 06:00:00 Tractor Supply 1 load 1.0 load 1970-01-01 00:00:00 +360 jbhunt.com 1970-01-01 2018-09-01 06:00:00 J.B. Hunt Transport Services 1 load 1.0 load 1970-01-01 00:00:00 +361 cmc.com 1970-01-01 2018-09-01 06:00:00 Commercial Metals 1 load 1.0 load 1970-01-01 00:00:00 +362 o-i.com 1970-01-01 2018-09-01 06:00:00 Owens-Illinois 1 load 1.0 load 1970-01-01 00:00:00 +363 harman.com 1970-01-01 2018-09-01 06:00:00 Harman International Industries 1 load 1.0 load 1970-01-01 00:00:00 +364 baxalta.com 1970-01-01 2018-09-01 06:00:00 Baxalta 1 load 1.0 load 1970-01-01 00:00:00 +365 freddiemac.com 1970-01-01 2018-09-01 06:00:00 Freddie Mac 1 load 1.0 load 1970-01-01 00:00:00 +366 afginc.com 1970-01-01 2018-09-01 06:00:00 American Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +367 netapp.com 1970-01-01 2018-09-01 06:00:00 NetApp 1 load 1.0 load 1970-01-01 00:00:00 +368 graybar.com 1970-01-01 2018-09-01 06:00:00 Graybar Electric 1 load 1.0 load 1970-01-01 00:00:00 +369 oshkoshcorporation.com 1970-01-01 2018-09-01 06:00:00 Oshkosh 1 load 1.0 load 1970-01-01 00:00:00 +370 ameren.com 1970-01-01 2018-09-01 06:00:00 Ameren 1 load 1.0 load 1970-01-01 00:00:00 +371 amark.com 1970-01-01 2018-09-01 06:00:00 A-Mark Precious Metals 1 load 1.0 load 1970-01-01 00:00:00 +372 barnesandnobleinc.com 1970-01-01 2018-09-01 06:00:00 Barnes & Noble 1 load 1.0 load 1970-01-01 00:00:00 +373 dana.com 1970-01-01 2018-09-01 06:00:00 Dana Holding 1 load 1.0 load 1970-01-01 00:00:00 +374 cbrands.com 1970-01-01 2018-09-01 06:00:00 Constellation Brands 1 load 1.0 load 1970-01-01 00:00:00 +375 lifepointhealth.net 1970-01-01 2018-09-01 06:00:00 LifePoint Health 1 load 1.0 load 1970-01-01 00:00:00 +376 pepsico.com 1970-01-01 2018-09-01 06:00:00 PepsiCo 1 load 1.0 load 1970-01-01 00:00:00 +377 zimmerbiomet.com 1970-01-01 2018-09-01 06:00:00 Zimmer Biomet Holdings 1 load 1.0 load 1970-01-01 00:00:00 +378 harley-davidson.com 1970-01-01 2018-09-01 06:00:00 Harley-Davidson 1 load 1.0 load 1970-01-01 00:00:00 +379 pultegroupinc.com 1970-01-01 2018-09-01 06:00:00 PulteGroup 1 load 1.0 load 1970-01-01 00:00:00 +380 newellbrands.com 1970-01-01 2018-09-01 06:00:00 Newell Brands 1 load 1.0 load 1970-01-01 00:00:00 +381 averydennison.com 1970-01-01 2018-09-01 06:00:00 Avery Dennison 1 load 1.0 load 1970-01-01 00:00:00 +382 jll.com 1970-01-01 2018-09-01 06:00:00 Jones Lang LaSalle 1 load 1.0 load 1970-01-01 00:00:00 +383 wecenergygroup.com 1970-01-01 2018-09-01 06:00:00 WEC Energy Group 1 load 1.0 load 1970-01-01 00:00:00 +384 marathonoil.com 1970-01-01 2018-09-01 06:00:00 Marathon Oil 1 load 1.0 load 1970-01-01 00:00:00 +385 ta-petrol.com 1970-01-01 2018-09-01 06:00:00 TravelCenters of America 1 load 1.0 load 1970-01-01 00:00:00 +386 unitedrentals.com 1970-01-01 2018-09-01 06:00:00 United Rentals 1 load 1.0 load 1970-01-01 00:00:00 +387 utc.com 1970-01-01 2018-09-01 06:00:00 United Technologies 1 load 1.0 load 1970-01-01 00:00:00 +388 hrggroup.com 1970-01-01 2018-09-01 06:00:00 HRG Group 1 load 1.0 load 1970-01-01 00:00:00 +389 oldrepublic.com 1970-01-01 2018-09-01 06:00:00 Old Republic International 1 load 1.0 load 1970-01-01 00:00:00 +390 windstream.com 1970-01-01 2018-09-01 06:00:00 Windstream Holdings 1 load 1.0 load 1970-01-01 00:00:00 +391 starwoodhotels.com 1970-01-01 2018-09-01 06:00:00 Starwood Hotels & Resorts 1 load 1.0 load 1970-01-01 00:00:00 +392 delekus.com 1970-01-01 2018-09-01 06:00:00 Delek US Holdings 1 load 1.0 load 1970-01-01 00:00:00 +393 packagingcorp.com 1970-01-01 2018-09-01 06:00:00 Packaging Corp. of America 1 load 1.0 load 1970-01-01 00:00:00 +394 quintiles.com 1970-01-01 2018-09-01 06:00:00 Quintiles IMS Holdings 1 load 1.0 load 1970-01-01 00:00:00 +395 hanes.com 1970-01-01 2018-09-01 06:00:00 Hanesbrands 1 load 1.0 load 1970-01-01 00:00:00 +396 realogy.com 1970-01-01 2018-09-01 06:00:00 Realogy Holdings 1 load 1.0 load 1970-01-01 00:00:00 +397 mattel.com 1970-01-01 2018-09-01 06:00:00 Mattel 1 load 1.0 load 1970-01-01 00:00:00 +398 aetna.com 1970-01-01 2018-09-01 06:00:00 Aetna 1 load 1.0 load 1970-01-01 00:00:00 +399 motorolasolutions.com 1970-01-01 2018-09-01 06:00:00 Motorola Solutions 1 load 1.0 load 1970-01-01 00:00:00 +400 jmsmucker.com 1970-01-01 2018-09-01 06:00:00 J.M. Smucker 1 load 1.0 load 1970-01-01 00:00:00 +401 regions.com 1970-01-01 2018-09-01 06:00:00 Regions Financial 1 load 1.0 load 1970-01-01 00:00:00 +402 celanese.com 1970-01-01 2018-09-01 06:00:00 Celanese 1 load 1.0 load 1970-01-01 00:00:00 +403 thecloroxcompany.com 1970-01-01 2018-09-01 06:00:00 Clorox 1 load 1.0 load 1970-01-01 00:00:00 +404 ingredion.com 1970-01-01 2018-09-01 06:00:00 Ingredion 1 load 1.0 load 1970-01-01 00:00:00 +405 genesishcc.com 1970-01-01 2018-09-01 06:00:00 Genesis Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +406 peabodyenergy.com 1970-01-01 2018-09-01 06:00:00 Peabody Energy 1 load 1.0 load 1970-01-01 00:00:00 +407 alaskaair.com 1970-01-01 2018-09-01 06:00:00 Alaska Air Group 1 load 1.0 load 1970-01-01 00:00:00 +408 seaboardcorp.com 1970-01-01 2018-09-01 06:00:00 Seaboard 1 load 1.0 load 1970-01-01 00:00:00 +409 lowes.com 1970-01-01 2018-09-01 06:00:00 Lowes 1 load 1.0 load 1970-01-01 00:00:00 +410 frontier.com 1970-01-01 2018-09-01 06:00:00 Frontier Communications 1 load 1.0 load 1970-01-01 00:00:00 +411 amphenol.com 1970-01-01 2018-09-01 06:00:00 Amphenol 1 load 1.0 load 1970-01-01 00:00:00 +412 lansingtradegroup.com 1970-01-01 2018-09-01 06:00:00 Lansing Trade Group 1 load 1.0 load 1970-01-01 00:00:00 +413 sandisk.com 1970-01-01 2018-09-01 06:00:00 SanDisk 1 load 1.0 load 1970-01-01 00:00:00 +414 sjm.com 1970-01-01 2018-09-01 06:00:00 St. Jude Medical 1 load 1.0 load 1970-01-01 00:00:00 +415 wyndhamworldwide.com 1970-01-01 2018-09-01 06:00:00 Wyndham Worldwide 1 load 1.0 load 1970-01-01 00:00:00 +416 kellyservices.com 1970-01-01 2018-09-01 06:00:00 Kelly Services 1 load 1.0 load 1970-01-01 00:00:00 +417 westernunion.com 1970-01-01 2018-09-01 06:00:00 Western Union 1 load 1.0 load 1970-01-01 00:00:00 +418 evhc.net 1970-01-01 2018-09-01 06:00:00 Envision Healthcare Holdings 1 load 1.0 load 1970-01-01 00:00:00 +419 visteon.com 1970-01-01 2018-09-01 06:00:00 Visteon 1 load 1.0 load 1970-01-01 00:00:00 +420 ups.com 1970-01-01 2018-09-01 06:00:00 UPS 1 load 1.0 load 1970-01-01 00:00:00 +421 ajg.com 1970-01-01 2018-09-01 06:00:00 Arthur J. Gallagher 1 load 1.0 load 1970-01-01 00:00:00 +422 hosthotels.com 1970-01-01 2018-09-01 06:00:00 Host Hotels & Resorts 1 load 1.0 load 1970-01-01 00:00:00 +423 ashland.com 1970-01-01 2018-09-01 06:00:00 Ashland 1 load 1.0 load 1970-01-01 00:00:00 +424 insight.com 1970-01-01 2018-09-01 06:00:00 Insight Enterprises 1 load 1.0 load 1970-01-01 00:00:00 +425 energyfutureholdings.com 1970-01-01 2018-09-01 06:00:00 Energy Future Holdings 1 load 1.0 load 1970-01-01 00:00:00 +426 markelcorp.com 1970-01-01 2018-09-01 06:00:00 Markel 1 load 1.0 load 1970-01-01 00:00:00 +427 essendant.com 1970-01-01 2018-09-01 06:00:00 Essendant 1 load 1.0 load 1970-01-01 00:00:00 +428 ch2m.com 1970-01-01 2018-09-01 06:00:00 CH2M Hill 1 load 1.0 load 1970-01-01 00:00:00 +429 westernsouthern.com 1970-01-01 2018-09-01 06:00:00 Western & Southern Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +430 owenscorning.com 1970-01-01 2018-09-01 06:00:00 Owens Corning 1 load 1.0 load 1970-01-01 00:00:00 +431 aig.com 1970-01-01 2018-09-01 06:00:00 AIG 1 load 1.0 load 1970-01-01 00:00:00 +432 spglobal.com 1970-01-01 2018-09-01 06:00:00 S&P Global 1 load 1.0 load 1970-01-01 00:00:00 +433 raymondjames.com 1970-01-01 2018-09-01 06:00:00 Raymond James Financial 1 load 1.0 load 1970-01-01 00:00:00 +434 nisource.com 1970-01-01 2018-09-01 06:00:00 NiSource 1 load 1.0 load 1970-01-01 00:00:00 +435 airgas.com 1970-01-01 2018-09-01 06:00:00 Airgas 1 load 1.0 load 1970-01-01 00:00:00 +436 abm.com 1970-01-01 2018-09-01 06:00:00 ABM Industries 1 load 1.0 load 1970-01-01 00:00:00 +437 citizensbank.com 1970-01-01 2018-09-01 06:00:00 Citizens Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +438 boozallen.com 1970-01-01 2018-09-01 06:00:00 Booz Allen Hamilton Holding 1 load 1.0 load 1970-01-01 00:00:00 +439 simon.com 1970-01-01 2018-09-01 06:00:00 Simon Property Group 1 load 1.0 load 1970-01-01 00:00:00 +440 domtar.com 1970-01-01 2018-09-01 06:00:00 Domtar 1 load 1.0 load 1970-01-01 00:00:00 +441 rockwellcollins.com 1970-01-01 2018-09-01 06:00:00 Rockwell Collins 1 load 1.0 load 1970-01-01 00:00:00 +442 prudential.com 1970-01-01 2018-09-01 06:00:00 Prudential Financial 1 load 1.0 load 1970-01-01 00:00:00 +443 lamresearch.com 1970-01-01 2018-09-01 06:00:00 Lam Research 1 load 1.0 load 1970-01-01 00:00:00 +444 fiserv.com 1970-01-01 2018-09-01 06:00:00 Fiserv 1 load 1.0 load 1970-01-01 00:00:00 +445 spectraenergy.com 1970-01-01 2018-09-01 06:00:00 Spectra Energy 1 load 1.0 load 1970-01-01 00:00:00 +446 navient.com 1970-01-01 2018-09-01 06:00:00 Navient 1 load 1.0 load 1970-01-01 00:00:00 +447 biglots.com 1970-01-01 2018-09-01 06:00:00 Big Lots 1 load 1.0 load 1970-01-01 00:00:00 +448 tdsinc.com 1970-01-01 2018-09-01 06:00:00 Telephone & Data Systems 1 load 1.0 load 1970-01-01 00:00:00 +449 firstam.com 1970-01-01 2018-09-01 06:00:00 First American Financial 1 load 1.0 load 1970-01-01 00:00:00 +451 cinfin.com 1970-01-01 2018-09-01 06:00:00 Cincinnati Financial 1 load 1.0 load 1970-01-01 00:00:00 +452 burlingtonstores.com 1970-01-01 2018-09-01 06:00:00 Burlington Stores 1 load 1.0 load 1970-01-01 00:00:00 +453 unitedhealthgroup.com 1970-01-01 2018-09-01 06:00:00 UnitedHealth Group 1 load 1.0 load 1970-01-01 00:00:00 +454 intel.com 1970-01-01 2018-09-01 06:00:00 Intel 1 load 1.0 load 1970-01-01 00:00:00 +455 humana.com 1970-01-01 2018-09-01 06:00:00 Humana 1 load 1.0 load 1970-01-01 00:00:00 +456 disney.com 1970-01-01 2018-09-01 06:00:00 Disney 1 load 1.0 load 1970-01-01 00:00:00 +457 cisco.com 1970-01-01 2018-09-01 06:00:00 Cisco Systems 1 load 1.0 load 1970-01-01 00:00:00 +458 pfizer.com 1970-01-01 2018-09-01 06:00:00 Pfizer 1 load 1.0 load 1970-01-01 00:00:00 +459 dow.com 1970-01-01 2018-09-01 06:00:00 Dow Chemical 1 load 1.0 load 1970-01-01 00:00:00 +460 sysco.com 1970-01-01 2018-09-01 06:00:00 Sysco 1 load 1.0 load 1970-01-01 00:00:00 +461 fedex.com 1970-01-01 2018-09-01 06:00:00 FedEx 1 load 1.0 load 1970-01-01 00:00:00 +462 caterpillar.com 1970-01-01 2018-09-01 06:00:00 Caterpillar 1 load 1.0 load 1970-01-01 00:00:00 +463 lockheedmartin.com 1970-01-01 2018-09-01 06:00:00 Lockheed Martin 1 load 1.0 load 1970-01-01 00:00:00 +464 cvshealth.com 1970-01-01 2018-09-01 06:00:00 CVS Health 1 load 1.0 load 1970-01-01 00:00:00 +465 newyorklife.com 1970-01-01 2018-09-01 06:00:00 New York Life Insurance 1 load 1.0 load 1970-01-01 00:00:00 +466 coca-colacompany.com 1970-01-01 2018-09-01 06:00:00 Coca-Cola 1 load 1.0 load 1970-01-01 00:00:00 +467 hcahealthcare.com 1970-01-01 2018-09-01 06:00:00 HCA Holdings 1 load 1.0 load 1970-01-01 00:00:00 +468 ingrammicro.com 1970-01-01 2018-09-01 06:00:00 Ingram Micro 1 load 1.0 load 1970-01-01 00:00:00 +469 energytransfer.com 1970-01-01 2018-09-01 06:00:00 Energy Transfer Equity 1 load 1.0 load 1970-01-01 00:00:00 +470 tysonfoods.com 1970-01-01 2018-09-01 06:00:00 Tyson Foods 1 load 1.0 load 1970-01-01 00:00:00 +471 aa.com 1970-01-01 2018-09-01 06:00:00 American Airlines Group 1 load 1.0 load 1970-01-01 00:00:00 +472 delta.com 1970-01-01 2018-09-01 06:00:00 Delta Air Lines 1 load 1.0 load 1970-01-01 00:00:00 +473 nationwide.com 1970-01-01 2018-09-01 06:00:00 Nationwide 1 load 1.0 load 1970-01-01 00:00:00 +474 johnsoncontrols.com 1970-01-01 2018-09-01 06:00:00 Johnson Controls 1 load 1.0 load 1970-01-01 00:00:00 +475 gm.com 1970-01-01 2018-09-01 06:00:00 General Motors 1 load 1.0 load 1970-01-01 00:00:00 +476 bestbuy.com 1970-01-01 2018-09-01 06:00:00 Best Buy 1 load 1.0 load 1970-01-01 00:00:00 +477 merck.com 1970-01-01 2018-09-01 06:00:00 Merck 1 load 1.0 load 1970-01-01 00:00:00 +478 libertymutual.com 1970-01-01 2018-09-01 06:00:00 Liberty Mutual Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +479 gs.com 1970-01-01 2018-09-01 06:00:00 Goldman Sachs Group 1 load 1.0 load 1970-01-01 00:00:00 +480 honeywell.com 1970-01-01 2018-09-01 06:00:00 Honeywell International 1 load 1.0 load 1970-01-01 00:00:00 +481 massmutual.com 1970-01-01 2018-09-01 06:00:00 Massachusetts Mutual Life Insurance 1 load 1.0 load 1970-01-01 00:00:00 +482 oracle.com 1970-01-01 2018-09-01 06:00:00 Oracle 1 load 1.0 load 1970-01-01 00:00:00 +483 morganstanley.com 1970-01-01 2018-09-01 06:00:00 Morgan Stanley 1 load 1.0 load 1970-01-01 00:00:00 +484 cigna.com 1970-01-01 2018-09-01 06:00:00 Cigna 1 load 1.0 load 1970-01-01 00:00:00 +485 unitedcontinentalholdings.com 1970-01-01 2018-09-01 06:00:00 United Continental Holdings 1 load 1.0 load 1970-01-01 00:00:00 +486 ford.com 1970-01-01 2018-09-01 06:00:00 Ford Motor 1 load 1.0 load 1970-01-01 00:00:00 +487 allstate.com 1970-01-01 2018-09-01 06:00:00 Allstate 1 load 1.0 load 1970-01-01 00:00:00 +488 tiaa.org 1970-01-01 2018-09-01 06:00:00 TIAA 1 load 1.0 load 1970-01-01 00:00:00 +489 intlfcstone.com 1970-01-01 2018-09-01 06:00:00 INTL FCStone 1 load 1.0 load 1970-01-01 00:00:00 +490 chsinc.com 1970-01-01 2018-09-01 06:00:00 CHS 1 load 1.0 load 1970-01-01 00:00:00 +491 americanexpress.com 1970-01-01 2018-09-01 06:00:00 American Express 1 load 1.0 load 1970-01-01 00:00:00 +492 gilead.com 1970-01-01 2018-09-01 06:00:00 Gilead Sciences 1 load 1.0 load 1970-01-01 00:00:00 +493 publix.com 1970-01-01 2018-09-01 06:00:00 Publix Super Markets 1 load 1.0 load 1970-01-01 00:00:00 +494 generaldynamics.com 1970-01-01 2018-09-01 06:00:00 General Dynamics 1 load 1.0 load 1970-01-01 00:00:00 +495 tjx.com 1970-01-01 2018-09-01 06:00:00 TJX 1 load 1.0 load 1970-01-01 00:00:00 +496 conocophillips.com 1970-01-01 2018-09-01 06:00:00 ConocoPhillips 1 load 1.0 load 1970-01-01 00:00:00 +497 att.com 1970-01-01 2018-09-01 06:00:00 AT&T 1 load 1.0 load 1970-01-01 00:00:00 +498 nike.com 1970-01-01 2018-09-01 06:00:00 Nike 1 load 1.0 load 1970-01-01 00:00:00 +499 wfscorp.com 1970-01-01 2018-09-01 06:00:00 World Fuel Services 1 load 1.0 load 1970-01-01 00:00:00 +500 3m.com 1970-01-01 2018-09-01 06:00:00 3M 1 load 1.0 load 1970-01-01 00:00:00 +501 mondelezinternational.com 1970-01-01 2018-09-01 06:00:00 Mondelez International 1 load 1.0 load 1970-01-01 00:00:00 +502 exeloncorp.com 1970-01-01 2018-09-01 06:00:00 Exelon 1 load 1.0 load 1970-01-01 00:00:00 +503 21cf.com 1970-01-01 2018-09-01 06:00:00 Twenty-First Century Fox 1 load 1.0 load 1970-01-01 00:00:00 +504 johndeere.com 1970-01-01 2018-09-01 06:00:00 Deere 1 load 1.0 load 1970-01-01 00:00:00 +505 tsocorp.com 1970-01-01 2018-09-01 06:00:00 Tesoro 1 load 1.0 load 1970-01-01 00:00:00 +506 timewarner.com 1970-01-01 2018-09-01 06:00:00 Time Warner 1 load 1.0 load 1970-01-01 00:00:00 +507 redhat.com 1970-01-01 2018-09-01 06:00:00 Red Hat 1 load 1.0 load 1970-01-01 00:00:00 +509 openwrt.org 1970-01-01 2018-09-01 06:00:00 OpenWRT 1 load 1.0 load 1970-01-01 00:00:00 +510 panasonic.com 1970-01-01 2018-09-01 06:00:00 Panasonic 1 load 1.0 load 1970-01-01 00:00:00 +511 comcast.net 1970-01-01 2018-09-01 06:00:00 Comcast 1 load 1.0 load 1970-01-01 00:00:00 +512 linux.org 1970-01-01 2018-09-01 06:00:00 Linux 1 load 1.0 load 1970-01-01 00:00:00 +514 northwesternmutual.com 1970-01-01 2018-09-01 06:00:00 Northwestern Mutual 1 load 1.0 load 1970-01-01 00:00:00 +515 kde.org 1970-01-01 2018-09-01 06:00:00 KDE 1 load 1.0 load 1970-01-01 00:00:00 +516 twitter.com 1970-01-01 2018-09-01 06:00:00 Twitter 1 load 1.0 load 1970-01-01 00:00:00 +517 adobe.com 1970-01-01 2018-09-01 06:00:00 Adobe 1 load 1.0 load 1970-01-01 00:00:00 +519 acm.org 1970-01-01 2018-09-12 02:01:59 ACM 1 load 1.0 load 1970-01-01 00:00:00 +520 outdoors@acm.org 1970-01-01 2018-09-12 02:32:53 University of Missouri 1 load 1.0 load 2013-07-15 00:00:00 +521 freebsd.org 1970-01-01 2018-09-13 21:15:22 Free BSD 1 load 1.0 load 1970-01-01 00:00:00 +\. + + +-- +-- Data for Name: contributor_repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributor_repo (cntrb_repo_id, repo_git, repo_name, gh_repo_id, cntrb_category, event_id, created_at, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: contributors; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributors (cntrb_login, cntrb_email, cntrb_full_name, cntrb_company, cntrb_created_at, cntrb_type, cntrb_fake, cntrb_deleted, cntrb_long, cntrb_lat, cntrb_country_code, cntrb_state, cntrb_city, cntrb_location, cntrb_canonical, cntrb_last_used, gh_user_id, gh_login, gh_url, gh_html_url, gh_node_id, gh_avatar_url, gh_gravatar_id, gh_followers_url, gh_following_url, gh_gists_url, gh_starred_url, gh_subscriptions_url, gh_organizations_url, gh_repos_url, gh_events_url, gh_received_events_url, gh_type, gh_site_admin, gl_web_url, gl_avatar_url, gl_state, gl_username, gl_full_name, gl_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +not-provided \N \N \N 2019-06-13 11:33:39 \N 0 0 \N \N \N \N \N \N \N \N 1 nobody http://fake.me http://fake.me x http://fake.me \N http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me \N \N \N \N \N \N \N \N \N \N \N \N 2019-06-13 16:35:25 00000000-0000-0000-0000-000000000000 +nan kannayoshihiro@gmail.com KANNA Yoshihiro UTMC 2009-04-17 12:43:58 \N 0 0 \N \N \N \N \N \N kannayoshihiro@gmail.com 2021-01-28 21:56:10-06 74832 nan https://api.github.com/users/nan https://github.com/nan MDQ6VXNlcjc0ODMy https://avatars.githubusercontent.com/u/74832?v=4 https://api.github.com/users/nan/followers https://api.github.com/users/nan/following{/other_user} https://api.github.com/users/nan/gists{/gist_id} https://api.github.com/users/nan/starred{/owner}{/repo} https://api.github.com/users/nan/subscriptions https://api.github.com/users/nan/orgs https://api.github.com/users/nan/repos https://api.github.com/users/nan/events{/privacy} https://api.github.com/users/nan/received_events User false \N \N \N \N \N \N GitHub API Worker 1.0.0 GitHub API 2021-10-28 15:23:46 01000000-0000-0000-0000-000000000000 +\. + + +-- +-- Data for Name: contributors_aliases; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributors_aliases (cntrb_alias_id, canonical_email, alias_email, cntrb_active, cntrb_last_modified, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: discourse_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.discourse_insights (msg_discourse_id, msg_id, discourse_act, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_annual; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_annual (repo_id, email, affiliation, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_annual; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_annual (repo_group_id, email, affiliation, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_monthly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_monthly (repo_group_id, email, affiliation, month, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_weekly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_weekly (repo_group_id, email, affiliation, week, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_monthly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_monthly (repo_id, email, affiliation, month, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_weekly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_weekly (repo_id, email, affiliation, week, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: exclude; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.exclude (id, projects_id, email, domain) FROM stdin; +\. + + +-- +-- Data for Name: issue_assignees; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_assignees (issue_assignee_id, issue_id, repo_id, issue_assignee_src_id, issue_assignee_src_node, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: issue_events; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_events (event_id, issue_id, repo_id, action, action_commit_hash, created_at, node_id, node_url, platform_id, issue_event_src_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: issue_labels; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_labels (issue_label_id, issue_id, repo_id, label_text, label_description, label_color, label_src_id, label_src_node_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: issue_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_message_ref (issue_msg_ref_id, issue_id, repo_id, msg_id, issue_msg_ref_src_node_id, issue_msg_ref_src_comment_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: issues; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issues (issue_id, repo_id, pull_request, pull_request_id, created_at, issue_title, issue_body, comment_count, updated_at, closed_at, due_on, repository_url, issue_url, labels_url, comments_url, events_url, html_url, issue_state, issue_node_id, gh_issue_number, gh_issue_id, gh_user_id, tool_source, tool_version, data_source, data_collection_date, reporter_id, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: libraries; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.libraries (library_id, repo_id, platform, name, created_timestamp, updated_timestamp, library_description, keywords, library_homepage, license, version_count, latest_release_timestamp, latest_release_number, package_manager_id, dependency_count, dependent_library_count, primary_language, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: library_dependencies; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.library_dependencies (lib_dependency_id, library_id, manifest_platform, manifest_filepath, manifest_kind, repo_id_branch, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: library_version; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.library_version (library_version_id, library_id, library_platform, version_number, version_release_date, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: lstm_anomaly_models; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.lstm_anomaly_models (model_id, model_name, model_description, look_back_days, training_days, batch_size, metric, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: lstm_anomaly_results; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.lstm_anomaly_results (result_id, repo_id, repo_category, model_id, metric, contamination_factor, mean_absolute_error, remarks, metric_field, mean_absolute_actual_value, mean_absolute_prediction_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message (msg_id, rgls_id, platform_msg_id, platform_node_id, repo_id, msg_text, msg_timestamp, msg_sender_email, msg_header, pltfrm_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: message_analysis; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_analysis (msg_analysis_id, msg_id, worker_run_id, sentiment_score, reconstruction_error, novelty_flag, feedback_flag, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_analysis_summary; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_analysis_summary (msg_summary_id, repo_id, worker_run_id, positive_ratio, negative_ratio, novel_count, period, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_sentiment; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_sentiment (msg_analysis_id, msg_id, worker_run_id, sentiment_score, reconstruction_error, novelty_flag, feedback_flag, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_sentiment_summary; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_sentiment_summary (msg_summary_id, repo_id, worker_run_id, positive_ratio, negative_ratio, novel_count, period, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: platform; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.platform (pltfrm_id, pltfrm_name, pltfrm_version, pltfrm_release_date, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 GitHub 3 2019-06-05 Manual Entry Sean Goggins GitHub 2019-06-05 17:23:42 +0 Unresolved 0 2019-06-05 Manual Entry Sean Goggins GitHub 2022-07-28 20:43:00 +2 GitLab 2 2019-06-05 Manual Entry Sean Goggins GitHub 2022-07-28 20:43:00 +\. + + +-- +-- Data for Name: pull_request_analysis; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_analysis (pull_request_analysis_id, pull_request_id, merge_probability, mechanism, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_assignees; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_assignees (pr_assignee_map_id, pull_request_id, repo_id, pr_assignee_src_id, tool_source, tool_version, data_source, data_collection_date, contrib_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_commits (pr_cmt_id, pull_request_id, repo_id, pr_cmt_sha, pr_cmt_node_id, pr_cmt_message, pr_cmt_comments_url, pr_cmt_timestamp, pr_cmt_author_email, tool_source, tool_version, data_source, data_collection_date, pr_cmt_author_cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_events; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_events (pr_event_id, pull_request_id, repo_id, action, action_commit_hash, created_at, issue_event_src_id, node_id, node_url, platform_id, pr_platform_event_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_files; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_files (pr_file_id, pull_request_id, repo_id, pr_file_additions, pr_file_deletions, pr_file_path, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_labels; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_labels (pr_label_id, pull_request_id, repo_id, pr_src_id, pr_src_node_id, pr_src_url, pr_src_description, pr_src_color, pr_src_default_bool, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_message_ref (pr_msg_ref_id, pull_request_id, repo_id, msg_id, pr_message_ref_src_comment_id, pr_message_ref_src_node_id, pr_issue_url, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_meta; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_meta (pr_repo_meta_id, pull_request_id, repo_id, pr_head_or_base, pr_src_meta_label, pr_src_meta_ref, pr_sha, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_repo (pr_repo_id, pr_repo_meta_id, pr_repo_head_or_base, pr_src_repo_id, pr_src_node_id, pr_repo_name, pr_repo_full_name, pr_repo_private_bool, tool_source, tool_version, data_source, data_collection_date, pr_cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_review_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_review_message_ref (pr_review_msg_ref_id, pr_review_id, repo_id, msg_id, pr_review_msg_url, pr_review_src_id, pr_review_msg_src_id, pr_review_msg_node_id, pr_review_msg_diff_hunk, pr_review_msg_path, pr_review_msg_position, pr_review_msg_original_position, pr_review_msg_commit_id, pr_review_msg_original_commit_id, pr_review_msg_updated_at, pr_review_msg_html_url, pr_url, pr_review_msg_author_association, pr_review_msg_start_line, pr_review_msg_original_start_line, pr_review_msg_start_side, pr_review_msg_line, pr_review_msg_original_line, pr_review_msg_side, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_reviewers; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_reviewers (pr_reviewer_map_id, pull_request_id, pr_source_id, repo_id, pr_reviewer_src_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_reviews; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_reviews (pr_review_id, pull_request_id, repo_id, pr_review_author_association, pr_review_state, pr_review_body, pr_review_submitted_at, pr_review_src_id, pr_review_node_id, pr_review_html_url, pr_review_pull_request_url, pr_review_commit_id, platform_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_teams; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_teams (pr_team_id, pull_request_id, pr_src_team_id, pr_src_team_node, pr_src_team_url, pr_team_name, pr_team_slug, pr_team_description, pr_team_privacy, pr_team_permission, pr_team_src_members_url, pr_team_src_repositories_url, pr_team_parent_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_requests; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_requests (pull_request_id, repo_id, pr_url, pr_src_id, pr_src_node_id, pr_html_url, pr_diff_url, pr_patch_url, pr_issue_url, pr_augur_issue_id, pr_src_number, pr_src_state, pr_src_locked, pr_src_title, pr_body, pr_created_at, pr_updated_at, pr_closed_at, pr_merged_at, pr_merge_commit_sha, pr_teams, pr_milestone, pr_commits_url, pr_review_comments_url, pr_review_comment_url, pr_comments_url, pr_statuses_url, pr_meta_head_id, pr_meta_base_id, pr_src_issue_url, pr_src_comments_url, pr_src_review_comments_url, pr_src_commits_url, pr_src_statuses_url, pr_src_author_association, tool_source, tool_version, data_source, data_collection_date, pr_augur_contributor_id) FROM stdin; +\. + + +-- +-- Data for Name: releases; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.releases (release_id, repo_id, release_name, release_description, release_author, release_created_at, release_published_at, release_updated_at, release_is_draft, release_is_prerelease, release_tag_name, release_url, tag_only, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_status, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +25452 10 https://github.com/chaoss/whitepaper \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +24442 10 https://github.com/operate-first/blueprint \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2020-04-17 21:40:39 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 +1 1 https://github.com/chaoss/augur \N \N 2021-08-10 14:28:44 New \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 +25430 10 https://github.com/SociallyCompute/update-test \N \N 2021-10-07 08:50:13 New \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N +25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +\. + + +-- +-- Data for Name: repo_badging; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_badging (badge_collection_id, repo_id, created_at, tool_source, tool_version, data_source, data_collection_date, data) FROM stdin; +\. + + +-- +-- Data for Name: repo_cluster_messages; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_cluster_messages (msg_cluster_id, repo_id, cluster_content, cluster_mechanism, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_dependencies; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_dependencies (repo_dependencies_id, repo_id, dep_name, dep_count, dep_language, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_deps_libyear; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_deps_libyear (repo_deps_libyear_id, repo_id, name, requirement, type, package_manager, current_verion, latest_version, current_release_date, latest_release_date, libyear, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_deps_scorecard; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, status, score, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_group_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_group_insights (rgi_id, repo_group_id, rgi_metric, rgi_value, cms_id, rgi_fresh, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_groups; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_groups (repo_group_id, rg_name, rg_description, rg_website, rg_recache, rg_last_modified, rg_type, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 Default Repo Group The default repo group created by the schema generation script 0 2019-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +10 Default Repo Group The default repo group created by the schema generation script 0 2021-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +\. + + +-- +-- Data for Name: repo_groups_list_serve; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_groups_list_serve (rgls_id, repo_group_id, rgls_name, rgls_description, rgls_sponsor, rgls_email, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_info; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_info (repo_info_id, repo_id, last_updated, issues_enabled, open_issues, pull_requests_enabled, wiki_enabled, pages_enabled, fork_count, default_branch, watchers_count, "UUID", license, stars_count, committers_count, issue_contributors_count, changelog_file, contributing_file, license_file, code_of_conduct_file, security_issue_file, security_audit_file, status, keywords, commit_count, issues_count, issues_closed, pull_request_count, pull_requests_open, pull_requests_closed, pull_requests_merged, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_insights (ri_id, repo_id, ri_metric, ri_value, ri_date, ri_fresh, tool_source, tool_version, data_source, data_collection_date, ri_score, ri_field, ri_detection_method) FROM stdin; +\. + + +-- +-- Data for Name: repo_insights_records; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_insights_records (ri_id, repo_id, ri_metric, ri_field, ri_value, ri_date, ri_score, ri_detection_method, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_labor; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_labor (repo_labor_id, repo_id, repo_clone_date, rl_analysis_date, programming_language, file_path, file_name, total_lines, code_lines, comment_lines, blank_lines, code_complexity, repo_url, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_meta; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_meta (repo_id, rmeta_id, rmeta_name, rmeta_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_sbom_scans; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_sbom_scans (rsb_id, repo_id, sbom_scan) FROM stdin; +\. + + +-- +-- Data for Name: repo_stats; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_stats (repo_id, rstat_id, rstat_name, rstat_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_test_coverage; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_test_coverage (repo_id, repo_clone_date, rtc_analysis_date, programming_language, file_path, file_name, testing_tool, file_statement_count, file_subroutine_count, file_statements_tested, file_subroutines_tested, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_topic; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_topic (repo_topic_id, repo_id, topic_id, topic_prob, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repos_fetch_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repos_fetch_log (repos_id, status, date) FROM stdin; +\. + + +-- +-- Data for Name: settings; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.settings (id, setting, value, last_modified) FROM stdin; +5 report_date committer 2019-05-07 12:47:26 +6 report_attribution author 2019-05-07 12:47:26 +10 google_analytics disabled 2019-05-07 12:47:26 +11 update_frequency 24 2019-05-07 12:47:26 +12 database_version 7 2019-05-07 12:47:26 +13 results_visibility show 2019-05-07 12:47:26 +1 start_date 2001-01-01 1900-01-22 20:34:51 +4 log_level Debug 2019-05-07 12:47:26 +2 repo_directory /augur/repos/ 2019-05-07 12:47:26 +8 affiliations_processed 2001-08-26 10:03:29.815013+00 1900-01-22 20:36:27 +9 aliases_processed 2001-08-26 10:03:29.815013+00 1900-01-22 20:36:27 +7 working_author done 1900-01-22 20:23:43 +3 utility_status Idle 1900-01-22 20:38:07 +\. + + +-- +-- Data for Name: topic_words; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.topic_words (topic_words_id, topic_id, word, word_prob, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: unknown_cache; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.unknown_cache (type, repo_group_id, email, domain, added, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: unresolved_commit_emails; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.unresolved_commit_emails (email_unresolved_id, email, name, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: utility_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.utility_log (id, level, status, attempted) FROM stdin; +\. + + +-- +-- Data for Name: working_commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.working_commits (repos_id, working_commit) FROM stdin; +\. + + +-- +-- Data for Name: all; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations."all" ("Name", "Bytes", "Lines", "Code", "Comment", "Blank", "Complexity", "Count", "WeightedComplexity", "Files") FROM stdin; +\. + + +-- +-- Data for Name: augur_settings; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.augur_settings (id, setting, value, last_modified) FROM stdin; +1 augur_data_version 100 2021-10-12 08:41:51 +\. + + +-- +-- Data for Name: config; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.config (id, section_name, setting_name, value, type) FROM stdin; +1 Augur developer 0 int +2 Augur version 1 int +5 Facade check_updates 1 int +6 Facade clone_repos 1 int +7 Facade create_xlsx_summary_files 1 int +8 Facade delete_marked_repos 0 int +9 Facade fix_affiliations 1 int +10 Facade force_analysis 1 int +11 Facade force_invalidate_caches 1 int +12 Facade force_updates 1 int +13 Facade limited_run 0 int +14 Facade multithreaded 1 int +15 Facade nuke_stored_affiliations 0 int +16 Facade pull_repos 1 int +17 Facade rebuild_caches 1 int +18 Facade run_analysis 1 int +20 Server cache_expire 3600 str +21 Server host 0.0.0.0 str +22 Server port 5000 int +23 Server workers 6 int +24 Server timeout 6000 int +25 Server ssl false bool +26 Server ssl_cert_file \N \N +27 Server ssl_key_file \N \N +29 Logging log_level INFO str +30 Logging verbose 0 int +31 Logging quiet 0 int +32 Logging debug 0 int +33 Celery concurrency 12 int +34 Redis cache_group 0 int +35 Redis connection_string redis://localhost:6379/ str +19 Facade repo_directory /facade str +28 Logging logs_directory /logs str +3 Keys github_api_key 0 str +4 Keys gitlab_api_key 0 str +\. + + +-- +-- Data for Name: repos_fetch_log; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.repos_fetch_log (repos_id, status, date) FROM stdin; +\. + + +-- +-- Data for Name: users; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin) FROM stdin; +\. + + +-- +-- Data for Name: worker_history; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_history (history_id, repo_id, worker, job_model, oauth_id, "timestamp", status, total_results) FROM stdin; +1 1 workers.repo_info_worker.50723 repo_info 0 2021-10-17 12:05:22 Success 1 +2 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:34:30 Success 0 +3 1 workers.github_worker.9396 repo_info 0 2021-12-20 10:34:32 Stopped 0 +4 1 workers.github_worker.9396 issues 0 2021-12-20 10:34:50 Error 0 +5 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:34:33 Success 1 +6 1 workers.insight_worker.9082 insights 0 2021-12-20 10:34:32 Success 0 +7 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:34:32 Success 1 +8 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:36:31 Success 0 +9 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:36:33 Success 0 +10 24441 workers.github_worker.9396 issues 0 2021-12-20 10:36:34 Error 0 +11 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:36:34 Success 1 +12 24441 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:36:33 Success 0 +13 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:36:33 Stopped 0 +14 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:38:32 Success 0 +15 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:39:00 Success 0 +16 24442 workers.github_worker.9396 issues 0 2021-12-20 10:38:35 Error 0 +17 24442 workers.insight_worker.9082 insights 0 2021-12-20 10:38:33 Success 0 +18 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:38:34 Success 1 +19 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:39:00 Stopped 0 +20 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:40:32 Success 0 +21 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:40:33 Success 0 +22 25430 workers.insight_worker.9082 insights 0 2021-12-20 10:40:34 Success 0 +23 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:40:34 Success 0 +24 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:40:34 Stopped 0 +25 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:40:35 Success 1 +26 25430 workers.insight_worker.9082 insights 0 2021-12-20 10:50:56 Success 0 +27 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:51:26 Success 0 +28 1 workers.github_worker.9396 issues 0 2021-12-20 10:51:14 Error 0 +29 1 workers.release_worker.9488 releases 0 2021-12-20 10:51:01 Success 1 +30 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:50:56 Success 0 +31 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:51:26 Success 0 +32 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:51:26 Stopped 0 +33 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:52:57 Success 0 +34 1 workers.insight_worker.9082 insights 0 2021-12-20 10:52:56 Success 0 +35 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:52:58 Success 1 +36 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:52:57 Success 1 +37 24441 workers.release_worker.9488 repo_info 0 2021-12-20 10:52:56 Stopped 0 +38 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:52:57 Success 0 +39 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:52:57 Stopped 0 +40 24441 workers.insight_worker.9082 insights 0 2021-12-20 10:54:59 Success 2 +41 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:54:57 Success 0 +42 24442 workers.github_worker.9396 issues 0 2021-12-20 10:54:58 Error 0 +43 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:54:58 Success 1 +44 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:54:57 Success 0 +45 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:54:57 Stopped 0 +46 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:56:56 Success 0 +47 24442 workers.insight_worker.9082 insights 0 2021-12-20 10:56:57 Success 0 +48 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:56:56 Success 0 +49 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:56:56 Stopped 0 +50 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:56:58 Success 1 +51 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:56:58 Success 0 +52 24442 workers.insight_worker.9082 insights 0 2021-12-20 11:37:29 Success 0 +53 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:37:28 Success 1 +54 1 workers.github_worker.9396 issues 0 2021-12-20 11:38:35 Error 0 +55 1 workers.release_worker.9488 releases 0 2021-12-20 11:37:32 Success 1 +56 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:37:27 Success 0 +57 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:37:27 Stopped 0 +58 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:38:25 Success 0 +59 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:39:29 Success 1 +60 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:39:28 Success 0 +61 24441 workers.github_worker.9396 issues 0 2021-12-20 11:39:49 Success 0 +62 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:39:27 Success 0 +63 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:39:27 Stopped 0 +64 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:39:47 Success 0 +65 25430 workers.insight_worker.9082 insights 0 2021-12-20 11:39:29 Success 0 +66 1 workers.insight_worker.9082 insights 0 2021-12-20 11:41:32 Success 1 +67 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:41:28 Success 1 +68 24442 workers.github_worker.9396 issues 0 2021-12-20 11:42:22 Success 0 +69 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:41:30 Success 1 +70 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:41:28 Stopped 0 +71 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:42:05 Success 0 +72 24441 workers.insight_worker.9082 insights 0 2021-12-20 11:43:33 Success 1 +73 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:43:29 Success 1 +74 25430 workers.github_worker.9396 issues 0 2021-12-20 11:43:31 Success 0 +75 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:43:49 Success 0 +76 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:43:49 Stopped 0 +77 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:44:10 Success 0 +78 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:52:46 Success 0 +79 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:52:31 Success 1 +80 24441 workers.github_worker.9396 repo_info 0 2021-12-20 12:05:59 Stopped 0 +81 24442 workers.github_worker.9396 repo_info 0 2021-12-20 12:06:20 Stopped 0 +82 25430 workers.github_worker.9396 repo_info 0 2021-12-20 12:07:08 Stopped 0 +83 25430 workers.github_worker.9396 issues 0 2021-12-20 12:07:11 Success 0 +84 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:53:12 Stopped 0 +85 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:54:45 Success 0 +86 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:54:28 Success 1 +87 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:54:28 Success 0 +88 24441 workers.release_worker.9488 repo_info 0 2021-12-20 11:54:28 Stopped 0 +89 24442 workers.insight_worker.9082 insights 0 2021-12-20 11:54:31 Success 0 +90 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 12:16:33 Success 0 +91 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:56:31 Success 0 +92 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:56:32 Success 1 +93 25430 workers.insight_worker.9082 insights 0 2021-12-20 11:56:34 Success 0 +94 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:58:31 Success 1 +95 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:58:33 Success 1 +96 1 workers.insight_worker.9082 insights 0 2021-12-20 11:58:34 Success 0 +97 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:16:33 Stopped 0 +98 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 12:17:02 Success 0 +99 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 12:17:06 Success 0 +100 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:17:07 Stopped 0 +101 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 12:17:08 Success 0 +102 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:17:08 Stopped 0 +103 1 workers.insight_worker.9082 insights 0 2021-12-20 12:43:41 Success 0 +104 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:43:38 Stopped 0 +105 24441 workers.github_worker.9396 repo_info 14 2021-12-20 12:55:23 Stopped 0 +106 24442 workers.github_worker.9396 repo_info 14 2021-12-20 12:55:44 Stopped 0 +107 25430 workers.github_worker.9396 repo_info 14 2021-12-20 12:56:32 Stopped 0 +108 1 workers.pull_request_worker.9145 pull_requests 1017 2021-12-20 12:58:53 Success 0 +109 24441 workers.insight_worker.9082 insights 0 2021-12-20 12:45:43 Success 1 +110 24441 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:45:39 Success 0 +111 24441 workers.release_worker.9488 repo_info 0 2021-12-20 12:45:38 Stopped 0 +112 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 12:45:41 Success 1 +113 24442 workers.insight_worker.9082 insights 0 2021-12-20 12:47:41 Success 0 +114 24442 workers.repo_info_worker.9176 repo_info 1022 2021-12-20 12:47:48 Success 1 +115 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:47:40 Success 0 +116 25430 workers.insight_worker.9082 insights 0 2021-12-20 12:49:41 Success 0 +117 25430 workers.repo_info_worker.9176 repo_info 14 2021-12-20 12:49:48 Success 1 +118 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:49:40 Success 0 +119 1 workers.pull_request_worker.9145 pull_request_files 1017 2021-12-20 13:09:07 Success 0 +120 1 workers.pull_request_worker.9145 repo_info 1017 2021-12-20 13:09:07 Stopped 0 +\. + + +-- +-- Data for Name: worker_job; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_job (job_model, state, zombie_head, since_id_str, description, last_count, last_run, analysis_state, oauth_id) FROM stdin; +\. + + +-- +-- Data for Name: worker_oauth; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_oauth (oauth_id, name, consumer_key, consumer_secret, access_token, access_token_secret, repo_directory, platform) FROM stdin; +\. + + +-- +-- Data for Name: worker_settings_facade; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_settings_facade (id, setting, value, last_modified) FROM stdin; +\. + + +-- +-- Data for Name: working_commits; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.working_commits (repos_id, working_commit) FROM stdin; +\. + + +-- +-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: augur +-- + +COPY public.alembic_version (version_num) FROM stdin; +11 +\. + + +-- +-- Data for Name: annotation_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.annotation_types (annotation_type_id, name) FROM stdin; +1 REVIEW +2 OTHER +\. + + +-- +-- Data for Name: annotations; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.annotations (annotation_id, document_id, annotation_type_id, identifier_id, creator_id, created_ts, comment) FROM stdin; +\. + + +-- +-- Data for Name: augur_repo_map; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.augur_repo_map (map_id, dosocs_pkg_id, dosocs_pkg_name, repo_id, repo_path) FROM stdin; +\. + + +-- +-- Data for Name: creator_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.creator_types (creator_type_id, name) FROM stdin; +1 Person +2 Organization +3 Tool +\. + + +-- +-- Data for Name: creators; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.creators (creator_id, creator_type_id, name, email) FROM stdin; +1 3 dosocs2-0.16.1 +\. + + +-- +-- Data for Name: document_namespaces; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.document_namespaces (document_namespace_id, uri) FROM stdin; +\. + + +-- +-- Data for Name: documents; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.documents (document_id, document_namespace_id, data_license_id, spdx_version, name, license_list_version, created_ts, creator_comment, document_comment, package_id) FROM stdin; +\. + + +-- +-- Data for Name: documents_creators; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.documents_creators (document_creator_id, document_id, creator_id) FROM stdin; +\. + + +-- +-- Data for Name: external_refs; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.external_refs (external_ref_id, document_id, document_namespace_id, id_string, sha256) FROM stdin; +\. + + +-- +-- Data for Name: file_contributors; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.file_contributors (file_contributor_id, file_id, contributor) FROM stdin; +\. + + +-- +-- Data for Name: file_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.file_types (file_type_id, name) FROM stdin; +4 APPLICATION +3 ARCHIVE +5 AUDIO +2 BINARY +9 DOCUMENTATION +6 IMAGE +11 OTHER +1 SOURCE +10 SPDX +7 TEXT +8 VIDEO +\. + + +-- +-- Data for Name: files; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files (file_id, file_type_id, sha256, copyright_text, package_id, comment, notice) FROM stdin; +\. + + +-- +-- Data for Name: files_licenses; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files_licenses (file_license_id, file_id, license_id, extracted_text) FROM stdin; +\. + + +-- +-- Data for Name: files_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files_scans (file_scan_id, file_id, scanner_id) FROM stdin; +\. + + +-- +-- Data for Name: identifiers; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.identifiers (identifier_id, document_namespace_id, id_string, document_id, package_id, package_file_id) FROM stdin; +\. + + +-- +-- Data for Name: licenses; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.licenses (license_id, name, short_name, cross_reference, comment, is_spdx_official) FROM stdin; +1 3dfx Glide License Glide http://spdx.org/licenses/Glide.html t +2 Abstyles License Abstyles http://spdx.org/licenses/Abstyles.html t +3 Academic Free License v1.1 AFL-1.1 http://spdx.org/licenses/AFL-1.1.html t +4 Academic Free License v1.2 AFL-1.2 http://spdx.org/licenses/AFL-1.2.html t +5 Academic Free License v2.0 AFL-2.0 http://spdx.org/licenses/AFL-2.0.html t +6 Academic Free License v2.1 AFL-2.1 http://spdx.org/licenses/AFL-2.1.html t +7 Academic Free License v3.0 AFL-3.0 http://spdx.org/licenses/AFL-3.0.html t +8 Academy of Motion Picture Arts and Sciences BSD AMPAS http://spdx.org/licenses/AMPAS.html t +9 Adaptive Public License 1.0 APL-1.0 http://spdx.org/licenses/APL-1.0.html t +10 Adobe Glyph List License Adobe-Glyph http://spdx.org/licenses/Adobe-Glyph.html t +11 Adobe Postscript AFM License APAFML http://spdx.org/licenses/APAFML.html t +12 Adobe Systems Incorporated Source Code License Agreement Adobe-2006 http://spdx.org/licenses/Adobe-2006.html t +13 Affero General Public License v1.0 AGPL-1.0 http://spdx.org/licenses/AGPL-1.0.html t +14 Afmparse License Afmparse http://spdx.org/licenses/Afmparse.html t +15 Aladdin Free Public License Aladdin http://spdx.org/licenses/Aladdin.html t +16 Amazon Digital Services License ADSL http://spdx.org/licenses/ADSL.html t +17 AMD's plpa_map.c License AMDPLPA http://spdx.org/licenses/AMDPLPA.html t +18 ANTLR Software Rights Notice ANTLR-PD http://spdx.org/licenses/ANTLR-PD.html t +19 Apache License 1.0 Apache-1.0 http://spdx.org/licenses/Apache-1.0.html t +20 Apache License 1.1 Apache-1.1 http://spdx.org/licenses/Apache-1.1.html t +21 Apache License 2.0 Apache-2.0 http://spdx.org/licenses/Apache-2.0.html t +22 Apple MIT License AML http://spdx.org/licenses/AML.html t +23 Apple Public Source License 1.0 APSL-1.0 http://spdx.org/licenses/APSL-1.0.html t +24 Apple Public Source License 1.1 APSL-1.1 http://spdx.org/licenses/APSL-1.1.html t +25 Apple Public Source License 1.2 APSL-1.2 http://spdx.org/licenses/APSL-1.2.html t +26 Apple Public Source License 2.0 APSL-2.0 http://spdx.org/licenses/APSL-2.0.html t +27 Artistic License 1.0 Artistic-1.0 http://spdx.org/licenses/Artistic-1.0.html t +28 Artistic License 1.0 (Perl) Artistic-1.0-Perl http://spdx.org/licenses/Artistic-1.0-Perl.html t +29 Artistic License 1.0 w/clause 8 Artistic-1.0-cl8 http://spdx.org/licenses/Artistic-1.0-cl8.html t +30 Artistic License 2.0 Artistic-2.0 http://spdx.org/licenses/Artistic-2.0.html t +31 Attribution Assurance License AAL http://spdx.org/licenses/AAL.html t +32 Bahyph License Bahyph http://spdx.org/licenses/Bahyph.html t +33 Barr License Barr http://spdx.org/licenses/Barr.html t +34 Beerware License Beerware http://spdx.org/licenses/Beerware.html t +35 BitTorrent Open Source License v1.0 BitTorrent-1.0 http://spdx.org/licenses/BitTorrent-1.0.html t +36 BitTorrent Open Source License v1.1 BitTorrent-1.1 http://spdx.org/licenses/BitTorrent-1.1.html t +37 Boost Software License 1.0 BSL-1.0 http://spdx.org/licenses/BSL-1.0.html t +38 Borceux license Borceux http://spdx.org/licenses/Borceux.html t +39 BSD 2-clause "Simplified" License BSD-2-Clause http://spdx.org/licenses/BSD-2-Clause.html t +40 BSD 2-clause FreeBSD License BSD-2-Clause-FreeBSD http://spdx.org/licenses/BSD-2-Clause-FreeBSD.html t +41 BSD 2-clause NetBSD License BSD-2-Clause-NetBSD http://spdx.org/licenses/BSD-2-Clause-NetBSD.html t +42 BSD 3-clause "New" or "Revised" License BSD-3-Clause http://spdx.org/licenses/BSD-3-Clause.html t +43 BSD 3-clause Clear License BSD-3-Clause-Clear http://spdx.org/licenses/BSD-3-Clause-Clear.html t +44 BSD 4-clause "Original" or "Old" License BSD-4-Clause http://spdx.org/licenses/BSD-4-Clause.html t +45 BSD Protection License BSD-Protection http://spdx.org/licenses/BSD-Protection.html t +46 BSD with attribution BSD-3-Clause-Attribution http://spdx.org/licenses/BSD-3-Clause-Attribution.html t +47 BSD Zero Clause License 0BSD http://spdx.org/licenses/0BSD.html t +48 BSD-4-Clause (University of California-Specific) BSD-4-Clause-UC http://spdx.org/licenses/BSD-4-Clause-UC.html t +49 bzip2 and libbzip2 License v1.0.5 bzip2-1.0.5 http://spdx.org/licenses/bzip2-1.0.5.html t +50 bzip2 and libbzip2 License v1.0.6 bzip2-1.0.6 http://spdx.org/licenses/bzip2-1.0.6.html t +51 Caldera License Caldera http://spdx.org/licenses/Caldera.html t +52 CeCILL Free Software License Agreement v1.0 CECILL-1.0 http://spdx.org/licenses/CECILL-1.0.html t +53 CeCILL Free Software License Agreement v1.1 CECILL-1.1 http://spdx.org/licenses/CECILL-1.1.html t +54 CeCILL Free Software License Agreement v2.0 CECILL-2.0 http://spdx.org/licenses/CECILL-2.0.html t +55 CeCILL Free Software License Agreement v2.1 CECILL-2.1 http://spdx.org/licenses/CECILL-2.1.html t +56 CeCILL-B Free Software License Agreement CECILL-B http://spdx.org/licenses/CECILL-B.html t +57 CeCILL-C Free Software License Agreement CECILL-C http://spdx.org/licenses/CECILL-C.html t +58 Clarified Artistic License ClArtistic http://spdx.org/licenses/ClArtistic.html t +59 CMU License MIT-CMU http://spdx.org/licenses/MIT-CMU.html t +60 CNRI Jython License CNRI-Jython http://spdx.org/licenses/CNRI-Jython.html t +61 CNRI Python License CNRI-Python http://spdx.org/licenses/CNRI-Python.html t +62 CNRI Python Open Source GPL Compatible License Agreement CNRI-Python-GPL-Compatible http://spdx.org/licenses/CNRI-Python-GPL-Compatible.html t +63 Code Project Open License 1.02 CPOL-1.02 http://spdx.org/licenses/CPOL-1.02.html t +64 Common Development and Distribution License 1.0 CDDL-1.0 http://spdx.org/licenses/CDDL-1.0.html t +65 Common Development and Distribution License 1.1 CDDL-1.1 http://spdx.org/licenses/CDDL-1.1.html t +66 Common Public Attribution License 1.0 CPAL-1.0 http://spdx.org/licenses/CPAL-1.0.html t +67 Common Public License 1.0 CPL-1.0 http://spdx.org/licenses/CPL-1.0.html t +68 Computer Associates Trusted Open Source License 1.1 CATOSL-1.1 http://spdx.org/licenses/CATOSL-1.1.html t +69 Condor Public License v1.1 Condor-1.1 http://spdx.org/licenses/Condor-1.1.html t +70 Creative Commons Attribution 1.0 CC-BY-1.0 http://spdx.org/licenses/CC-BY-1.0.html t +71 Creative Commons Attribution 2.0 CC-BY-2.0 http://spdx.org/licenses/CC-BY-2.0.html t +72 Creative Commons Attribution 2.5 CC-BY-2.5 http://spdx.org/licenses/CC-BY-2.5.html t +73 Creative Commons Attribution 3.0 CC-BY-3.0 http://spdx.org/licenses/CC-BY-3.0.html t +74 Creative Commons Attribution 4.0 CC-BY-4.0 http://spdx.org/licenses/CC-BY-4.0.html t +75 Creative Commons Attribution No Derivatives 1.0 CC-BY-ND-1.0 http://spdx.org/licenses/CC-BY-ND-1.0.html t +76 Creative Commons Attribution No Derivatives 2.0 CC-BY-ND-2.0 http://spdx.org/licenses/CC-BY-ND-2.0.html t +77 Creative Commons Attribution No Derivatives 2.5 CC-BY-ND-2.5 http://spdx.org/licenses/CC-BY-ND-2.5.html t +78 Creative Commons Attribution No Derivatives 3.0 CC-BY-ND-3.0 http://spdx.org/licenses/CC-BY-ND-3.0.html t +79 Creative Commons Attribution No Derivatives 4.0 CC-BY-ND-4.0 http://spdx.org/licenses/CC-BY-ND-4.0.html t +80 Creative Commons Attribution Non Commercial 1.0 CC-BY-NC-1.0 http://spdx.org/licenses/CC-BY-NC-1.0.html t +81 Creative Commons Attribution Non Commercial 2.0 CC-BY-NC-2.0 http://spdx.org/licenses/CC-BY-NC-2.0.html t +82 Creative Commons Attribution Non Commercial 2.5 CC-BY-NC-2.5 http://spdx.org/licenses/CC-BY-NC-2.5.html t +83 Creative Commons Attribution Non Commercial 3.0 CC-BY-NC-3.0 http://spdx.org/licenses/CC-BY-NC-3.0.html t +84 Creative Commons Attribution Non Commercial 4.0 CC-BY-NC-4.0 http://spdx.org/licenses/CC-BY-NC-4.0.html t +85 Creative Commons Attribution Non Commercial No Derivatives 1.0 CC-BY-NC-ND-1.0 http://spdx.org/licenses/CC-BY-NC-ND-1.0.html t +86 Creative Commons Attribution Non Commercial No Derivatives 2.0 CC-BY-NC-ND-2.0 http://spdx.org/licenses/CC-BY-NC-ND-2.0.html t +87 Creative Commons Attribution Non Commercial No Derivatives 2.5 CC-BY-NC-ND-2.5 http://spdx.org/licenses/CC-BY-NC-ND-2.5.html t +88 Creative Commons Attribution Non Commercial No Derivatives 3.0 CC-BY-NC-ND-3.0 http://spdx.org/licenses/CC-BY-NC-ND-3.0.html t +89 Creative Commons Attribution Non Commercial No Derivatives 4.0 CC-BY-NC-ND-4.0 http://spdx.org/licenses/CC-BY-NC-ND-4.0.html t +90 Creative Commons Attribution Non Commercial Share Alike 1.0 CC-BY-NC-SA-1.0 http://spdx.org/licenses/CC-BY-NC-SA-1.0.html t +91 Creative Commons Attribution Non Commercial Share Alike 2.0 CC-BY-NC-SA-2.0 http://spdx.org/licenses/CC-BY-NC-SA-2.0.html t +92 Creative Commons Attribution Non Commercial Share Alike 2.5 CC-BY-NC-SA-2.5 http://spdx.org/licenses/CC-BY-NC-SA-2.5.html t +93 Creative Commons Attribution Non Commercial Share Alike 3.0 CC-BY-NC-SA-3.0 http://spdx.org/licenses/CC-BY-NC-SA-3.0.html t +94 Creative Commons Attribution Non Commercial Share Alike 4.0 CC-BY-NC-SA-4.0 http://spdx.org/licenses/CC-BY-NC-SA-4.0.html t +95 Creative Commons Attribution Share Alike 1.0 CC-BY-SA-1.0 http://spdx.org/licenses/CC-BY-SA-1.0.html t +96 Creative Commons Attribution Share Alike 2.0 CC-BY-SA-2.0 http://spdx.org/licenses/CC-BY-SA-2.0.html t +97 Creative Commons Attribution Share Alike 2.5 CC-BY-SA-2.5 http://spdx.org/licenses/CC-BY-SA-2.5.html t +98 Creative Commons Attribution Share Alike 3.0 CC-BY-SA-3.0 http://spdx.org/licenses/CC-BY-SA-3.0.html t +99 Creative Commons Attribution Share Alike 4.0 CC-BY-SA-4.0 http://spdx.org/licenses/CC-BY-SA-4.0.html t +100 Creative Commons Zero v1.0 Universal CC0-1.0 http://spdx.org/licenses/CC0-1.0.html t +101 Crossword License Crossword http://spdx.org/licenses/Crossword.html t +102 CrystalStacker License CrystalStacker http://spdx.org/licenses/CrystalStacker.html t +103 CUA Office Public License v1.0 CUA-OPL-1.0 http://spdx.org/licenses/CUA-OPL-1.0.html t +104 Cube License Cube http://spdx.org/licenses/Cube.html t +105 Deutsche Freie Software Lizenz D-FSL-1.0 http://spdx.org/licenses/D-FSL-1.0.html t +106 diffmark license diffmark http://spdx.org/licenses/diffmark.html t +107 Do What The F*ck You Want To Public License WTFPL http://spdx.org/licenses/WTFPL.html t +108 DOC License DOC http://spdx.org/licenses/DOC.html t +109 Dotseqn License Dotseqn http://spdx.org/licenses/Dotseqn.html t +110 DSDP License DSDP http://spdx.org/licenses/DSDP.html t +111 dvipdfm License dvipdfm http://spdx.org/licenses/dvipdfm.html t +112 Eclipse Public License 1.0 EPL-1.0 http://spdx.org/licenses/EPL-1.0.html t +113 Educational Community License v1.0 ECL-1.0 http://spdx.org/licenses/ECL-1.0.html t +114 Educational Community License v2.0 ECL-2.0 http://spdx.org/licenses/ECL-2.0.html t +115 eGenix.com Public License 1.1.0 eGenix http://spdx.org/licenses/eGenix.html t +116 Eiffel Forum License v1.0 EFL-1.0 http://spdx.org/licenses/EFL-1.0.html t +117 Eiffel Forum License v2.0 EFL-2.0 http://spdx.org/licenses/EFL-2.0.html t +118 Enlightenment License (e16) MIT-advertising http://spdx.org/licenses/MIT-advertising.html t +119 enna License MIT-enna http://spdx.org/licenses/MIT-enna.html t +120 Entessa Public License v1.0 Entessa http://spdx.org/licenses/Entessa.html t +121 Erlang Public License v1.1 ErlPL-1.1 http://spdx.org/licenses/ErlPL-1.1.html t +122 EU DataGrid Software License EUDatagrid http://spdx.org/licenses/EUDatagrid.html t +123 European Union Public License 1.0 EUPL-1.0 http://spdx.org/licenses/EUPL-1.0.html t +124 European Union Public License 1.1 EUPL-1.1 http://spdx.org/licenses/EUPL-1.1.html t +125 Eurosym License Eurosym http://spdx.org/licenses/Eurosym.html t +126 Fair License Fair http://spdx.org/licenses/Fair.html t +127 feh License MIT-feh http://spdx.org/licenses/MIT-feh.html t +128 Frameworx Open License 1.0 Frameworx-1.0 http://spdx.org/licenses/Frameworx-1.0.html t +129 FreeImage Public License v1.0 FreeImage http://spdx.org/licenses/FreeImage.html t +130 Freetype Project License FTL http://spdx.org/licenses/FTL.html t +131 FSF Unlimited License FSFUL http://spdx.org/licenses/FSFUL.html t +132 FSF Unlimited License (with License Retention) FSFULLR http://spdx.org/licenses/FSFULLR.html t +133 Giftware License Giftware http://spdx.org/licenses/Giftware.html t +134 GL2PS License GL2PS http://spdx.org/licenses/GL2PS.html t +135 Glulxe License Glulxe http://spdx.org/licenses/Glulxe.html t +136 GNU Affero General Public License v3.0 AGPL-3.0 http://spdx.org/licenses/AGPL-3.0.html t +137 GNU Free Documentation License v1.1 GFDL-1.1 http://spdx.org/licenses/GFDL-1.1.html t +138 GNU Free Documentation License v1.2 GFDL-1.2 http://spdx.org/licenses/GFDL-1.2.html t +139 GNU Free Documentation License v1.3 GFDL-1.3 http://spdx.org/licenses/GFDL-1.3.html t +140 GNU General Public License v1.0 only GPL-1.0 http://spdx.org/licenses/GPL-1.0.html t +141 GNU General Public License v2.0 only GPL-2.0 http://spdx.org/licenses/GPL-2.0.html t +142 GNU General Public License v3.0 only GPL-3.0 http://spdx.org/licenses/GPL-3.0.html t +143 GNU Lesser General Public License v2.1 only LGPL-2.1 http://spdx.org/licenses/LGPL-2.1.html t +144 GNU Lesser General Public License v3.0 only LGPL-3.0 http://spdx.org/licenses/LGPL-3.0.html t +145 GNU Library General Public License v2 only LGPL-2.0 http://spdx.org/licenses/LGPL-2.0.html t +146 gnuplot License gnuplot http://spdx.org/licenses/gnuplot.html t +147 gSOAP Public License v1.3b gSOAP-1.3b http://spdx.org/licenses/gSOAP-1.3b.html t +148 Haskell Language Report License HaskellReport http://spdx.org/licenses/HaskellReport.html t +149 Historic Permission Notice and Disclaimer HPND http://spdx.org/licenses/HPND.html t +150 IBM PowerPC Initialization and Boot Software IBM-pibs http://spdx.org/licenses/IBM-pibs.html t +151 IBM Public License v1.0 IPL-1.0 http://spdx.org/licenses/IPL-1.0.html t +152 ICU License ICU http://spdx.org/licenses/ICU.html t +153 ImageMagick License ImageMagick http://spdx.org/licenses/ImageMagick.html t +154 iMatix Standard Function Library Agreement iMatix http://spdx.org/licenses/iMatix.html t +155 Imlib2 License Imlib2 http://spdx.org/licenses/Imlib2.html t +156 Independent JPEG Group License IJG http://spdx.org/licenses/IJG.html t +157 Intel ACPI Software License Agreement Intel-ACPI http://spdx.org/licenses/Intel-ACPI.html t +158 Intel Open Source License Intel http://spdx.org/licenses/Intel.html t +159 Interbase Public License v1.0 Interbase-1.0 http://spdx.org/licenses/Interbase-1.0.html t +160 IPA Font License IPA http://spdx.org/licenses/IPA.html t +161 ISC License ISC http://spdx.org/licenses/ISC.html t +162 JasPer License JasPer-2.0 http://spdx.org/licenses/JasPer-2.0.html t +163 JSON License JSON http://spdx.org/licenses/JSON.html t +164 LaTeX Project Public License 1.3a LPPL-1.3a http://spdx.org/licenses/LPPL-1.3a.html t +165 LaTeX Project Public License v1.0 LPPL-1.0 http://spdx.org/licenses/LPPL-1.0.html t +166 LaTeX Project Public License v1.1 LPPL-1.1 http://spdx.org/licenses/LPPL-1.1.html t +167 LaTeX Project Public License v1.2 LPPL-1.2 http://spdx.org/licenses/LPPL-1.2.html t +168 LaTeX Project Public License v1.3c LPPL-1.3c http://spdx.org/licenses/LPPL-1.3c.html t +169 Latex2e License Latex2e http://spdx.org/licenses/Latex2e.html t +170 Lawrence Berkeley National Labs BSD variant license BSD-3-Clause-LBNL http://spdx.org/licenses/BSD-3-Clause-LBNL.html t +171 Leptonica License Leptonica http://spdx.org/licenses/Leptonica.html t +172 Lesser General Public License For Linguistic Resources LGPLLR http://spdx.org/licenses/LGPLLR.html t +173 libpng License Libpng http://spdx.org/licenses/Libpng.html t +174 libtiff License libtiff http://spdx.org/licenses/libtiff.html t +175 Lucent Public License v1.02 LPL-1.02 http://spdx.org/licenses/LPL-1.02.html t +176 Lucent Public License Version 1.0 LPL-1.0 http://spdx.org/licenses/LPL-1.0.html t +177 MakeIndex License MakeIndex http://spdx.org/licenses/MakeIndex.html t +178 Matrix Template Library License MTLL http://spdx.org/licenses/MTLL.html t +179 Microsoft Public License MS-PL http://spdx.org/licenses/MS-PL.html t +180 Microsoft Reciprocal License MS-RL http://spdx.org/licenses/MS-RL.html t +181 MirOS Licence MirOS http://spdx.org/licenses/MirOS.html t +182 MIT +no-false-attribs license MITNFA http://spdx.org/licenses/MITNFA.html t +183 MIT License MIT http://spdx.org/licenses/MIT.html t +184 Motosoto License Motosoto http://spdx.org/licenses/Motosoto.html t +185 Mozilla Public License 1.0 MPL-1.0 http://spdx.org/licenses/MPL-1.0.html t +186 Mozilla Public License 1.1 MPL-1.1 http://spdx.org/licenses/MPL-1.1.html t +187 Mozilla Public License 2.0 MPL-2.0 http://spdx.org/licenses/MPL-2.0.html t +188 Mozilla Public License 2.0 (no copyleft exception) MPL-2.0-no-copyleft-exception http://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html t +189 mpich2 License mpich2 http://spdx.org/licenses/mpich2.html t +190 Multics License Multics http://spdx.org/licenses/Multics.html t +191 Mup License Mup http://spdx.org/licenses/Mup.html t +192 NASA Open Source Agreement 1.3 NASA-1.3 http://spdx.org/licenses/NASA-1.3.html t +193 Naumen Public License Naumen http://spdx.org/licenses/Naumen.html t +194 Net Boolean Public License v1 NBPL-1.0 http://spdx.org/licenses/NBPL-1.0.html t +195 NetCDF license NetCDF http://spdx.org/licenses/NetCDF.html t +196 Nethack General Public License NGPL http://spdx.org/licenses/NGPL.html t +197 Netizen Open Source License NOSL http://spdx.org/licenses/NOSL.html t +198 Netscape Public License v1.0 NPL-1.0 http://spdx.org/licenses/NPL-1.0.html t +199 Netscape Public License v1.1 NPL-1.1 http://spdx.org/licenses/NPL-1.1.html t +200 Newsletr License Newsletr http://spdx.org/licenses/Newsletr.html t +201 No Limit Public License NLPL http://spdx.org/licenses/NLPL.html t +202 Nokia Open Source License Nokia http://spdx.org/licenses/Nokia.html t +203 Non-Profit Open Software License 3.0 NPOSL-3.0 http://spdx.org/licenses/NPOSL-3.0.html t +204 Noweb License Noweb http://spdx.org/licenses/Noweb.html t +205 NRL License NRL http://spdx.org/licenses/NRL.html t +206 NTP License NTP http://spdx.org/licenses/NTP.html t +207 Nunit License Nunit http://spdx.org/licenses/Nunit.html t +208 OCLC Research Public License 2.0 OCLC-2.0 http://spdx.org/licenses/OCLC-2.0.html t +209 ODC Open Database License v1.0 ODbL-1.0 http://spdx.org/licenses/ODbL-1.0.html t +210 ODC Public Domain Dedication & License 1.0 PDDL-1.0 http://spdx.org/licenses/PDDL-1.0.html t +211 Open Group Test Suite License OGTSL http://spdx.org/licenses/OGTSL.html t +212 Open LDAP Public License 2.2.2 OLDAP-2.2.2 http://spdx.org/licenses/OLDAP-2.2.2.html t +213 Open LDAP Public License v1.1 OLDAP-1.1 http://spdx.org/licenses/OLDAP-1.1.html t +214 Open LDAP Public License v1.2 OLDAP-1.2 http://spdx.org/licenses/OLDAP-1.2.html t +215 Open LDAP Public License v1.3 OLDAP-1.3 http://spdx.org/licenses/OLDAP-1.3.html t +216 Open LDAP Public License v1.4 OLDAP-1.4 http://spdx.org/licenses/OLDAP-1.4.html t +217 Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B) OLDAP-2.0 http://spdx.org/licenses/OLDAP-2.0.html t +218 Open LDAP Public License v2.0.1 OLDAP-2.0.1 http://spdx.org/licenses/OLDAP-2.0.1.html t +219 Open LDAP Public License v2.1 OLDAP-2.1 http://spdx.org/licenses/OLDAP-2.1.html t +220 Open LDAP Public License v2.2 OLDAP-2.2 http://spdx.org/licenses/OLDAP-2.2.html t +221 Open LDAP Public License v2.2.1 OLDAP-2.2.1 http://spdx.org/licenses/OLDAP-2.2.1.html t +222 Open LDAP Public License v2.3 OLDAP-2.3 http://spdx.org/licenses/OLDAP-2.3.html t +223 Open LDAP Public License v2.4 OLDAP-2.4 http://spdx.org/licenses/OLDAP-2.4.html t +224 Open LDAP Public License v2.5 OLDAP-2.5 http://spdx.org/licenses/OLDAP-2.5.html t +225 Open LDAP Public License v2.6 OLDAP-2.6 http://spdx.org/licenses/OLDAP-2.6.html t +226 Open LDAP Public License v2.7 OLDAP-2.7 http://spdx.org/licenses/OLDAP-2.7.html t +227 Open LDAP Public License v2.8 OLDAP-2.8 http://spdx.org/licenses/OLDAP-2.8.html t +228 Open Market License OML http://spdx.org/licenses/OML.html t +229 Open Public License v1.0 OPL-1.0 http://spdx.org/licenses/OPL-1.0.html t +230 Open Software License 1.0 OSL-1.0 http://spdx.org/licenses/OSL-1.0.html t +231 Open Software License 1.1 OSL-1.1 http://spdx.org/licenses/OSL-1.1.html t +232 Open Software License 2.0 OSL-2.0 http://spdx.org/licenses/OSL-2.0.html t +233 Open Software License 2.1 OSL-2.1 http://spdx.org/licenses/OSL-2.1.html t +234 Open Software License 3.0 OSL-3.0 http://spdx.org/licenses/OSL-3.0.html t +235 OpenSSL License OpenSSL http://spdx.org/licenses/OpenSSL.html t +236 PHP License v3.0 PHP-3.0 http://spdx.org/licenses/PHP-3.0.html t +237 PHP License v3.01 PHP-3.01 http://spdx.org/licenses/PHP-3.01.html t +238 Plexus Classworlds License Plexus http://spdx.org/licenses/Plexus.html t +239 PostgreSQL License PostgreSQL http://spdx.org/licenses/PostgreSQL.html t +240 psfrag License psfrag http://spdx.org/licenses/psfrag.html t +241 psutils License psutils http://spdx.org/licenses/psutils.html t +242 Python License 2.0 Python-2.0 http://spdx.org/licenses/Python-2.0.html t +243 Q Public License 1.0 QPL-1.0 http://spdx.org/licenses/QPL-1.0.html t +244 Qhull License Qhull http://spdx.org/licenses/Qhull.html t +245 Rdisc License Rdisc http://spdx.org/licenses/Rdisc.html t +246 RealNetworks Public Source License v1.0 RPSL-1.0 http://spdx.org/licenses/RPSL-1.0.html t +247 Reciprocal Public License 1.1 RPL-1.1 http://spdx.org/licenses/RPL-1.1.html t +248 Reciprocal Public License 1.5 RPL-1.5 http://spdx.org/licenses/RPL-1.5.html t +249 Red Hat eCos Public License v1.1 RHeCos-1.1 http://spdx.org/licenses/RHeCos-1.1.html t +250 Ricoh Source Code Public License RSCPL http://spdx.org/licenses/RSCPL.html t +251 RSA Message-Digest License RSA-MD http://spdx.org/licenses/RSA-MD.html t +252 Ruby License Ruby http://spdx.org/licenses/Ruby.html t +253 Sax Public Domain Notice SAX-PD http://spdx.org/licenses/SAX-PD.html t +254 Saxpath License Saxpath http://spdx.org/licenses/Saxpath.html t +255 SCEA Shared Source License SCEA http://spdx.org/licenses/SCEA.html t +256 Scheme Widget Library (SWL) Software License Agreement SWL http://spdx.org/licenses/SWL.html t +257 Sendmail License Sendmail http://spdx.org/licenses/Sendmail.html t +258 SGI Free Software License B v1.0 SGI-B-1.0 http://spdx.org/licenses/SGI-B-1.0.html t +259 SGI Free Software License B v1.1 SGI-B-1.1 http://spdx.org/licenses/SGI-B-1.1.html t +260 SGI Free Software License B v2.0 SGI-B-2.0 http://spdx.org/licenses/SGI-B-2.0.html t +261 SIL Open Font License 1.0 OFL-1.0 http://spdx.org/licenses/OFL-1.0.html t +262 SIL Open Font License 1.1 OFL-1.1 http://spdx.org/licenses/OFL-1.1.html t +263 Simple Public License 2.0 SimPL-2.0 http://spdx.org/licenses/SimPL-2.0.html t +264 Sleepycat License Sleepycat http://spdx.org/licenses/Sleepycat.html t +265 SNIA Public License 1.1 SNIA http://spdx.org/licenses/SNIA.html t +266 Spencer License 86 Spencer-86 http://spdx.org/licenses/Spencer-86.html t +267 Spencer License 94 Spencer-94 http://spdx.org/licenses/Spencer-94.html t +268 Spencer License 99 Spencer-99 http://spdx.org/licenses/Spencer-99.html t +269 Standard ML of New Jersey License SMLNJ http://spdx.org/licenses/SMLNJ.html t +270 SugarCRM Public License v1.1.3 SugarCRM-1.1.3 http://spdx.org/licenses/SugarCRM-1.1.3.html t +271 Sun Industry Standards Source License v1.1 SISSL http://spdx.org/licenses/SISSL.html t +272 Sun Industry Standards Source License v1.2 SISSL-1.2 http://spdx.org/licenses/SISSL-1.2.html t +273 Sun Public License v1.0 SPL-1.0 http://spdx.org/licenses/SPL-1.0.html t +274 Sybase Open Watcom Public License 1.0 Watcom-1.0 http://spdx.org/licenses/Watcom-1.0.html t +275 TCL/TK License TCL http://spdx.org/licenses/TCL.html t +276 The Unlicense Unlicense http://spdx.org/licenses/Unlicense.html t +277 TMate Open Source License TMate http://spdx.org/licenses/TMate.html t +278 TORQUE v2.5+ Software License v1.1 TORQUE-1.1 http://spdx.org/licenses/TORQUE-1.1.html t +279 Trusster Open Source License TOSL http://spdx.org/licenses/TOSL.html t +280 Unicode Terms of Use Unicode-TOU http://spdx.org/licenses/Unicode-TOU.html t +281 Universal Permissive License v1.0 UPL-1.0 http://spdx.org/licenses/UPL-1.0.html t +282 University of Illinois/NCSA Open Source License NCSA http://spdx.org/licenses/NCSA.html t +283 Vim License Vim http://spdx.org/licenses/Vim.html t +284 VOSTROM Public License for Open Source VOSTROM http://spdx.org/licenses/VOSTROM.html t +285 Vovida Software License v1.0 VSL-1.0 http://spdx.org/licenses/VSL-1.0.html t +286 W3C Software Notice and License (1998-07-20) W3C-19980720 http://spdx.org/licenses/W3C-19980720.html t +287 W3C Software Notice and License (2002-12-31) W3C http://spdx.org/licenses/W3C.html t +288 Wsuipa License Wsuipa http://spdx.org/licenses/Wsuipa.html t +289 X.Net License Xnet http://spdx.org/licenses/Xnet.html t +290 X11 License X11 http://spdx.org/licenses/X11.html t +291 Xerox License Xerox http://spdx.org/licenses/Xerox.html t +292 XFree86 License 1.1 XFree86-1.1 http://spdx.org/licenses/XFree86-1.1.html t +293 xinetd License xinetd http://spdx.org/licenses/xinetd.html t +294 XPP License xpp http://spdx.org/licenses/xpp.html t +295 XSkat License XSkat http://spdx.org/licenses/XSkat.html t +296 Yahoo! Public License v1.0 YPL-1.0 http://spdx.org/licenses/YPL-1.0.html t +297 Yahoo! Public License v1.1 YPL-1.1 http://spdx.org/licenses/YPL-1.1.html t +298 Zed License Zed http://spdx.org/licenses/Zed.html t +299 Zend License v2.0 Zend-2.0 http://spdx.org/licenses/Zend-2.0.html t +300 Zimbra Public License v1.3 Zimbra-1.3 http://spdx.org/licenses/Zimbra-1.3.html t +301 Zimbra Public License v1.4 Zimbra-1.4 http://spdx.org/licenses/Zimbra-1.4.html t +302 zlib License Zlib http://spdx.org/licenses/Zlib.html t +303 zlib/libpng License with Acknowledgement zlib-acknowledgement http://spdx.org/licenses/zlib-acknowledgement.html t +304 Zope Public License 1.1 ZPL-1.1 http://spdx.org/licenses/ZPL-1.1.html t +305 Zope Public License 2.0 ZPL-2.0 http://spdx.org/licenses/ZPL-2.0.html t +306 Zope Public License 2.1 ZPL-2.1 http://spdx.org/licenses/ZPL-2.1.html t +307 eCos license version 2.0 eCos-2.0 http://spdx.org/licenses/eCos-2.0 t +308 GNU General Public License v1.0 or later GPL-1.0+ http://spdx.org/licenses/GPL-1.0+ t +309 GNU General Public License v2.0 or later GPL-2.0+ http://spdx.org/licenses/GPL-2.0+ t +310 GNU General Public License v2.0 w/Autoconf exception GPL-2.0-with-autoconf-exception http://spdx.org/licenses/GPL-2.0-with-autoconf-exception t +311 GNU General Public License v2.0 w/Bison exception GPL-2.0-with-bison-exception http://spdx.org/licenses/GPL-2.0-with-bison-exception t +312 GNU General Public License v2.0 w/Classpath exception GPL-2.0-with-classpath-exception http://spdx.org/licenses/GPL-2.0-with-classpath-exception t +313 GNU General Public License v2.0 w/Font exception GPL-2.0-with-font-exception http://spdx.org/licenses/GPL-2.0-with-font-exception t +314 GNU General Public License v2.0 w/GCC Runtime Library exception GPL-2.0-with-GCC-exception http://spdx.org/licenses/GPL-2.0-with-GCC-exception t +315 GNU General Public License v3.0 or later GPL-3.0+ http://spdx.org/licenses/GPL-3.0+ t +316 GNU General Public License v3.0 w/Autoconf exception GPL-3.0-with-autoconf-exception http://spdx.org/licenses/GPL-3.0-with-autoconf-exception t +317 GNU General Public License v3.0 w/GCC Runtime Library exception GPL-3.0-with-GCC-exception http://spdx.org/licenses/GPL-3.0-with-GCC-exception t +318 GNU Lesser General Public License v2.1 or later LGPL-2.1+ http://spdx.org/licenses/LGPL-2.1+ t +319 GNU Lesser General Public License v3.0 or later LGPL-3.0+ http://spdx.org/licenses/LGPL-3.0+ t +320 GNU Library General Public License v2 or later LGPL-2.0+ http://spdx.org/licenses/LGPL-2.0+ t +321 Standard ML of New Jersey License StandardML-NJ http://spdx.org/licenses/StandardML-NJ t +322 wxWindows Library License WXwindows http://spdx.org/licenses/WXwindows t +\. + + +-- +-- Data for Name: packages; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages (package_id, name, version, file_name, supplier_id, originator_id, download_location, verification_code, ver_code_excluded_file_id, sha256, home_page, source_info, concluded_license_id, declared_license_id, license_comment, copyright_text, summary, description, comment, dosocs2_dir_code) FROM stdin; +\. + + +-- +-- Data for Name: packages_files; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages_files (package_file_id, package_id, file_id, concluded_license_id, license_comment, file_name) FROM stdin; +\. + + +-- +-- Data for Name: packages_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages_scans (package_scan_id, package_id, scanner_id) FROM stdin; +\. + + +-- +-- Data for Name: projects; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.projects (package_id, name, homepage, uri) FROM stdin; +\. + + +-- +-- Data for Name: relationship_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.relationship_types (relationship_type_id, name) FROM stdin; +1 DESCRIBES +2 DESCRIBED_BY +3 CONTAINS +4 CONTAINED_BY +5 GENERATES +6 GENERATED_FROM +7 ANCESTOR_OF +8 DESCENDANT_OF +9 VARIANT_OF +10 DISTRIBUTION_ARTIFACT +11 PATCH_FOR +12 PATCH_APPLIED +13 COPY_OF +14 FILE_ADDED +15 FILE_DELETED +16 FILE_MODIFIED +17 EXPANDED_FROM_ARCHIVE +18 DYNAMIC_LINK +19 STATIC_LINK +20 DATA_FILE_OF +21 TEST_CASE_OF +22 BUILD_TOOL_OF +23 DOCUMENTATION_OF +24 OPTIONAL_COMPONENT_OF +25 METAFILE_OF +26 PACKAGE_OF +27 AMENDS +28 PREREQUISITE_FOR +29 HAS_PREREQUISITE +30 OTHER +\. + + +-- +-- Data for Name: relationships; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.relationships (relationship_id, left_identifier_id, right_identifier_id, relationship_type_id, relationship_comment) FROM stdin; +\. + + +-- +-- Data for Name: sbom_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.sbom_scans (repo_id, sbom_scan) FROM stdin; +\. + + +-- +-- Data for Name: scanners; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.scanners (scanner_id, name) FROM stdin; +\. + + +-- +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data."augur_data.repo_insights_ri_id_seq"', 25430, false); + + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.chaoss_metric_status_cms_id_seq', 1, false); + + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.chaoss_user_chaoss_id_seq', 1, false); + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commit_comment_ref_cmt_comment_id_seq', 25430, false); + + +-- +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commit_parents_parent_id_seq', 25430, false); + + +-- +-- Name: commits_cmt_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commits_cmt_id_seq', 25430, false); + + +-- +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributor_affiliations_ca_id_seq', 25430, false); + + +-- +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributor_repo_cntrb_repo_id_seq', 1, false); + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_aliases_cntrb_a_id_seq', 25430, false); + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_aliases_cntrb_alias_id_seq', 1, false); + + +-- +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_cntrb_id_seq', 25430, false); + + +-- +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_history_cntrb_history_id_seq', 25430, false); + + +-- +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.discourse_insights_msg_discourse_id_seq', 1, false); + + +-- +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.discourse_insights_msg_discourse_id_seq1', 1, false); + + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_assignees_issue_assignee_id_seq', 1, false); + + +-- +-- Name: issue_events_event_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_events_event_id_seq', 25430, false); + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_labels_issue_label_id_seq', 25430, false); + + +-- +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_message_ref_issue_msg_ref_id_seq', 25430, false); + + +-- +-- Name: issue_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_seq', 31000, false); + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.libraries_library_id_seq', 25430, false); + + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.library_dependencies_lib_dependency_id_seq', 25430, false); + + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.library_version_library_version_id_seq', 25430, false); + + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.lstm_anomaly_models_model_id_seq', 1, false); + + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.lstm_anomaly_results_result_id_seq', 1, false); + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_analysis_msg_analysis_id_seq', 1, false); + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_analysis_summary_msg_summary_id_seq', 1, false); + + +-- +-- Name: message_msg_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_msg_id_seq', 25430, false); + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_sentiment_msg_analysis_id_seq', 1, false); + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_sentiment_summary_msg_summary_id_seq', 1, false); + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.platform_pltfrm_id_seq', 25430, false); + + +-- +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_analysis_pull_request_analysis_id_seq', 1, false); + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_assignees_pr_assignee_map_id_seq', 25430, false); + + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_commits_pr_cmt_id_seq', 1, false); + + +-- +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_events_pr_event_id_seq', 25430, false); + + +-- +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_files_pr_file_id_seq', 25150, false); + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_labels_pr_label_id_seq', 25430, false); + + +-- +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq', 25430, false); + + +-- +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_meta_pr_repo_meta_id_seq', 25430, false); + + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_repo_pr_repo_id_seq', 25430, false); + + +-- +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq', 1, false); + + +-- +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq', 25430, false); + + +-- +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_reviews_pr_review_id_seq', 1, false); + + +-- +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_teams_pr_team_id_seq', 25430, false); + + +-- +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_requests_pull_request_id_seq', 25430, false); + + +-- +-- Name: releases_release_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.releases_release_id_seq', 1, false); + + +-- +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_badging_badge_collection_id_seq', 25012, false); + + +-- +-- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_cluster_messages_msg_cluster_id_seq', 1, false); + + +-- +-- Name: repo_dependencies_repo_dependencies_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_dependencies_repo_dependencies_id_seq', 1, false); + + +-- +-- Name: repo_deps_libyear_repo_deps_libyear_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_deps_libyear_repo_deps_libyear_id_seq', 1, false); + + +-- +-- Name: repo_deps_scorecard_repo_deps_scorecard_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1', 1, false); + + +-- +-- Name: repo_group_insights_rgi_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_group_insights_rgi_id_seq', 25430, false); + + +-- +-- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_groups_list_serve_rgls_id_seq', 25430, false); + + +-- +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, false); + + +-- +-- Name: repo_info_repo_info_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_info_repo_info_id_seq', 25430, false); + + +-- +-- Name: repo_insights_records_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_insights_records_ri_id_seq', 1, false); + + +-- +-- Name: repo_insights_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_insights_ri_id_seq', 1, false); + + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_labor_repo_labor_id_seq', 25430, false); + + +-- +-- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_meta_rmeta_id_seq', 25430, false); + + +-- +-- Name: repo_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25430, false); + + +-- +-- Name: repo_sbom_scans_rsb_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_sbom_scans_rsb_id_seq', 25430, false); + + +-- +-- Name: repo_stats_rstat_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_stats_rstat_id_seq', 25430, false); + + +-- +-- Name: repo_test_coverage_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_test_coverage_repo_id_seq', 1, false); + + +-- +-- Name: repo_topic_repo_topic_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_topic_repo_topic_id_seq', 1, false); + + +-- +-- Name: topic_words_topic_words_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.topic_words_topic_words_id_seq', 1, false); + + +-- +-- Name: unresolved_commit_emails_email_unresolved_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.unresolved_commit_emails_email_unresolved_id_seq', 1, false); + + +-- +-- Name: utility_log_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.utility_log_id_seq', 1, false); + + +-- +-- Name: utility_log_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.utility_log_id_seq1', 1, false); + + +-- +-- Name: affiliations_corp_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.affiliations_corp_id_seq', 620000, false); + + +-- +-- Name: augur_settings_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.augur_settings_id_seq', 1, false); + + +-- +-- Name: config_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); + + +-- +-- Name: gh_worker_history_history_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.gh_worker_history_history_id_seq', 15000, false); + + +-- +-- Name: users_user_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 1, false); + + +-- +-- Name: worker_oauth_oauth_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.worker_oauth_oauth_id_seq', 1000, false); + + +-- +-- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.annotation_types_annotation_type_id_seq', 1, false); + + +-- +-- Name: annotations_annotation_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.annotations_annotation_id_seq', 1, false); + + +-- +-- Name: augur_repo_map_map_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.augur_repo_map_map_id_seq', 1, false); + + +-- +-- Name: creator_types_creator_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.creator_types_creator_type_id_seq', 1, false); + + +-- +-- Name: creators_creator_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.creators_creator_id_seq', 1, false); + + +-- +-- Name: document_namespaces_document_namespace_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.document_namespaces_document_namespace_id_seq', 1, false); + + +-- +-- Name: documents_creators_document_creator_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.documents_creators_document_creator_id_seq', 1, false); + + +-- +-- Name: documents_document_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.documents_document_id_seq', 1, false); + + +-- +-- Name: external_refs_external_ref_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.external_refs_external_ref_id_seq', 1, false); + + +-- +-- Name: file_contributors_file_contributor_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.file_contributors_file_contributor_id_seq', 1, false); + + +-- +-- Name: file_types_file_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.file_types_file_type_id_seq', 1, false); + + +-- +-- Name: files_file_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_file_id_seq', 1, false); + + +-- +-- Name: files_licenses_file_license_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_licenses_file_license_id_seq', 1, false); + + +-- +-- Name: files_scans_file_scan_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_scans_file_scan_id_seq', 1, false); + + +-- +-- Name: identifiers_identifier_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.identifiers_identifier_id_seq', 1, false); + + +-- +-- Name: licenses_license_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.licenses_license_id_seq', 1, false); + + +-- +-- Name: packages_files_package_file_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_files_package_file_id_seq', 1, false); + + +-- +-- Name: packages_package_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_package_id_seq', 1, false); + + +-- +-- Name: packages_scans_package_scan_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_scans_package_scan_id_seq', 1, false); + + +-- +-- Name: projects_package_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.projects_package_id_seq', 1, false); + + +-- +-- Name: relationship_types_relationship_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.relationship_types_relationship_type_id_seq', 1, false); + + +-- +-- Name: relationships_relationship_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.relationships_relationship_id_seq', 1, false); + + +-- +-- Name: scanners_scanner_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.scanners_scanner_id_seq', 1, false); + + +-- +-- Name: contributors GH-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GH-UNIQUE-C" UNIQUE (gh_login) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-UNIQUE-B; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-UNIQUE-B" UNIQUE (gl_id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-UNIQUE-C" UNIQUE (gl_username) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-cntrb-LOGIN-UNIQUE; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-cntrb-LOGIN-UNIQUE" UNIQUE (cntrb_login); + + +-- +-- Name: pull_request_assignees assigniees-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT "assigniees-unique" UNIQUE (pull_request_id, pr_assignee_src_id); + + +-- +-- Name: chaoss_metric_status chaoss_metric_status_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_metric_status + ADD CONSTRAINT chaoss_metric_status_pkey PRIMARY KEY (cms_id); + + +-- +-- Name: chaoss_user chaoss_unique_email_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user + ADD CONSTRAINT chaoss_unique_email_key UNIQUE (chaoss_email); + + +-- +-- Name: chaoss_user chaoss_user_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user + ADD CONSTRAINT chaoss_user_pkey PRIMARY KEY (chaoss_id); + + +-- +-- Name: contributor_repo cntrb_repo_id_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT cntrb_repo_id_key PRIMARY KEY (cntrb_repo_id); + + +-- +-- Name: commit_comment_ref commit_comment_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT commit_comment_ref_pkey PRIMARY KEY (cmt_comment_id); + + +-- +-- Name: commit_parents commit_parents_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT commit_parents_pkey PRIMARY KEY (cmt_id, parent_id); + + +-- +-- Name: commit_comment_ref commitcomment; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT commitcomment UNIQUE (cmt_comment_src_id); + + +-- +-- Name: commits commits_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT commits_pkey PRIMARY KEY (cmt_id); + + +-- +-- Name: contributors_aliases contributor-alias-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT "contributor-alias-unique" UNIQUE (alias_email); + + +-- +-- Name: contributor_affiliations contributor_affiliations_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_affiliations + ADD CONSTRAINT contributor_affiliations_pkey PRIMARY KEY (ca_id); + + +-- +-- Name: contributors contributors-pk; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "contributors-pk" PRIMARY KEY (cntrb_id); + + +-- +-- Name: contributors_aliases contributors_aliases_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT contributors_aliases_pkey PRIMARY KEY (cntrb_alias_id); + + +-- +-- Name: discourse_insights discourse_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.discourse_insights + ADD CONSTRAINT discourse_insights_pkey PRIMARY KEY (msg_discourse_id); + + +-- +-- Name: contributor_repo eventer; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT eventer UNIQUE (event_id, tool_version); + + +-- +-- Name: exclude exclude_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.exclude + ADD CONSTRAINT exclude_pkey PRIMARY KEY (id); + + +-- +-- Name: issue_assignees issue-assignee-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT "issue-assignee-insert-unique" UNIQUE (issue_assignee_src_id, issue_id); + + +-- +-- Name: issues issue-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT "issue-insert-unique" UNIQUE (issue_url); + + +-- +-- Name: issue_message_ref issue-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT "issue-message-ref-insert-unique" UNIQUE (issue_msg_ref_src_comment_id, issue_id); + + +-- +-- Name: issue_assignees issue_assignees_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_assignee_id); + + +-- +-- Name: issue_events issue_events_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT issue_events_pkey PRIMARY KEY (event_id); + + +-- +-- Name: issue_labels issue_labels_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT issue_labels_pkey PRIMARY KEY (issue_label_id); + + +-- +-- Name: issue_message_ref issue_message_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT issue_message_ref_pkey PRIMARY KEY (issue_msg_ref_id); + + +-- +-- Name: issues issues_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_pkey PRIMARY KEY (issue_id); + + +-- +-- Name: libraries libraries_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.libraries + ADD CONSTRAINT libraries_pkey PRIMARY KEY (library_id); + + +-- +-- Name: library_dependencies library_dependencies_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_dependencies + ADD CONSTRAINT library_dependencies_pkey PRIMARY KEY (lib_dependency_id); + + +-- +-- Name: library_version library_version_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_version + ADD CONSTRAINT library_version_pkey PRIMARY KEY (library_version_id); + + +-- +-- Name: lstm_anomaly_models lstm_anomaly_models_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_models + ADD CONSTRAINT lstm_anomaly_models_pkey PRIMARY KEY (model_id); + + +-- +-- Name: lstm_anomaly_results lstm_anomaly_results_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT lstm_anomaly_results_pkey PRIMARY KEY (result_id); + + +-- +-- Name: message message-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id); + + +-- +-- Name: message_analysis message_analysis_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis + ADD CONSTRAINT message_analysis_pkey PRIMARY KEY (msg_analysis_id); + + +-- +-- Name: message_analysis_summary message_analysis_summary_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis_summary + ADD CONSTRAINT message_analysis_summary_pkey PRIMARY KEY (msg_summary_id); + + +-- +-- Name: message message_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT message_pkey PRIMARY KEY (msg_id); + + +-- +-- Name: message_sentiment message_sentiment_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment + ADD CONSTRAINT message_sentiment_pkey PRIMARY KEY (msg_analysis_id); + + +-- +-- Name: message_sentiment_summary message_sentiment_summary_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment_summary + ADD CONSTRAINT message_sentiment_summary_pkey PRIMARY KEY (msg_summary_id); + + +-- +-- Name: pull_request_events pr-unqiue-event; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT "pr-unqiue-event" UNIQUE (node_id); + + +-- +-- Name: pull_request_commits pr_commit_nk; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pr_commit_nk UNIQUE (pull_request_id, repo_id, pr_cmt_sha); + + +-- +-- Name: pull_request_events pr_events_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT pr_events_pkey PRIMARY KEY (pr_event_id); + + +-- +-- Name: pull_request_review_message_ref pr_review_msg_ref_id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT pr_review_msg_ref_id PRIMARY KEY (pr_review_msg_ref_id); + + +-- +-- Name: pull_request_files prfiles_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT prfiles_unique UNIQUE (pull_request_id, repo_id, pr_file_path); + + +-- +-- Name: pull_requests pull-request-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "pull-request-insert-unique" UNIQUE (pr_url); + + +-- +-- Name: pull_request_message_ref pull-request-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT "pull-request-message-ref-insert-unique" UNIQUE (pr_message_ref_src_comment_id, pull_request_id); + + +-- +-- Name: pull_request_meta pull-request-meta-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT "pull-request-meta-insert-unique" UNIQUE (pull_request_id, pr_head_or_base, pr_sha); + + +-- +-- Name: pull_request_review_message_ref pull-request-review-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT "pull-request-review-message-ref-insert-unique" UNIQUE (pr_review_msg_src_id); + + +-- +-- Name: pull_request_analysis pull_request_analysis_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_analysis + ADD CONSTRAINT pull_request_analysis_pkey PRIMARY KEY (pull_request_analysis_id); + + +-- +-- Name: pull_request_assignees pull_request_assignees_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT pull_request_assignees_pkey PRIMARY KEY (pr_assignee_map_id); + + +-- +-- Name: pull_request_commits pull_request_commits_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pull_request_commits_pkey PRIMARY KEY (pr_cmt_id); + + +-- +-- Name: pull_request_files pull_request_files_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT pull_request_files_pkey PRIMARY KEY (pr_file_id); + + +-- +-- Name: pull_request_labels pull_request_labels_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT pull_request_labels_pkey PRIMARY KEY (pr_label_id); + + +-- +-- Name: pull_request_message_ref pull_request_message_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT pull_request_message_ref_pkey PRIMARY KEY (pr_msg_ref_id); + + +-- +-- Name: pull_request_meta pull_request_meta_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT pull_request_meta_pkey PRIMARY KEY (pr_repo_meta_id); + + +-- +-- Name: pull_request_repo pull_request_repo_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT pull_request_repo_pkey PRIMARY KEY (pr_repo_id); + + +-- +-- Name: pull_request_reviews pull_request_review_id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pull_request_review_id PRIMARY KEY (pr_review_id); + + +-- +-- Name: pull_request_reviewers pull_request_reviewers_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT pull_request_reviewers_pkey PRIMARY KEY (pr_reviewer_map_id); + + +-- +-- Name: pull_request_teams pull_request_teams_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_teams + ADD CONSTRAINT pull_request_teams_pkey PRIMARY KEY (pr_team_id); + + +-- +-- Name: pull_requests pull_requests_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT pull_requests_pkey PRIMARY KEY (pull_request_id); + + +-- +-- Name: releases releases_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.releases + ADD CONSTRAINT releases_pkey PRIMARY KEY (release_id); + + +-- +-- Name: repo_badging repo_badging_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_badging + ADD CONSTRAINT repo_badging_pkey PRIMARY KEY (badge_collection_id); + + +-- +-- Name: repo_cluster_messages repo_cluster_messages_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_cluster_messages + ADD CONSTRAINT repo_cluster_messages_pkey PRIMARY KEY (msg_cluster_id); + + +-- +-- Name: repo_dependencies repo_dependencies_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT repo_dependencies_pkey PRIMARY KEY (repo_dependencies_id); + + +-- +-- Name: repo_deps_libyear repo_deps_libyear_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT repo_deps_libyear_pkey PRIMARY KEY (repo_deps_libyear_id); + + +-- +-- Name: repo_deps_scorecard repo_deps_scorecard_pkey1; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT repo_deps_scorecard_pkey1 PRIMARY KEY (repo_deps_scorecard_id); + + +-- +-- Name: repo repo_git-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT "repo_git-unique" UNIQUE (repo_git); + + +-- +-- Name: repo_group_insights repo_group_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_group_insights + ADD CONSTRAINT repo_group_insights_pkey PRIMARY KEY (rgi_id); + + +-- +-- Name: repo_groups_list_serve repo_groups_list_serve_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT repo_groups_list_serve_pkey PRIMARY KEY (rgls_id); + + +-- +-- Name: repo_info repo_info_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_info + ADD CONSTRAINT repo_info_pkey PRIMARY KEY (repo_info_id); + + +-- +-- Name: repo_insights repo_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights + ADD CONSTRAINT repo_insights_pkey PRIMARY KEY (ri_id); + + +-- +-- Name: repo_insights_records repo_insights_records_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights_records + ADD CONSTRAINT repo_insights_records_pkey PRIMARY KEY (ri_id); + + +-- +-- Name: repo_labor repo_labor_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT repo_labor_pkey PRIMARY KEY (repo_labor_id); + + +-- +-- Name: repo_meta repo_meta_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_meta + ADD CONSTRAINT repo_meta_pkey PRIMARY KEY (rmeta_id, repo_id); + + +-- +-- Name: repo_sbom_scans repo_sbom_scans_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_sbom_scans + ADD CONSTRAINT repo_sbom_scans_pkey PRIMARY KEY (rsb_id); + + +-- +-- Name: repo_stats repo_stats_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_stats + ADD CONSTRAINT repo_stats_pkey PRIMARY KEY (rstat_id, repo_id); + + +-- +-- Name: repo_test_coverage repo_test_coverage_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_test_coverage + ADD CONSTRAINT repo_test_coverage_pkey PRIMARY KEY (repo_id); + + +-- +-- Name: repo_topic repo_topic_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_topic + ADD CONSTRAINT repo_topic_pkey PRIMARY KEY (repo_topic_id); + + +-- +-- Name: repo repounique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT repounique PRIMARY KEY (repo_id); + + +-- +-- Name: repo_groups rgid; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups + ADD CONSTRAINT rgid PRIMARY KEY (repo_group_id); + + +-- +-- Name: repo_groups_list_serve rglistserve; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT rglistserve UNIQUE (rgls_id, repo_group_id); + + +-- +-- Name: repo_labor rl-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.settings + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: pull_request_reviews sourcepr-review-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT "sourcepr-review-id" UNIQUE (pr_review_src_id, tool_source); + + +-- +-- Name: CONSTRAINT "sourcepr-review-id" ON pull_request_reviews; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT "sourcepr-review-id" ON augur_data.pull_request_reviews IS 'Natural Key from Source, plus tool source to account for different platforms like GitHub and gitlab. '; + + +-- +-- Name: platform theplat; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.platform + ADD CONSTRAINT theplat PRIMARY KEY (pltfrm_id); + + +-- +-- Name: topic_words topic_words_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.topic_words + ADD CONSTRAINT topic_words_pkey PRIMARY KEY (topic_words_id); + + +-- +-- Name: issues unique-issue; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT "unique-issue" UNIQUE (repo_id, gh_issue_id); + + +-- +-- Name: pull_requests unique-pr; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "unique-pr" UNIQUE (repo_id, pr_src_id); + + +-- +-- Name: pull_request_events unique-pr-event-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT "unique-pr-event-id" UNIQUE (platform_id, node_id); + + +-- +-- Name: pull_request_labels unique-pr-src-label-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT "unique-pr-src-label-id" UNIQUE (pr_src_id, pull_request_id); + + +-- +-- Name: pull_requests unique-prx; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "unique-prx" UNIQUE (repo_id, pr_src_id); + + +-- +-- Name: contributor_affiliations unique_domain; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_affiliations + ADD CONSTRAINT unique_domain UNIQUE (ca_domain); + + +-- +-- Name: CONSTRAINT unique_domain ON contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT unique_domain ON augur_data.contributor_affiliations IS 'Only one row should exist for any given top level domain or subdomain. '; + + +-- +-- Name: issue_events unique_event_id_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT unique_event_id_key UNIQUE (issue_id, issue_event_src_id); + + +-- +-- Name: CONSTRAINT unique_event_id_key ON issue_events; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT unique_event_id_key ON augur_data.issue_events IS 'Natural key for issue events. '; + + +-- +-- Name: issue_labels unique_issue_label; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT unique_issue_label UNIQUE (label_src_id, issue_id); + + +-- +-- Name: pull_request_reviewers unique_pr_src_reviewer_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT unique_pr_src_reviewer_key UNIQUE (pull_request_id, pr_reviewer_src_id); + + +-- +-- Name: unresolved_commit_emails unresolved_commit_emails_email_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.unresolved_commit_emails + ADD CONSTRAINT unresolved_commit_emails_email_key UNIQUE (email); + + +-- +-- Name: unresolved_commit_emails unresolved_commit_emails_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.unresolved_commit_emails + ADD CONSTRAINT unresolved_commit_emails_pkey PRIMARY KEY (email_unresolved_id); + + +-- +-- Name: utility_log utility_log_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.utility_log + ADD CONSTRAINT utility_log_pkey PRIMARY KEY (id); + + +-- +-- Name: augur_settings augur_settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.augur_settings + ADD CONSTRAINT augur_settings_pkey PRIMARY KEY (id); + + +-- +-- Name: config config_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT config_pkey PRIMARY KEY (id); + + +-- +-- Name: worker_history history_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_history + ADD CONSTRAINT history_pkey PRIMARY KEY (history_id); + + +-- +-- Name: worker_job job_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_job + ADD CONSTRAINT job_pkey PRIMARY KEY (job_model); + + +-- +-- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_settings_facade + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); + + +-- +-- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-email" UNIQUE (email); + + +-- +-- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); + + +-- +-- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT users_pkey PRIMARY KEY (user_id); + + +-- +-- Name: worker_oauth worker_oauth_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_oauth + ADD CONSTRAINT worker_oauth_pkey PRIMARY KEY (oauth_id); + + +-- +-- Name: alembic_version alembic_version_pkc; Type: CONSTRAINT; Schema: public; Owner: augur +-- + +ALTER TABLE ONLY public.alembic_version + ADD CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num); + + +-- +-- Name: annotation_types annotation_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotation_types + ADD CONSTRAINT annotation_types_pkey PRIMARY KEY (annotation_type_id); + + +-- +-- Name: annotations annotations_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_pkey PRIMARY KEY (annotation_id); + + +-- +-- Name: augur_repo_map augur_repo_map_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.augur_repo_map + ADD CONSTRAINT augur_repo_map_pkey PRIMARY KEY (map_id); + + +-- +-- Name: creator_types creator_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creator_types + ADD CONSTRAINT creator_types_pkey PRIMARY KEY (creator_type_id); + + +-- +-- Name: creators creators_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creators + ADD CONSTRAINT creators_pkey PRIMARY KEY (creator_id); + + +-- +-- Name: document_namespaces document_namespaces_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.document_namespaces + ADD CONSTRAINT document_namespaces_pkey PRIMARY KEY (document_namespace_id); + + +-- +-- Name: documents_creators documents_creators_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_pkey PRIMARY KEY (document_creator_id); + + +-- +-- Name: documents documents_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_pkey PRIMARY KEY (document_id); + + +-- +-- Name: external_refs external_refs_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_pkey PRIMARY KEY (external_ref_id); + + +-- +-- Name: file_contributors file_contributors_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_contributors + ADD CONSTRAINT file_contributors_pkey PRIMARY KEY (file_contributor_id); + + +-- +-- Name: files_licenses files_licenses_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_pkey PRIMARY KEY (file_license_id); + + +-- +-- Name: files files_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files + ADD CONSTRAINT files_pkey PRIMARY KEY (file_id); + + +-- +-- Name: files_scans files_scans_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_pkey PRIMARY KEY (file_scan_id); + + +-- +-- Name: identifiers identifiers_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_pkey PRIMARY KEY (identifier_id); + + +-- +-- Name: licenses licenses_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.licenses + ADD CONSTRAINT licenses_pkey PRIMARY KEY (license_id); + + +-- +-- Name: packages_files packages_files_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_pkey PRIMARY KEY (package_file_id); + + +-- +-- Name: packages packages_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_pkey PRIMARY KEY (package_id); + + +-- +-- Name: packages_scans packages_scans_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_pkey PRIMARY KEY (package_scan_id); + + +-- +-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.projects + ADD CONSTRAINT projects_pkey PRIMARY KEY (package_id); + + +-- +-- Name: relationship_types relationship_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationship_types + ADD CONSTRAINT relationship_types_pkey PRIMARY KEY (relationship_type_id); + + +-- +-- Name: relationships relationships_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_pkey PRIMARY KEY (relationship_id); + + +-- +-- Name: scanners scanners_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.scanners + ADD CONSTRAINT scanners_pkey PRIMARY KEY (scanner_id); + + +-- +-- Name: annotation_types uc_annotation_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotation_types + ADD CONSTRAINT uc_annotation_type_name UNIQUE (name); + + +-- +-- Name: packages uc_dir_code_ver_code; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT uc_dir_code_ver_code UNIQUE (verification_code, dosocs2_dir_code); + + +-- +-- Name: documents uc_document_document_namespace_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT uc_document_document_namespace_id UNIQUE (document_namespace_id); + + +-- +-- Name: document_namespaces uc_document_namespace_uri; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.document_namespaces + ADD CONSTRAINT uc_document_namespace_uri UNIQUE (uri); + + +-- +-- Name: external_refs uc_external_ref_document_id_string; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT uc_external_ref_document_id_string UNIQUE (document_id, id_string); + + +-- +-- Name: files_licenses uc_file_license; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT uc_file_license UNIQUE (file_id, license_id); + + +-- +-- Name: files_scans uc_file_scanner_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT uc_file_scanner_id UNIQUE (file_id, scanner_id); + + +-- +-- Name: files uc_file_sha256; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files + ADD CONSTRAINT uc_file_sha256 UNIQUE (sha256); + + +-- +-- Name: file_types uc_file_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_types + ADD CONSTRAINT uc_file_type_name PRIMARY KEY (name); + + +-- +-- Name: identifiers uc_identifier_document_namespace_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_document_namespace_id UNIQUE (document_namespace_id, id_string); + + +-- +-- Name: identifiers uc_identifier_namespace_document_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_document_id UNIQUE (document_namespace_id, document_id); + + +-- +-- Name: identifiers uc_identifier_namespace_package_file_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_package_file_id UNIQUE (document_namespace_id, package_file_id); + + +-- +-- Name: identifiers uc_identifier_namespace_package_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_package_id UNIQUE (document_namespace_id, package_id); + + +-- +-- Name: relationships uc_left_right_relationship_type; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT uc_left_right_relationship_type UNIQUE (left_identifier_id, right_identifier_id, relationship_type_id); + + +-- +-- Name: licenses uc_license_short_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.licenses + ADD CONSTRAINT uc_license_short_name UNIQUE (short_name); + + +-- +-- Name: packages_files uc_package_id_file_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT uc_package_id_file_name UNIQUE (package_id, file_name); + + +-- +-- Name: packages_scans uc_package_scanner_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT uc_package_scanner_id UNIQUE (package_id, scanner_id); + + +-- +-- Name: packages uc_package_sha256; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT uc_package_sha256 UNIQUE (sha256); + + +-- +-- Name: relationship_types uc_relationship_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationship_types + ADD CONSTRAINT uc_relationship_type_name UNIQUE (name); + + +-- +-- Name: scanners uc_scanner_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.scanners + ADD CONSTRAINT uc_scanner_name UNIQUE (name); + + +-- +-- Name: REPO_DEP; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "REPO_DEP" ON augur_data.library_dependencies USING btree (library_id); + + +-- +-- Name: author_affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_affiliation ON augur_data.commits USING btree (cmt_author_affiliation); + + +-- +-- Name: author_cntrb_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_cntrb_id ON augur_data.commits USING btree (cmt_ght_author_id); + + +-- +-- Name: author_email,author_affiliation,author_date; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "author_email,author_affiliation,author_date" ON augur_data.commits USING btree (cmt_author_email, cmt_author_affiliation, cmt_author_date); + + +-- +-- Name: author_raw_email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_raw_email ON augur_data.commits USING btree (cmt_author_raw_email); + + +-- +-- Name: cnt-fullname; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cnt-fullname" ON augur_data.contributors USING hash (cntrb_full_name); + + +-- +-- Name: cntrb-theemail; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cntrb-theemail" ON augur_data.contributors USING hash (cntrb_email); + + +-- +-- Name: cntrb_canonica-idx11; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cntrb_canonica-idx11" ON augur_data.contributors USING btree (cntrb_canonical); + + +-- +-- Name: cntrb_login_platform_index; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX cntrb_login_platform_index ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: comment_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX comment_id ON augur_data.commit_comment_ref USING btree (cmt_comment_src_id, cmt_comment_id, msg_id); + + +-- +-- Name: commit_parents_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commit_parents_ibfk_1 ON augur_data.commit_parents USING btree (cmt_id); + + +-- +-- Name: commit_parents_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commit_parents_ibfk_2 ON augur_data.commit_parents USING btree (parent_id); + + +-- +-- Name: commited; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commited ON augur_data.commits USING btree (cmt_id); + + +-- +-- Name: commits_idx_cmt_email_cmt_date_cmt_name; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commits_idx_cmt_email_cmt_date_cmt_name ON augur_data.commits USING btree (cmt_author_email, cmt_author_date, cmt_author_name); + + +-- +-- Name: committer_affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX committer_affiliation ON augur_data.commits USING btree (cmt_committer_affiliation); + + +-- +-- Name: committer_raw_email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX committer_raw_email ON augur_data.commits USING btree (cmt_committer_raw_email); + + +-- +-- Name: contributor_worker_email_finder; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributor_worker_email_finder ON augur_data.contributors USING brin (cntrb_email); + + +-- +-- Name: contributor_worker_fullname_finder; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributor_worker_fullname_finder ON augur_data.contributors USING brin (cntrb_full_name); + + +-- +-- Name: contributors_idx_cntrb_email3; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributors_idx_cntrb_email3 ON augur_data.contributors USING btree (cntrb_email); + + +-- +-- Name: dater; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); + + +-- +-- Name: forked; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX forked ON augur_data.repo USING btree (forked_from); + + +-- +-- Name: id_node; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX id_node ON augur_data.pull_requests USING btree (pr_src_id DESC, pr_src_node_id DESC NULLS LAST); + + +-- +-- Name: issue-cntrb-assign-idx-1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-assign-idx-1" ON augur_data.issue_assignees USING btree (cntrb_id); + + +-- +-- Name: issue-cntrb-dix2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-dix2" ON augur_data.issues USING btree (cntrb_id); + + +-- +-- Name: issue-cntrb-idx2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-idx2" ON augur_data.issue_events USING btree (issue_event_src_id); + + +-- +-- Name: issue_events_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issue_events_ibfk_1 ON augur_data.issue_events USING btree (issue_id); + + +-- +-- Name: issue_events_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issue_events_ibfk_2 ON augur_data.issue_events USING btree (cntrb_id); + + +-- +-- Name: issues_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_1 ON augur_data.issues USING btree (repo_id); + + +-- +-- Name: issues_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_2 ON augur_data.issues USING btree (reporter_id); + + +-- +-- Name: issues_ibfk_4; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_4 ON augur_data.issues USING btree (pull_request_id); + + +-- +-- Name: lister; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX lister ON augur_data.repo_groups_list_serve USING btree (rgls_id, repo_group_id); + + +-- +-- Name: login; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX login ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: login-contributor-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "login-contributor-idx" ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: messagegrouper; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX messagegrouper ON augur_data.message USING btree (msg_id, rgls_id); + + +-- +-- Name: msg-cntrb-id-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "msg-cntrb-id-idx" ON augur_data.message USING btree (cntrb_id); + + +-- +-- Name: plat; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX plat ON augur_data.platform USING btree (pltfrm_id); + + +-- +-- Name: platformgrouper; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX platformgrouper ON augur_data.message USING btree (msg_id, pltfrm_id); + + +-- +-- Name: pr-cntrb-idx-repo; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr-cntrb-idx-repo" ON augur_data.pull_request_repo USING btree (pr_cntrb_id); + + +-- +-- Name: pr-reviewers-cntrb-idx1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr-reviewers-cntrb-idx1" ON augur_data.pull_request_reviewers USING btree (cntrb_id); + + +-- +-- Name: pr_anal_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_anal_idx ON augur_data.pull_request_analysis USING btree (pull_request_id); + + +-- +-- Name: pr_events_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_events_ibfk_1 ON augur_data.pull_request_events USING btree (pull_request_id); + + +-- +-- Name: pr_events_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_events_ibfk_2 ON augur_data.pull_request_events USING btree (cntrb_id); + + +-- +-- Name: pr_meta-cntrbid-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_meta-cntrbid-idx" ON augur_data.pull_request_meta USING btree (cntrb_id); + + +-- +-- Name: pr_meta_cntrb-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_meta_cntrb-idx" ON augur_data.pull_request_assignees USING btree (contrib_id); + + +-- +-- Name: probability_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX probability_idx ON augur_data.pull_request_analysis USING btree (merge_probability DESC NULLS LAST); + + +-- +-- Name: projects_id,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation_copy_1" ON augur_data.dm_repo_group_annual USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,affiliation_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation_copy_2" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email_copy_1" ON augur_data.dm_repo_group_annual USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,email_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email_copy_2" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,year,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,affiliation" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, year, affiliation); + + +-- +-- Name: projects_id,year,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,affiliation_copy_1" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, year, affiliation); + + +-- +-- Name: projects_id,year,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,email" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, year, email); + + +-- +-- Name: projects_id,year,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,email_copy_1" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, year, email); + + +-- +-- Name: pull_requests_idx_repo_id_data_datex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pull_requests_idx_repo_id_data_datex ON augur_data.pull_requests USING btree (repo_id, data_collection_date); + + +-- +-- Name: repo_id,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation" ON augur_data.dm_repo_weekly USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation_copy_1" ON augur_data.dm_repo_annual USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,affiliation_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation_copy_2" ON augur_data.dm_repo_monthly USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,commit; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,commit" ON augur_data.commits USING btree (repo_id, cmt_commit_hash); + + +-- +-- Name: repo_id,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email" ON augur_data.dm_repo_weekly USING btree (repo_id, email); + + +-- +-- Name: repo_id,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email_copy_1" ON augur_data.dm_repo_annual USING btree (repo_id, email); + + +-- +-- Name: repo_id,email_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email_copy_2" ON augur_data.dm_repo_monthly USING btree (repo_id, email); + + +-- +-- Name: repo_id,year,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,affiliation" ON augur_data.dm_repo_weekly USING btree (repo_id, year, affiliation); + + +-- +-- Name: repo_id,year,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,affiliation_copy_1" ON augur_data.dm_repo_monthly USING btree (repo_id, year, affiliation); + + +-- +-- Name: repo_id,year,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,email" ON augur_data.dm_repo_weekly USING btree (repo_id, year, email); + + +-- +-- Name: repo_id,year,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,email_copy_1" ON augur_data.dm_repo_monthly USING btree (repo_id, year, email); + + +-- +-- Name: repo_idx_repo_id_repo_namex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_idx_repo_id_repo_namex ON augur_data.repo USING btree (repo_id, repo_name); + + +-- +-- Name: repo_info_idx_repo_id_data_date_1x; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_info_idx_repo_id_data_date_1x ON augur_data.repo_info USING btree (repo_id, data_collection_date); + + +-- +-- Name: repo_info_idx_repo_id_data_datex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_info_idx_repo_id_data_datex ON augur_data.repo_info USING btree (repo_id, data_collection_date); + + +-- +-- Name: repogitindexrep; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repogitindexrep ON augur_data.repo USING btree (repo_git); + + +-- +-- Name: reponameindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX reponameindex ON augur_data.repo USING hash (repo_name); + + +-- +-- Name: reponameindexbtree; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX reponameindexbtree ON augur_data.repo USING btree (repo_name); + + +-- +-- Name: repos_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repos_id ON augur_data.analysis_log USING btree (repos_id); + + +-- +-- Name: repos_id,status; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repos_id,status" ON augur_data.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: repos_id,statusops; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repos_id,statusops" ON augur_data.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: rggrouponrepoindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX rggrouponrepoindex ON augur_data.repo USING btree (repo_group_id); + + +-- +-- Name: rgidm; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX rgidm ON augur_data.repo_groups USING btree (repo_group_id); + + +-- +-- Name: rgnameindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX rgnameindex ON augur_data.repo_groups USING btree (rg_name); + + +-- +-- Name: therepo; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX therepo ON augur_data.repo USING btree (repo_id); + + +-- +-- Name: type,projects_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "type,projects_id" ON augur_data.unknown_cache USING btree (type, repo_group_id); + + +-- +-- Name: repos_id,statusops; Type: INDEX; Schema: augur_operations; Owner: augur +-- + +CREATE INDEX "repos_id,statusops" ON augur_operations.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: contributor_repo contributor_repo_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT contributor_repo_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: contributors_aliases contributors_aliases_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT contributors_aliases_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_reviews fk-review-platform; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT "fk-review-platform" FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commit_comment_ref fk_commit_comment_ref_commits_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT fk_commit_comment_ref_commits_1 FOREIGN KEY (cmt_id) REFERENCES augur_data.commits(cmt_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: commit_comment_ref fk_commit_comment_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT fk_commit_comment_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: commit_parents fk_commit_parents_commits_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT fk_commit_parents_commits_1 FOREIGN KEY (cmt_id) REFERENCES augur_data.commits(cmt_id); + + +-- +-- Name: commit_parents fk_commit_parents_commits_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT fk_commit_parents_commits_2 FOREIGN KEY (parent_id) REFERENCES augur_data.commits(cmt_id); + + +-- +-- Name: commits fk_commits_contributors_3; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_contributors_3 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commits fk_commits_contributors_4; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_contributors_4 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commits fk_commits_repo_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_repo_2 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: discourse_insights fk_discourse_insights_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.discourse_insights + ADD CONSTRAINT fk_discourse_insights_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: issue_assignees fk_issue_assignee_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT fk_issue_assignee_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_assignees fk_issue_assignees_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT fk_issue_assignees_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id); + + +-- +-- Name: issue_events fk_issue_event_platform_ide; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_event_platform_ide FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_events fk_issue_events_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_events_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: issue_events fk_issue_events_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_events_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_labels fk_issue_labels_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT fk_issue_labels_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: issue_labels fk_issue_labels_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT fk_issue_labels_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_message_ref fk_issue_message_ref_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_issue_message_ref_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issue_message_ref fk_issue_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_issue_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issues fk_issues_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT fk_issues_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: libraries fk_libraries_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.libraries + ADD CONSTRAINT fk_libraries_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: library_dependencies fk_library_dependencies_libraries_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_dependencies + ADD CONSTRAINT fk_library_dependencies_libraries_1 FOREIGN KEY (library_id) REFERENCES augur_data.libraries(library_id); + + +-- +-- Name: library_version fk_library_version_libraries_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_version + ADD CONSTRAINT fk_library_version_libraries_1 FOREIGN KEY (library_id) REFERENCES augur_data.libraries(library_id); + + +-- +-- Name: lstm_anomaly_results fk_lstm_anomaly_results_lstm_anomaly_models_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT fk_lstm_anomaly_results_lstm_anomaly_models_1 FOREIGN KEY (model_id) REFERENCES augur_data.lstm_anomaly_models(model_id); + + +-- +-- Name: lstm_anomaly_results fk_lstm_anomaly_results_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT fk_lstm_anomaly_results_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: message_analysis fk_message_analysis_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis + ADD CONSTRAINT fk_message_analysis_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: message_analysis_summary fk_message_analysis_summary_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis_summary + ADD CONSTRAINT fk_message_analysis_summary_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: message fk_message_platform_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_platform_1 FOREIGN KEY (pltfrm_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: message fk_message_repo_groups_list_serve_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_repo_groups_list_serve_1 FOREIGN KEY (rgls_id) REFERENCES augur_data.repo_groups_list_serve(rgls_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: message fk_message_repoid; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_repoid FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: message_sentiment fk_message_sentiment_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment + ADD CONSTRAINT fk_message_sentiment_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: message_sentiment_summary fk_message_sentiment_summary_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment_summary + ADD CONSTRAINT fk_message_sentiment_summary_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: pull_request_message_ref fk_pr_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pr_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_analysis fk_pull_request_analysis_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_analysis + ADD CONSTRAINT fk_pull_request_analysis_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees fk_pull_request_assignees_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT fk_pull_request_assignees_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees fk_pull_request_assignees_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT fk_pull_request_assignees_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_commits fk_pull_request_commits_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT fk_pull_request_commits_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_files fk_pull_request_commits_pull_requests_1_copy_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT fk_pull_request_commits_pull_requests_1_copy_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_commits fk_pull_request_commits_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT fk_pull_request_commits_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_events fk_pull_request_events_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fk_pull_request_events_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_files fk_pull_request_files_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT fk_pull_request_files_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_labels fk_pull_request_labels_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT fk_pull_request_labels_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_labels fk_pull_request_labels_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT fk_pull_request_labels_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_message_ref fk_pull_request_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pull_request_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_message_ref fk_pull_request_message_ref_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pull_request_message_ref_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_meta fk_pull_request_meta_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT fk_pull_request_meta_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_meta fk_pull_request_repo_meta_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT fk_pull_request_repo_meta_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_repo fk_pull_request_repo_pull_request_meta_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT fk_pull_request_repo_pull_request_meta_1 FOREIGN KEY (pr_repo_meta_id) REFERENCES augur_data.pull_request_meta(pr_repo_meta_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_review_message_ref fk_pull_request_review_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_pull_request_review_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_review_message_ref fk_pull_request_review_message_ref_pull_request_reviews_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_pull_request_review_message_ref_pull_request_reviews_1 FOREIGN KEY (pr_review_id) REFERENCES augur_data.pull_request_reviews(pr_review_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_reviewers fk_pull_request_reviewers_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT fk_pull_request_reviewers_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_reviews fk_pull_request_reviews_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT fk_pull_request_reviews_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_teams fk_pull_request_teams_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_teams + ADD CONSTRAINT fk_pull_request_teams_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_requests fk_pull_requests_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT fk_pull_requests_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: releases fk_releases_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.releases + ADD CONSTRAINT fk_releases_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_badging fk_repo_badging_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_badging + ADD CONSTRAINT fk_repo_badging_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_cluster_messages fk_repo_cluster_messages_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_cluster_messages + ADD CONSTRAINT fk_repo_cluster_messages_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_group_insights fk_repo_group_insights_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_group_insights + ADD CONSTRAINT fk_repo_group_insights_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: repo_groups_list_serve fk_repo_groups_list_serve_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT fk_repo_groups_list_serve_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: issue_message_ref fk_repo_id_fk1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_repo_id_fk1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: repo_info fk_repo_info_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_info + ADD CONSTRAINT fk_repo_info_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_insights fk_repo_insights_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights + ADD CONSTRAINT fk_repo_insights_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_labor fk_repo_labor_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT fk_repo_labor_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_meta fk_repo_meta_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_meta + ADD CONSTRAINT fk_repo_meta_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo fk_repo_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT fk_repo_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: CONSTRAINT fk_repo_repo_groups_1 ON repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT fk_repo_repo_groups_1 ON augur_data.repo IS 'Repo_groups cardinality set to one and only one because, although in theory there could be more than one repo group for a repo, this might create dependencies in hosted situation that we do not want to live with. '; + + +-- +-- Name: pull_request_reviews fk_repo_review; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT fk_repo_review FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: repo_stats fk_repo_stats_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_stats + ADD CONSTRAINT fk_repo_stats_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_test_coverage fk_repo_test_coverage_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_test_coverage + ADD CONSTRAINT fk_repo_test_coverage_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_topic fk_repo_topic_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_topic + ADD CONSTRAINT fk_repo_topic_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: pull_request_review_message_ref fk_review_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_review_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_events fkpr_platform; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fkpr_platform FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_events fkprevent_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fkprevent_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issue_assignees issue_assignees_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT issue_assignees_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: issue_events issue_events_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT issue_events_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issues issues_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: issues issues_reporter_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_reporter_id_fkey FOREIGN KEY (reporter_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: message message_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT message_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees pull_request_assignees_contrib_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT pull_request_assignees_contrib_id_fkey FOREIGN KEY (contrib_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_commits pull_request_commits_pr_cmt_author_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pull_request_commits_pr_cmt_author_cntrb_id_fkey FOREIGN KEY (pr_cmt_author_cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_events pull_request_events_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT pull_request_events_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_meta pull_request_meta_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT pull_request_meta_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_repo pull_request_repo_pr_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT pull_request_repo_pr_cntrb_id_fkey FOREIGN KEY (pr_cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_reviewers pull_request_reviewers_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT pull_request_reviewers_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_reviews pull_request_reviews_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pull_request_reviews_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_requests pull_requests_pr_augur_contributor_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT pull_requests_pr_augur_contributor_id_fkey FOREIGN KEY (pr_augur_contributor_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: repo_dependencies repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_deps_scorecard repo_id_copy_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT repo_id_copy_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_deps_libyear repo_id_copy_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT repo_id_copy_2 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_insights_records repo_id_ref; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights_records + ADD CONSTRAINT repo_id_ref FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: repo_sbom_scans repo_linker_sbom; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_sbom_scans + ADD CONSTRAINT repo_linker_sbom FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: annotations annotations_annotation_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_annotation_type_id_fkey FOREIGN KEY (annotation_type_id) REFERENCES spdx.annotation_types(annotation_type_id); + + +-- +-- Name: annotations annotations_creator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: annotations annotations_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: annotations annotations_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_identifier_id_fkey FOREIGN KEY (identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- Name: creators creators_creator_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creators + ADD CONSTRAINT creators_creator_type_id_fkey FOREIGN KEY (creator_type_id) REFERENCES spdx.creator_types(creator_type_id); + + +-- +-- Name: documents_creators documents_creators_creator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: documents_creators documents_creators_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: documents documents_data_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_data_license_id_fkey FOREIGN KEY (data_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: documents documents_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: documents documents_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: external_refs external_refs_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: external_refs external_refs_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: file_contributors file_contributors_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_contributors + ADD CONSTRAINT file_contributors_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_licenses files_licenses_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_licenses files_licenses_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_license_id_fkey FOREIGN KEY (license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: files_scans files_scans_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_scans files_scans_scanner_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_scanner_id_fkey FOREIGN KEY (scanner_id) REFERENCES spdx.scanners(scanner_id); + + +-- +-- Name: packages_files fk_package_files_packages; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT fk_package_files_packages FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages fk_package_packages_files; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT fk_package_packages_files FOREIGN KEY (ver_code_excluded_file_id) REFERENCES spdx.packages_files(package_file_id); + + +-- +-- Name: identifiers identifiers_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: identifiers identifiers_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: identifiers identifiers_package_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_package_file_id_fkey FOREIGN KEY (package_file_id) REFERENCES spdx.packages_files(package_file_id); + + +-- +-- Name: identifiers identifiers_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages packages_concluded_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_concluded_license_id_fkey FOREIGN KEY (concluded_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages packages_declared_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_declared_license_id_fkey FOREIGN KEY (declared_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages_files packages_files_concluded_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_concluded_license_id_fkey FOREIGN KEY (concluded_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages_files packages_files_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: packages packages_originator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_originator_id_fkey FOREIGN KEY (originator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: packages_scans packages_scans_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages_scans packages_scans_scanner_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_scanner_id_fkey FOREIGN KEY (scanner_id) REFERENCES spdx.scanners(scanner_id); + + +-- +-- Name: packages packages_supplier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_supplier_id_fkey FOREIGN KEY (supplier_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: relationships relationships_left_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_left_identifier_id_fkey FOREIGN KEY (left_identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- Name: relationships relationships_relationship_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_relationship_type_id_fkey FOREIGN KEY (relationship_type_id) REFERENCES spdx.relationship_types(relationship_type_id); + + +-- +-- Name: relationships relationships_right_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_right_identifier_id_fkey FOREIGN KEY (right_identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/docs/new-install.md b/docs/new-install.md index 2b2e5c1947..316a1834e7 100644 --- a/docs/new-install.md +++ b/docs/new-install.md @@ -71,11 +71,13 @@ Then, from within the resulting postgresql shell: CREATE DATABASE augur; CREATE USER augur WITH ENCRYPTED PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE augur TO augur; +alter database augur owner to augur; ``` **If you're using PostgreSQL 15 or later**, default database permissions will prevent Augur's installer from configuring the database. Add one last line after the above to fix this: ```sql -GRANT ALL ON SCHEMA public TO augur; +set search_path=augur; +grant all privileges on schema public to augur with grant option; ``` After that, return to your user by exiting `psql` From ca7aeefcedf81dd2e0a23205e1e65274cfb6e24b Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 13:28:14 -0500 Subject: [PATCH 017/176] update docker config Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 2 +- docker/database/Dockerfile | 2 +- scripts/install/config.sh | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 892a140ac0..f6ecb55a82 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,5 +1,5 @@ #SPDX-License-Identifier: MIT -FROM python:3.10-bookworm +FROM python:3.11-bookworm LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index c384d0f306..26c9040c7c 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -1,5 +1,5 @@ #SPDX-License-Identifier: MIT -FROM postgres:14 +FROM postgres:16 LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" diff --git a/scripts/install/config.sh b/scripts/install/config.sh index c4421550bc..47ac95af04 100755 --- a/scripts/install/config.sh +++ b/scripts/install/config.sh @@ -83,10 +83,25 @@ function get_facade_repo_path() { facade_repo_directory=$(realpath $facade_repo_directory) echo - if ! [ -w $facade_repo_directory/.git-credentials ]; then - echo "User $(whoami) does not have permission to write to that location" + # if ! [ -w $facade_repo_directory/.git-credentials ]; then + # echo "User $(whoami) does not have permission to write to that location" + # echo "Please select another location" + # continue + # fi + + # Check if the file exists and create it if it doesn't + if [ ! -f "$facade_repo_directory/.git-credentials" ]; then + echo "File .git-credentials does not exist. Creating it..." + touch "$facade_repo_directory/.git-credentials" + fi + + # Check for write permissions + if ! [ -w "$facade_repo_directory/.git-credentials" ]; then + echo "User $(whoami) does not have permission to write to $facade_repo_directory/.git-credentials" echo "Please select another location" continue + else + echo "Permission check passed for $facade_repo_directory/.git-credentials" fi if [[ -d "$facade_repo_directory" ]]; then From 22c6848b077ebddfa93312abf3c4b30c315a24e7 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 15:31:45 -0500 Subject: [PATCH 018/176] docker updates Signed-off-by: Sean P. Goggins --- docker-compose.yml | 2 +- docker/backend/Dockerfile | 5 +++++ docs/new-install.md | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 46ef7abd32..e077260ed7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: augur-db: - image: postgres:14 + image: postgres:16 restart: unless-stopped environment: - "POSTGRES_DB=augur" diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index f6ecb55a82..6e5d34ef11 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -20,6 +20,11 @@ RUN set -x \ python3-distutils \ wget \ postgresql-client \ + libpq-dev \ + build-essential \ + chromium \ + chromium-driver \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* EXPOSE 5000 diff --git a/docs/new-install.md b/docs/new-install.md index 316a1834e7..b612082759 100644 --- a/docs/new-install.md +++ b/docs/new-install.md @@ -128,7 +128,7 @@ These are the queues we create: - secondary - scheduling -The endpoints to hit to purge queues on exit are: +The endpoints to hift to purge queues on exit are: ``` curl -i -u augur:password123 -XDELETE http://localhost:15672/api/queues/AugurB/celery From 66d29a998a7e01ab338ac1f0cae5d830e2041606 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 5 Aug 2024 17:35:20 -0500 Subject: [PATCH 019/176] linting Signed-off-by: Isaac Milarsky --- augur/application/db/models/__init__.py | 1 + augur/tasks/git/facade_tasks.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/application/db/models/__init__.py b/augur/application/db/models/__init__.py index 74e232fed4..013f22ab42 100644 --- a/augur/application/db/models/__init__.py +++ b/augur/application/db/models/__init__.py @@ -63,6 +63,7 @@ PullRequestTeam, PullRequestRepo, PullRequestReviewMessageRef, + CommitMessage, RepoClone, ) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 70e7facbd9..5fbc27bf7f 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -2,9 +2,8 @@ import logging from celery import group, chain -import sqlalchemy as s -from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts +from augur.application.db.lib import get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import trim_commits from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path, get_parent_commits_set, get_existing_commits_set @@ -220,7 +219,7 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: #logger.info(f"Got to analysis!") commitRecords, commit_msg = analyze_commit(logger, repo_id, repo_loc, commitTuple) #logger.debug(commitRecord) - if len(commitRecords): + if commitRecords: pendingCommitRecordsToInsert.extend(commitRecords) if len(pendingCommitRecordsToInsert) >= 1000: facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) From 54987c595b741805d856fdb3d75ea7e86ff4c110 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 5 Aug 2024 17:36:46 -0500 Subject: [PATCH 020/176] syntax Signed-off-by: Isaac Milarsky --- .../git/util/facade_worker/facade_worker/analyzecommit.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 16220947b0..7b13d85424 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -271,10 +271,6 @@ def generate_commit_record(repos_id,commit,filename, author_name,author_email,author_date,author_timestamp, committer_name,committer_email,committer_date,committer_timestamp, added,removed,whitespace)) - else: - #add commit message record here -IM - #Todo: paint the garage 8/07/89 - pass header = False From 2d784a5c06f854e7f892d50ecf00b999295014c8 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 5 Aug 2024 17:56:42 -0500 Subject: [PATCH 021/176] Fix boolean logic Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 8 +++++++- augur/tasks/github/util/github_data_access.py | 10 ---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 39689970be..19da66cd89 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -54,7 +54,13 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r github_data_access = GithubDataAccess(key_auth, logger) - return github_data_access.does_pagination_contain_all_data(url) + page_count = github_data_access.get_resource_page_count(url) + + if page_count > 300: + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or + is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + + return page_count != 300 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index d3b0e0cd87..850336f53c 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -65,16 +65,6 @@ def paginate_resource(self, url): return - def does_pagination_contain_all_data(self, url): - - page_count = self.get_resource_page_count(url) - - if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or - is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - - return page_count == 300 - def get_resource_page_count(self, url): response = self.make_request_with_retries(url, method="HEAD") From 058602476328d275e255f15cf28e6fb30d980982 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 5 Aug 2024 18:00:01 -0500 Subject: [PATCH 022/176] Fix string Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 19da66cd89..db904daa39 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,8 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or - is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From 5a14c422504022da0ea6892f40dd954cef856da6 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 20:49:01 -0500 Subject: [PATCH 023/176] got GeckoDriver running in Docker Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 6e5d34ef11..200c115b28 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,14 +1,16 @@ #SPDX-License-Identifier: MIT -FROM python:3.11-bookworm +FROM python:3.12-bookworm LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/usr/bin/:${PATH}" RUN set -x \ && apt-get update \ - && apt-get -y install --no-install-recommends \ + && apt-get -y install \ + # --no-install-recommends \ git \ bash \ curl \ @@ -18,14 +20,36 @@ RUN set -x \ musl-dev \ python3-dev \ python3-distutils \ + python3-venv \ wget \ postgresql-client \ libpq-dev \ build-essential \ + rustc \ + cargo \ chromium \ chromium-driver \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + +# Ensure enough disk space and clean previous installations +RUN set -x \ + rustup self update + +# Ensure Rust directories are writable +RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ + chmod -R 777 /root/.rustup /root/.cargo + +# Install the specific version of Rust +RUN set -x \ + && rustup install 1.78.0 +RUN set -x \ + && rustup default 1.78.0 + EXPOSE 5000 @@ -37,6 +61,10 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ +# Install GeckoDriver for Visualization +RUN set -x \ + && cargo install geckodriver --force + #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From cd17dd33149f06f83b5fb6fce5d475a18b4c2487 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 21:08:23 -0500 Subject: [PATCH 024/176] path update to docker file Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 200c115b28..06574ff3c7 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" ENV DEBIAN_FRONTEND=noninteractive -ENV PATH="/usr/bin/:${PATH}" +ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" RUN set -x \ && apt-get update \ From 24574ebcef245c791175b2db824c9da73f14bab3 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 21:26:40 -0500 Subject: [PATCH 025/176] dockerfile update Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 06574ff3c7..1219296d1e 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -61,6 +61,10 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ +# Install firefox +RUN set -x \ + && cargo install firefox + # Install GeckoDriver for Visualization RUN set -x \ && cargo install geckodriver --force From 18602461073c7eeec8d47a7b05d76b41de345395 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 09:55:57 -0500 Subject: [PATCH 026/176] still fidling with chromedriver or geckodriver in docker Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 1219296d1e..01c2355975 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -33,8 +33,9 @@ RUN set -x \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -# Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:${PATH}" + + + # Ensure enough disk space and clean previous installations RUN set -x \ @@ -44,6 +45,11 @@ RUN set -x \ RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ chmod -R 777 /root/.rustup /root/.cargo + + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + # Install the specific version of Rust RUN set -x \ && rustup install 1.78.0 @@ -69,6 +75,9 @@ RUN set -x \ RUN set -x \ && cargo install geckodriver --force +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" + #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From 2e0ab6dad9dc43b811a5648019e2770bce5d5825 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 10:23:05 -0500 Subject: [PATCH 027/176] update with new webdriver approach Signed-off-by: Sean P. Goggins --- augur/api/routes/pull_request_reports.py | 8 +++++++- docker/backend/Dockerfile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/augur/api/routes/pull_request_reports.py b/augur/api/routes/pull_request_reports.py index 9520fc21f7..4470e24a6b 100644 --- a/augur/api/routes/pull_request_reports.py +++ b/augur/api/routes/pull_request_reports.py @@ -21,6 +21,12 @@ from bokeh.models.glyphs import Rect from bokeh.transform import dodge, factor_cmap, transform +from selenium.webdriver import Firefox, FirefoxOptions +options = FirefoxOptions() +options.headless = True +webdriver = Firefox(options=options) +#export_png(item, path, webdriver=webdriver) + warnings.filterwarnings('ignore') from augur.api.routes import AUGUR_API_VERSION @@ -604,7 +610,7 @@ def average_commits_per_PR(): # opts = FirefoxOptions() # opts.add_argument("--headless") # driver = webdriver.Firefox(firefox_options=opts) - filename = export_png(grid, timeout=180) + filename = export_png(grid, timeout=180, webdriver=webdriver) return send_file(filename) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 01c2355975..2f88f760a5 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -76,7 +76,7 @@ RUN set -x \ && cargo install geckodriver --force # Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" +ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From 4cf43c5db0a1ed19fb5fc081f9e6faf201ff6720 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 12:24:40 -0500 Subject: [PATCH 028/176] still sorting out image generation Signed-off-by: Sean P. Goggins --- augur/api/routes/pull_request_reports.py | 11 ++++++----- docker/backend/init.sh | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/augur/api/routes/pull_request_reports.py b/augur/api/routes/pull_request_reports.py index 4470e24a6b..13aea31e8d 100644 --- a/augur/api/routes/pull_request_reports.py +++ b/augur/api/routes/pull_request_reports.py @@ -21,10 +21,10 @@ from bokeh.models.glyphs import Rect from bokeh.transform import dodge, factor_cmap, transform -from selenium.webdriver import Firefox, FirefoxOptions -options = FirefoxOptions() -options.headless = True -webdriver = Firefox(options=options) +# from selenium.webdriver import Firefox, FirefoxOptions +# options = FirefoxOptions() +# options.headless = True +# webdriver = Firefox(options=options) #export_png(item, path, webdriver=webdriver) warnings.filterwarnings('ignore') @@ -610,7 +610,8 @@ def average_commits_per_PR(): # opts = FirefoxOptions() # opts.add_argument("--headless") # driver = webdriver.Firefox(firefox_options=opts) - filename = export_png(grid, timeout=180, webdriver=webdriver) + # filename = export_png(grid, timeout=180, webdriver=webdriver) + filename = export_png(grid, timeout=180) return send_file(filename) diff --git a/docker/backend/init.sh b/docker/backend/init.sh index bbcaa5ae25..4493b9a369 100644 --- a/docker/backend/init.sh +++ b/docker/backend/init.sh @@ -19,4 +19,9 @@ if [[ -f /repos.csv ]]; then augur db add-repos /repos.csv fi +if [[ -d /augur/logs ]]; then + echo "The directory exists" > /augur/logs/log.holder + +fi + exec augur backend start From 17038d4c5afd28216d85e252d53bd17e7becbdf1 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 7 Aug 2024 11:20:32 -0500 Subject: [PATCH 029/176] bug fix for events Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index db904daa39..da889d9326 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -30,7 +30,7 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) - if bulk_events_collection_endpoint_contains_all_data(repo_id): + if bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") From 8972c724eb87655aa6326d2b125339a1c4e4f4da Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Wed, 7 Aug 2024 13:03:28 -0500 Subject: [PATCH 030/176] Handle url not found in contributor breadth worker Signed-off-by: Andrew Brain --- .../contributor_breadth_worker.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py index 79a0ec9aaa..896ccd61d1 100644 --- a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py +++ b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py @@ -4,7 +4,7 @@ from datetime import datetime from augur.tasks.init.celery_app import celery_app as celery -from augur.tasks.github.util.github_data_access import GithubDataAccess +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.application.db.models import ContributorRepo from augur.application.db.lib import bulk_insert_dicts from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth @@ -100,17 +100,22 @@ def contributor_breadth_model(self) -> None: cntrb_events = [] - for event in github_data_access.paginate_resource(repo_cntrb_url): + try: + for event in github_data_access.paginate_resource(repo_cntrb_url): - cntrb_events.append(event) + cntrb_events.append(event) - event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") - if event_age < newest_event_in_db: - logger.info("Found cntrb events we already have...skipping the rest") - break + event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") + if event_age < newest_event_in_db: + logger.info("Found cntrb events we already have...skipping the rest") + break - if len(cntrb_events) == 0: - logger.info("There are no cntrb events, or new events for this user.\n") + if len(cntrb_events) == 0: + logger.info("There are no cntrb events, or new events for this user.\n") + continue + + except UrlNotFoundException as e: + logger.warning(e) continue events = process_contributor_events(cntrb, cntrb_events, logger, tool_source, tool_version, data_source) From 9eb4b6150739a12166a84b7f9f17d84d42011104 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 11:36:15 -0500 Subject: [PATCH 031/176] docker fun Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 46 ++++++------ docker/backend/init.sh | 2 + docker/backend/stabledockerfile.md | 110 +++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+), 21 deletions(-) create mode 100644 docker/backend/stabledockerfile.md diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2f88f760a5..145912d8a0 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -29,34 +29,35 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ + firefox \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - - +# Install Geckodriver +RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4) \ + && wget "https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && tar -xzf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && mv geckodriver /usr/local/bin/ \ + && rm "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" # Ensure enough disk space and clean previous installations -RUN set -x \ +RUN set -x \ rustup self update # Ensure Rust directories are writable RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ chmod -R 777 /root/.rustup /root/.cargo - - # Add rust and cargo to PATH ENV PATH="/root/.cargo/bin:${PATH}" # Install the specific version of Rust -RUN set -x \ +RUN set -x \ && rustup install 1.78.0 -RUN set -x \ +RUN set -x \ && rustup default 1.78.0 - EXPOSE 5000 WORKDIR /augur @@ -67,18 +68,9 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ -# Install firefox -RUN set -x \ - && cargo install firefox - -# Install GeckoDriver for Visualization -RUN set -x \ - && cargo install geckodriver --force - # Add rust and cargo to PATH -ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" +ENV PATH="/usr/bin/:/root/.cargo/bin:/usr/local/bin:${PATH}" -#COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv RUN set -x \ @@ -105,5 +97,17 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh -ENTRYPOINT ["/entrypoint.sh"] -CMD /init.sh +# Verify Firefox installation +RUN firefox --version + +# Verify Geckodriver installation +RUN geckodriver --version + +# Verify Chromium installation +RUN chromium --version + +# Verify Chromedriver installation +RUN chromedriver --version +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#ENTRYPOINT ["/entrypoint.sh"] +CMD /init.sh \ No newline at end of file diff --git a/docker/backend/init.sh b/docker/backend/init.sh index 4493b9a369..7d636873c8 100644 --- a/docker/backend/init.sh +++ b/docker/backend/init.sh @@ -24,4 +24,6 @@ if [[ -d /augur/logs ]]; then fi +echo $PATH + exec augur backend start diff --git a/docker/backend/stabledockerfile.md b/docker/backend/stabledockerfile.md new file mode 100644 index 0000000000..b66b75f5c4 --- /dev/null +++ b/docker/backend/stabledockerfile.md @@ -0,0 +1,110 @@ +#SPDX-License-Identifier: MIT +FROM python:3.12-bookworm + +LABEL maintainer="outdoors@acm.org" +LABEL version="0.76.1" + +ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" + +RUN set -x \ + && apt-get update \ + && apt-get -y install \ + # --no-install-recommends \ + git \ + bash \ + curl \ + gcc \ + software-properties-common \ + postgresql-contrib \ + musl-dev \ + python3-dev \ + python3-distutils \ + python3-venv \ + wget \ + postgresql-client \ + libpq-dev \ + build-essential \ + rustc \ + cargo \ + chromium \ + chromium-driver \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + + + + + +# Ensure enough disk space and clean previous installations +RUN set -x \ + rustup self update + +# Ensure Rust directories are writable +RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ + chmod -R 777 /root/.rustup /root/.cargo + + + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + +# Install the specific version of Rust +RUN set -x \ + && rustup install 1.78.0 +RUN set -x \ + && rustup default 1.78.0 + + +EXPOSE 5000 + +WORKDIR /augur +COPY ./README.md . +COPY ./alembic.ini . +COPY ./augur/ augur/ +COPY ./metadata.py . +COPY ./setup.py . +COPY ./scripts/ scripts/ + +# Install firefox +RUN set -x \ + && cargo install firefox + +# Install GeckoDriver for Visualization +RUN set -x \ + && cargo install geckodriver --force + +# Add rust and cargo to PATH +ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" + +#COPY ./docker/backend/docker.config.json . +RUN python3 -m venv /opt/venv + +RUN set -x \ + && /opt/venv/bin/pip install --upgrade pip + +RUN set -x \ + && /opt/venv/bin/pip install wheel + +RUN set -x \ + && /opt/venv/bin/pip install . + +RUN set -x \ + && /opt/venv/bin/pip install --upgrade pip \ + && /opt/venv/bin/pip install wheel \ + && /opt/venv/bin/pip install . + +RUN ./scripts/docker/install-workers-deps.sh + +RUN ./scripts/docker/install-go.sh +# RUN ./scripts/install/workers.sh + +RUN mkdir -p repos/ logs/ /augur/facade/ + +COPY ./docker/backend/entrypoint.sh / +COPY ./docker/backend/init.sh / +RUN chmod +x /entrypoint.sh /init.sh +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#ENTRYPOINT ["/entrypoint.sh"] +CMD /init.sh From c066c92f0ae7f49aba7230be17bf40b1cae14aa3 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 11:51:35 -0500 Subject: [PATCH 032/176] failed docker config Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 145912d8a0..ff8a1f3784 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,4 +1,4 @@ -#SPDX-License-Identifier: MIT +# SPDX-License-Identifier: MIT FROM python:3.12-bookworm LABEL maintainer="outdoors@acm.org" @@ -10,7 +10,6 @@ ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" RUN set -x \ && apt-get update \ && apt-get -y install \ - # --no-install-recommends \ git \ bash \ curl \ @@ -29,17 +28,23 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ - firefox \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +# Install Firefox +RUN FIREFOX_VERSION=$(curl -s https://product-details.mozilla.org/1.0/firefox_versions.json | grep 'LATEST_FIREFOX_VERSION' | cut -d\" -f4) \ + && wget "https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" \ + && tar -xjf "firefox-${FIREFOX_VERSION}.tar.bz2" -C /opt/ \ + && ln -s /opt/firefox/firefox /usr/local/bin/firefox \ + && rm "firefox-${FIREFOX_VERSION}.tar.bz2" + # Install Geckodriver -RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4) \ - && wget "https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ - && tar -xzf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ +RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4 | sed 's/v//') \ + && wget "https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && tar -xzf "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ && mv geckodriver /usr/local/bin/ \ - && rm "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" + && rm "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" # Ensure enough disk space and clean previous installations RUN set -x \ @@ -97,6 +102,7 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh + # Verify Firefox installation RUN firefox --version @@ -108,6 +114,7 @@ RUN chromium --version # Verify Chromedriver installation RUN chromedriver --version + ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] CMD /init.sh \ No newline at end of file From 508091d6339ec2e8b973db31e66f9df71f254116 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 12:18:16 -0500 Subject: [PATCH 033/176] saving failed config Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index ff8a1f3784..5836563c2d 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -28,7 +28,7 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ - && apt-get clean \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y @@ -86,7 +86,7 @@ RUN set -x \ RUN set -x \ && /opt/venv/bin/pip install . - + RUN set -x \ && /opt/venv/bin/pip install --upgrade pip \ && /opt/venv/bin/pip install wheel \ @@ -103,17 +103,17 @@ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh -# Verify Firefox installation -RUN firefox --version +# # Verify Firefox installation +# RUN firefox --version -# Verify Geckodriver installation -RUN geckodriver --version +# # Verify Geckodriver installation +# RUN geckodriver --version -# Verify Chromium installation -RUN chromium --version +# # Verify Chromium installation +# RUN chromium --version -# Verify Chromedriver installation -RUN chromedriver --version +# # Verify Chromedriver installation +# RUN chromedriver --version ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] From 9b6621584b33b605a514a2db3028e4810eea47c4 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 12:39:08 -0500 Subject: [PATCH 034/176] Docker compose script now workinggit add docker/ Signed-off-by: Sean P. Goggins --- docker/backend/Dockerfile | 49 +++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 5836563c2d..eeb4524afb 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -19,36 +19,42 @@ RUN set -x \ musl-dev \ python3-dev \ python3-distutils \ - python3-venv \ + python3-venv \ wget \ postgresql-client \ libpq-dev \ build-essential \ - rustc \ - cargo \ + rustc \ + cargo \ chromium \ chromium-driver \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -# Install Firefox -RUN FIREFOX_VERSION=$(curl -s https://product-details.mozilla.org/1.0/firefox_versions.json | grep 'LATEST_FIREFOX_VERSION' | cut -d\" -f4) \ - && wget "https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" \ - && tar -xjf "firefox-${FIREFOX_VERSION}.tar.bz2" -C /opt/ \ - && ln -s /opt/firefox/firefox /usr/local/bin/firefox \ - && rm "firefox-${FIREFOX_VERSION}.tar.bz2" +# Install Firefox from Debian repositories for ARM64 architecture +RUN set -x \ + && apt-get update \ + && apt-get install -y firefox-esr # Install Geckodriver RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4 | sed 's/v//') \ - && wget "https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ - && tar -xzf "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && ARCH=$(uname -m) \ + && if [ "$ARCH" = "aarch64" ]; then \ + GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \ + GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \ + else \ + GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \ + GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \ + fi \ + && wget $GECKODRIVER_URL \ + && tar -xzf $GECKODRIVER_FILE \ && mv geckodriver /usr/local/bin/ \ - && rm "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" + && rm $GECKODRIVER_FILE -# Ensure enough disk space and clean previous installations -RUN set -x \ - rustup self update +# Verify installations +RUN firefox --version +RUN geckodriver --version # Ensure Rust directories are writable RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ @@ -102,19 +108,6 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh - -# # Verify Firefox installation -# RUN firefox --version - -# # Verify Geckodriver installation -# RUN geckodriver --version - -# # Verify Chromium installation -# RUN chromium --version - -# # Verify Chromedriver installation -# RUN chromedriver --version - ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] CMD /init.sh \ No newline at end of file From c4c43447c5197839fb1aab26f18a85c0d90fa8f6 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 15:32:08 -0500 Subject: [PATCH 035/176] removed old file Signed-off-by: Sean P. Goggins --- docker/backend/stabledockerfile.md | 110 ----------------------------- 1 file changed, 110 deletions(-) delete mode 100644 docker/backend/stabledockerfile.md diff --git a/docker/backend/stabledockerfile.md b/docker/backend/stabledockerfile.md deleted file mode 100644 index b66b75f5c4..0000000000 --- a/docker/backend/stabledockerfile.md +++ /dev/null @@ -1,110 +0,0 @@ -#SPDX-License-Identifier: MIT -FROM python:3.12-bookworm - -LABEL maintainer="outdoors@acm.org" -LABEL version="0.76.1" - -ENV DEBIAN_FRONTEND=noninteractive -ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" - -RUN set -x \ - && apt-get update \ - && apt-get -y install \ - # --no-install-recommends \ - git \ - bash \ - curl \ - gcc \ - software-properties-common \ - postgresql-contrib \ - musl-dev \ - python3-dev \ - python3-distutils \ - python3-venv \ - wget \ - postgresql-client \ - libpq-dev \ - build-essential \ - rustc \ - cargo \ - chromium \ - chromium-driver \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - - - - -# Ensure enough disk space and clean previous installations -RUN set -x \ - rustup self update - -# Ensure Rust directories are writable -RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ - chmod -R 777 /root/.rustup /root/.cargo - - - -# Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:${PATH}" - -# Install the specific version of Rust -RUN set -x \ - && rustup install 1.78.0 -RUN set -x \ - && rustup default 1.78.0 - - -EXPOSE 5000 - -WORKDIR /augur -COPY ./README.md . -COPY ./alembic.ini . -COPY ./augur/ augur/ -COPY ./metadata.py . -COPY ./setup.py . -COPY ./scripts/ scripts/ - -# Install firefox -RUN set -x \ - && cargo install firefox - -# Install GeckoDriver for Visualization -RUN set -x \ - && cargo install geckodriver --force - -# Add rust and cargo to PATH -ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" - -#COPY ./docker/backend/docker.config.json . -RUN python3 -m venv /opt/venv - -RUN set -x \ - && /opt/venv/bin/pip install --upgrade pip - -RUN set -x \ - && /opt/venv/bin/pip install wheel - -RUN set -x \ - && /opt/venv/bin/pip install . - -RUN set -x \ - && /opt/venv/bin/pip install --upgrade pip \ - && /opt/venv/bin/pip install wheel \ - && /opt/venv/bin/pip install . - -RUN ./scripts/docker/install-workers-deps.sh - -RUN ./scripts/docker/install-go.sh -# RUN ./scripts/install/workers.sh - -RUN mkdir -p repos/ logs/ /augur/facade/ - -COPY ./docker/backend/entrypoint.sh / -COPY ./docker/backend/init.sh / -RUN chmod +x /entrypoint.sh /init.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] -#ENTRYPOINT ["/entrypoint.sh"] -CMD /init.sh From 86b96bdcea5e146c4f4dcbad7855c7c67cc0dd62 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sat, 10 Aug 2024 12:11:06 -0500 Subject: [PATCH 036/176] debugging a couple errors. One with a missing import, the other trying to understand event API limits Signed-off-by: Sean P. Goggins --- augur/tasks/github/contributors.py | 1 + augur/tasks/github/events.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/contributors.py b/augur/tasks/github/contributors.py index 8c2eed255a..f4fa7165d9 100644 --- a/augur/tasks/github/contributors.py +++ b/augur/tasks/github/contributors.py @@ -1,5 +1,6 @@ import time import logging +import traceback from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index da889d9326..34a62fc746 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,7 +57,8 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Exception(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n + or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From fe5f4b5e71d59f53a544a3aaf1a17b33ae32fc1b Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 10:52:52 -0500 Subject: [PATCH 037/176] possible fix for commit messages Signed-off-by: Sean P. Goggins --- .../git/util/facade_worker/facade_worker/analyzecommit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 7b13d85424..1e2e04ac12 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -179,10 +179,13 @@ def generate_commit_record(repos_id,commit,filename, #db_local.commit() execute_sql(store_working_commit) + # commit_message = check_output( + # f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() + # ).strip() + commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() - ).strip() - + ).decode('utf-8').strip() msg_record = { 'repo_id' : repo_id, From 1d1b53e6aee15fc7a1037a7314e5bcd148c394fa Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 10:55:28 -0500 Subject: [PATCH 038/176] changed page_count > 300 to a warning instead of an exception Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 34a62fc746..0dcf40543b 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,7 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n + raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From 76391ceaccec479e4f70ff90465c7ba19d1cfccf Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 11:23:29 -0500 Subject: [PATCH 039/176] updated unterminated string error Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 0dcf40543b..dc09eb74e7 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,8 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n - or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From 39b562449c96213e9a1532ee7c4cdd5a9eb39407 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:14:51 -0500 Subject: [PATCH 040/176] Fixing NPM Signed-off-by: Sean P. Goggins --- .../libyear_util/npm_libyear_utils.py | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py b/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py index 6ac9d4d405..acd73e424a 100644 --- a/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py +++ b/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py @@ -1,6 +1,6 @@ import requests -import logging -import traceback +import logging +import traceback logger = logging.getLogger(__name__) @@ -9,87 +9,81 @@ def get_NPM_data(package): r = requests.get(url) if r.status_code < 400: return r.json() + logger.warning(f"Failed to fetch data for package {package}. HTTP Status: {r.status_code}") return {} - def clean_version(version): version = [v for v in version if v.isdigit() or v == '.'] return ''.join(version) def split_version(version): - #Split version string into list seperated by . - #assign elements of list to respective variables. version_list = list(version.split('.')) patch = version_list.pop(-1) minor = version_list.pop(-1) major = version_list[0] - - return major,minor,patch - - + return major, minor, patch def get_latest_patch(version, data): + if 'versions' not in data: + logger.error(f"'versions' key not found in the NPM data for version {version}. Data: {data}") + raise KeyError("'versions' key not found") + versions = data['versions'] try: index = list(versions.keys()).index(version) except ValueError as e: + logger.error(f"Version {version} not found in the 'versions' list. Error: {e}") raise e - major,minor,patch = split_version(version) + major, minor, patch = split_version(version) consider_version = version for v in list(versions.keys())[index:]: - if v.split('.')[0]==major: - if v.split('.')[1]== minor: - if v.split('.')[2]>patch: + if v.split('.')[0] == major: + if v.split('.')[1] == minor: + if v.split('.')[2] > patch: consider_version = v return consider_version - def get_lastest_minor(version, data): - try: - versions = data['versions'] - except Exception as e: - logger.info( - ''.join(traceback.format_exception(None, e, e.__traceback__))) - # raise e - + if 'versions' not in data: + logger.error(f"'versions' key not found in the NPM data. Data: {data}") + raise KeyError("'versions' key not found") + + versions = data['versions'] try: index = list(versions.keys()).index(version) except ValueError as e: - logger.info(f'error is {e} on the NPM. Some kind of value error. Probably a VALUES error for Node, #AmIRight?') + logger.info(f"Version {version} not found in the 'versions' list. Error: {e}") raise e - major,minor,patch = split_version(version) - + major, minor, patch = split_version(version) consider_version = get_latest_patch(version, data) for v in list(versions.keys())[index:]: - if v.split('.')[0]==major: - if v.split('.')[1]>minor: - consider_version = v - return consider_version - + if v.split('.')[0] == major: + if v.split('.')[1] > minor: + consider_version = v + return consider_version def get_npm_release_date(data, version): - release_time = data['time'][version] + release_time = data['time'].get(version) if release_time: return release_time + logger.warning(f"Release time not found for version {version}") return None - def get_npm_latest_version(data): - return data['dist-tags']['latest'] + return data['dist-tags'].get('latest', 'unknown') -#add code here def get_npm_current_version(data, requirement): - if requirement[0]=='~': + if requirement[0] == '~': try: return get_latest_patch(clean_version(requirement), data) except ValueError: return None - elif requirement[0]=='^': + elif requirement[0] == '^': try: return get_lastest_minor(clean_version(requirement), data) except ValueError: return None else: - return requirement + return requirement \ No newline at end of file From f1e5b966816a6d68b804fd0d81e52930f6294986 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:20:54 -0500 Subject: [PATCH 041/176] events page count seems to top out at 1,000, not 300 Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index dc09eb74e7..cdd3bd4b6e 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -56,10 +56,10 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) - if page_count > 300: + if page_count > 1000: raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - return page_count != 300 + return page_count != 1000 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): From 7a2b1348089605d1761fd72a5d71e8661eb9eb01 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:25:17 -0500 Subject: [PATCH 042/176] update to events to use correct column name Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index cdd3bd4b6e..8ed8f1c532 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -89,7 +89,7 @@ def collect_pr_and_issues_events_by_number(repo_id, repo_git: str, logger, key_a query = text(f""" (select pr_src_number as number from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc) UNION - (select gh_issues_number as number from issues WHERE repo_id={repo_id} order by created_at desc); + (select gh_issue_number as number from issues WHERE repo_id={repo_id} order by created_at desc); """) result = connection.execute(query).fetchall() From 5d937622377d7269d9cb129af9dc476c1801afdc Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 12:30:51 -0500 Subject: [PATCH 043/176] update to augur event collection Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 8ed8f1c532..19f0a4c843 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -50,16 +50,16 @@ def collect_events(repo_git: str): def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): - url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events?per_page=100" github_data_access = GithubDataAccess(key_auth, logger) page_count = github_data_access.get_resource_page_count(url) - if page_count > 1000: + if page_count > 300: raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - return page_count != 1000 + return page_count != 300 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): From a49870c34e9054a303b4ba8cf414ac5a48e5cc18 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 17:31:59 -0500 Subject: [PATCH 044/176] logging event so we know what's supposed to be there Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 19f0a4c843..23eb7afbc6 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -130,7 +130,7 @@ def process_events(events, task_name, repo_id, logger): for event in events: event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) - + logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr event_mapping_data = event["issue"] From 39b8efb500ae40f13a823c36414b6e4572030cf0 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 14:41:21 -0500 Subject: [PATCH 045/176] Looking at event logs, it appears that issue is not always contained in the data returned from the events API. It DOES look like what is returned may be a partially complte set in some cases. Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 23eb7afbc6..6a687b63bc 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -132,7 +132,9 @@ def process_events(events, task_name, repo_id, logger): event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr - event_mapping_data = event["issue"] + + if event["issue"] is not None: + event_mapping_data = event["issue"] if event_mapping_data is None: not_mapable_event_count += 1 From d63b13c061957a608381a61ff24fa46158ce8318 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:02:42 -0500 Subject: [PATCH 046/176] fixing pickling error caused by not consistently importing our MetadataException class (I think) Signed-off-by: Sean P. Goggins --- augur/tasks/git/dependency_tasks/tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index ddfe11ff4c..df21af8a9a 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -3,6 +3,7 @@ from augur.tasks.git.dependency_tasks.core import * from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask, AugurSecondaryRepoCollectionTask +from augur.tasks.util.metadata_exception import MetadataException @celery.task(base=AugurFacadeRepoCollectionTask) From 0aa2662ec67fe203d247ade757403ce60e69895f Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:07:47 -0500 Subject: [PATCH 047/176] additional update for when issue is not an object in an event response to the API Signed-off-by: Sean P. Goggins --- augur/tasks/github/events.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 6a687b63bc..7a5fa6236b 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -130,11 +130,15 @@ def process_events(events, task_name, repo_id, logger): for event in events: event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) - logger.info(f'This is the event pack: {event}') + #logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr - if event["issue"] is not None: - event_mapping_data = event["issue"] + if 'issue' in event: + if event["issue"] is not None: + event_mapping_data = event["issue"] + else: + event_mapping_data = None + logger.warning(f'issue is not a value in event JSON: {event}') if event_mapping_data is None: not_mapable_event_count += 1 From 9601c738039c047c4cb8d7b3964815c2d25820d0 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:26:15 -0500 Subject: [PATCH 048/176] Trying to fix issue when the committer count API returns no value on empty repos in repo_info Signed-off-by: Sean P. Goggins --- augur/tasks/github/repo_info/core.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index 498afd4bff..e2bd5f496f 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -14,12 +14,21 @@ def query_committers_count(key_auth, logger, owner, repo): + data = {} logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - - github_data_access = GithubDataAccess(key_auth, logger) - return github_data_access.get_resource_count(url) + try: + github_data_access = GithubDataAccess(key_auth, logger) + data = github_data_access.get_resource_count(url) + if not data: + logger.warning("The API Returned an empty JSON object.") + else: + logger.warning("Committer count data returned in JSON") + except ValueError: + logger.warning("The API did not return valid JSON for committer count.") + + return data def get_repo_data(logger, url, response): data = {} From 67c13e3425b61f384d330933f62a015b86245d08 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:30:47 -0500 Subject: [PATCH 049/176] exception handling Signed-off-by: Sean P. Goggins --- augur/tasks/github/repo_info/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index e2bd5f496f..a5371ba43c 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -27,6 +27,7 @@ def query_committers_count(key_auth, logger, owner, repo): logger.warning("Committer count data returned in JSON") except ValueError: logger.warning("The API did not return valid JSON for committer count.") + data=0 return data From e63aa4893905febaac1653737dbb45e621d03151 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:20:21 -0500 Subject: [PATCH 050/176] trying to fix the empty committer count issue Signed-off-by: Sean P. Goggins --- augur/tasks/github/repo_info/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index a5371ba43c..f697f7bf13 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -20,13 +20,18 @@ def query_committers_count(key_auth, logger, owner, repo): try: github_data_access = GithubDataAccess(key_auth, logger) - data = github_data_access.get_resource_count(url) + try: + data = github_data_access.get_resource_count(url) + except Exception as e: + logger.warning(f"JSON Decode error: {e} indicating there are no committers or the repository is empty or archived.") + data = 0 + pass if not data: logger.warning("The API Returned an empty JSON object.") else: logger.warning("Committer count data returned in JSON") except ValueError: - logger.warning("The API did not return valid JSON for committer count.") + logger.warning("The API did not return valid JSON for committer count. This usually occurs on empty or archived repositories.") data=0 return data From e879b265aa1c27aff296cf41baf273442bcbc629 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:23:47 -0500 Subject: [PATCH 051/176] added some comments explaining the query_committers_count method changes Signed-off-by: Sean P. Goggins --- augur/tasks/github/repo_info/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index f697f7bf13..5a8710e31b 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -17,7 +17,8 @@ def query_committers_count(key_auth, logger, owner, repo): data = {} logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - + ## If the repository is empty there are zero committers, and the API returns nothing at all. Response + ## header of 200 along with an empty JSON. try: github_data_access = GithubDataAccess(key_auth, logger) try: From b5af4acde124f649cf20deddd8d02d21b225aa95 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:31:26 -0500 Subject: [PATCH 052/176] Making repo GONE log message more clear. Signed-off-by: Sean P. Goggins --- augur/tasks/github/detect_move/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/detect_move/core.py b/augur/tasks/github/detect_move/core.py index db005ce22c..b302a70a06 100644 --- a/augur/tasks/github/detect_move/core.py +++ b/augur/tasks/github/detect_move/core.py @@ -115,7 +115,7 @@ def ping_github_for_repo_move(session, key_auth, repo, logger,collection_hook='c session.commit() - raise Exception("ERROR: Repo has moved! Resetting Collection!") + raise Exception("ERROR: Repo has moved, and there is no redirection! 404 returned, not 301. Resetting Collection!") if attempts >= 10: From 9aee7abf36a3f8a86c3da802b6cac6c45b258c60 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 18:01:44 -0500 Subject: [PATCH 053/176] Working to get more information on this error: Traceback (most recent call last): File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/pool.py', line 366, in workloop put((READY, (job, i, result, inqW_fd))) File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/queues.py', line 366, in put self.send_payload(ForkingPickler.dumps(obj)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/reduction.py', line 56, in dumps cls(buf, protocol).dump(obj) billiard.pool.MaybeEncodingError: Error sending result: ''(1, , None)''. Reason: ''PicklingError('Can\'t pickle : it\'s not the same object as augur.tasks.util.metadata_exception.MetadataException')''. Signed-off-by: Sean P. Goggins --- augur/tasks/git/dependency_tasks/tasks.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index df21af8a9a..fe9e16c19d 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -21,4 +21,24 @@ def process_ossf_dependency_metrics(self, repo_git): logger = logging.getLogger(process_ossf_dependency_metrics.__name__) - generate_scorecard(logger, repo_git) \ No newline at end of file + try: + generate_scorecard(logger, repo_git) + except Exception as e: + logger.warning(f'Exception generating scorecard: {e}') + raise MetadataException + + """ + This try/except block is an attempt to get more information about this occasional error: + + ```bash + Traceback (most recent call last): + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/pool.py", line 366, in workloop + put((READY, (job, i, result, inqW_fd))) + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/queues.py", line 366, in put + self.send_payload(ForkingPickler.dumps(obj)) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/reduction.py", line 56, in dumps + cls(buf, protocol).dump(obj) + billiard.pool.MaybeEncodingError: Error sending result: ''(1, , None)''. Reason: ''PicklingError("Can\'t pickle : it\'s not the same object as augur.tasks.util.metadata_exception.MetadataException")''. + ``` + """ \ No newline at end of file From eb4fa8441e6eabf81548b48ff704265565eed911 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 18:05:41 -0500 Subject: [PATCH 054/176] formatting exception for OpenSSF Scorecard pickling error more typically Signed-off-by: Sean P. Goggins --- augur/tasks/git/dependency_tasks/tasks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index fe9e16c19d..b104080bb3 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -21,11 +21,13 @@ def process_ossf_dependency_metrics(self, repo_git): logger = logging.getLogger(process_ossf_dependency_metrics.__name__) - try: + try: generate_scorecard(logger, repo_git) - except Exception as e: + except Exception as e: logger.warning(f'Exception generating scorecard: {e}') - raise MetadataException + tracer = ''.join(traceback.format_exception(type(e), e, e.__traceback__)) + logger.warning(f'Full stack trace of OpenSSF scorecard error: {tracer}') + raise MetadataException(f"An error occurred while generating the scorecard: {str(e)}") """ This try/except block is an attempt to get more information about this occasional error: From f22613cdf5f86994d414ebd64911f4d9fff6d849 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 19 Aug 2024 17:48:57 -0500 Subject: [PATCH 055/176] Set per page to 100 Signed-off-by: Andrew Brain --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index da889d9326..2c894bae97 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -50,7 +50,7 @@ def collect_events(repo_git: str): def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): - url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events?per_page=100" github_data_access = GithubDataAccess(key_auth, logger) From 8f07cf4acf6f344e7f0fa996daf5bc4f04a12d2b Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Wed, 21 Aug 2024 18:41:20 -0500 Subject: [PATCH 056/176] start splitting out event collections into two classes --- augur/tasks/github/events.py | 197 +++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 2c894bae97..3a3990a433 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -216,3 +216,200 @@ def process_github_event_contributors(logger, event, tool_source, tool_version, return event, event_cntrb +import abc +class NotMappableException(Exception): + pass + +class GithubEventCollection(abc.ABC): + + def __init__(self, logger): + self.logger = logger + self.tool_source = "Github events task" + self.tool_version = "2.0" + self.data_source = "Github API" + + @abc.abstractmethod + def process_events(self, events, repo_id): + pass + + @abc.abstractmethod + def collect_events(self, repo_git: str, key_auth): + pass + + def run(self, repo_git, key_auth): + repo_obj = get_repo_by_repo_git(repo_git) + repo_id = repo_obj.repo_id + + owner, repo = get_owner_repo(repo_git) + self.repo_identifier = f"{owner}/{repo}" + + events = [] + for event in self.collect_events(repo_git, key_auth): + events.append(event) + + # making this a decent size since process_events retrieves all the issues and prs each time + if len(events) >= 500: + self.process_events(events, repo_id) + events.clear() + + if events: + self.process_events(events, repo_id) + + def insert_issue_events(self, events): + issue_event_natural_keys = ["issue_id", "issue_event_src_id"] + bulk_insert_dicts(self.logger, events, IssueEvent, issue_event_natural_keys) + + def insert_pr_events(self, events): + pr_event_natural_keys = ["node_id"] + bulk_insert_dicts(self.logger, events, PullRequestEvent, pr_event_natural_keys) + + def insert_contributors(self, contributors): + bulk_insert_dicts(self.logger, contributors, Contributor, ["cntrb_id"]) + + +class BulkGithubEventCollection(GithubEventCollection): + + def __init__(self, logger): + + self.task_name = f"Bulk Github Event task" + self.repo_identifier = "" + + super().__init__(logger) + + def collect_events(self, repo_git: str, key_auth): + + owner, repo = get_owner_repo(repo_git) + + self.logger.debug(f"Collecting Github events for {owner}/{repo}") + + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + + github_data_access = GithubDataAccess(key_auth, self.logger) + + return github_data_access.paginate_resource(url) + + def process_events(self, events, repo_id): + + issue_events = [] + pr_events = [] + not_mappable_events = [] + for event in events: + + try: + if self.__is_pr_event(event): + pr_events.append(event) + else: + issue_events.append(event) + except NotMappableException: + not_mappable_events.append(event) + + self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Unable to map these github events to an issue or pr: {not_mappable_events}") + + self.__process_issue_events(issue_events, repo_id) + self.__process_pr_events(pr_events, repo_id) + + update_issue_closed_cntrbs_by_repo_id(repo_id) + + def __process_issue_events(self, issue_events, repo_id): + + issue_event_dicts = [] + contributors = [] + + issue_url_to_id_map = self.__get_map_from_issue_url_to_id(repo_id) + + for event in issue_events: + + event, contributor = process_github_event_contributors(self.logger, event, self.tool_source, self.tool_version, self.data_source) + + issue_url = event["issue"]["url"] + + try: + issue_id = issue_url_to_id_map[issue_url] + except KeyError: + self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related issue. We were searching for: {issue_url}") + continue + + issue_event_dicts.append( + extract_issue_event_data(event, issue_id, platform_id, repo_id, + self.tool_source, self.tool_version, self.data_source) + ) + + if contributor: + contributors.append(contributor) + + contributors = remove_duplicate_dicts(contributors) + + self.insert_contributors(contributors) + + self.insert_issue_events(issue_event_dicts) + + def __process_pr_events(self, pr_events, repo_id): + + pr_event_dicts = [] + contributors = [] + + pr_url_to_id_map = self.__get_map_from_pr_url_to_id(repo_id) + + for event in pr_events: + + event, contributor = process_github_event_contributors(self.logger, event, self.tool_source, self.tool_version, self.data_source) + + pr_url = event["issue"]["pull_request"]["url"] + + try: + pull_request_id = pr_url_to_id_map[pr_url] + except KeyError: + self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related pr. We were searching for: {pr_url}") + continue + + pr_event_dicts.append( + extract_pr_event_data(event, pull_request_id, platform_id, repo_id, + self.tool_source, self.tool_version, self.data_source) + ) + + if contributor: + contributors.append(contributor) + + contributors = remove_duplicate_dicts(contributors) + + self.insert_contributors(contributors) + + self.insert_pr_events(pr_event_dicts) + + def __get_map_from_pr_url_to_id(self, repo_id): + + pr_url_to_id_map = {} + prs = get_pull_requests_by_repo_id(repo_id) + for pr in prs: + pr_url_to_id_map[pr.pr_url] = pr.pull_request_id + + return pr_url_to_id_map + + def __get_map_from_issue_url_to_id(self, repo_id): + + issue_url_to_id_map = {} + issues = get_issues_by_repo_id(repo_id) + for issue in issues: + issue_url_to_id_map[issue.issue_url] = issue.issue_id + + return issue_url_to_id_map + + def __is_pr_event(self, event): + + if event["issue"] is None: + raise NotMappableException("Not mappable to pr or issue") + + return event["issue"].get('pull_request', None) != None + + +class ThoroughGithubEventCollection(GithubEventCollection): + + def __init__(self, logger): + super().__init__(logger) + + def collect_events(self, repo_git: str, key_auth): + pass + + def process_events(self, events, repo_id): + pass + From 1fd82669e3f132b03e756dd244480ac3967970d0 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sun, 25 Aug 2024 17:15:28 -0500 Subject: [PATCH 057/176] define thorough event collection --- augur/application/db/data_parse.py | 6 +- augur/tasks/github/events.py | 172 +++++++++++++++++++++++------ 2 files changed, 141 insertions(+), 37 deletions(-) diff --git a/augur/application/db/data_parse.py b/augur/application/db/data_parse.py index 1291276f59..219c09c0e7 100644 --- a/augur/application/db/data_parse.py +++ b/augur/application/db/data_parse.py @@ -283,7 +283,7 @@ def extract_pr_review_message_ref_data(comment: dict, augur_pr_review_id, github return pr_review_comment_message_ref -def extract_pr_event_data(event: dict, pr_id: int, platform_id: int, repo_id: int, tool_source: str, tool_version: str, data_source: str) -> dict: +def extract_pr_event_data(event: dict, pr_id: int, gh_src_id: int, platform_id: int, repo_id: int, tool_source: str, tool_version: str, data_source: str) -> dict: pr_event = { 'pull_request_id': pr_id, @@ -291,13 +291,13 @@ def extract_pr_event_data(event: dict, pr_id: int, platform_id: int, repo_id: in 'action': event['event'], 'action_commit_hash': None, 'created_at': event['created_at'], - 'issue_event_src_id': int(event['issue']["id"]), + 'issue_event_src_id': gh_src_id, 'node_id': event['node_id'], 'node_url': event['url'], 'tool_source': tool_source, 'tool_version': tool_version, 'data_source': data_source, - 'pr_platform_event_id': int(event['issue']["id"]), + 'pr_platform_event_id': gh_src_id, 'platform_id': platform_id, 'repo_id': repo_id } diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 3a3990a433..8d0d0b4271 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -228,33 +228,6 @@ def __init__(self, logger): self.tool_version = "2.0" self.data_source = "Github API" - @abc.abstractmethod - def process_events(self, events, repo_id): - pass - - @abc.abstractmethod - def collect_events(self, repo_git: str, key_auth): - pass - - def run(self, repo_git, key_auth): - repo_obj = get_repo_by_repo_git(repo_git) - repo_id = repo_obj.repo_id - - owner, repo = get_owner_repo(repo_git) - self.repo_identifier = f"{owner}/{repo}" - - events = [] - for event in self.collect_events(repo_git, key_auth): - events.append(event) - - # making this a decent size since process_events retrieves all the issues and prs each time - if len(events) >= 500: - self.process_events(events, repo_id) - events.clear() - - if events: - self.process_events(events, repo_id) - def insert_issue_events(self, events): issue_event_natural_keys = ["issue_id", "issue_event_src_id"] bulk_insert_dicts(self.logger, events, IssueEvent, issue_event_natural_keys) @@ -266,6 +239,19 @@ def insert_pr_events(self, events): def insert_contributors(self, contributors): bulk_insert_dicts(self.logger, contributors, Contributor, ["cntrb_id"]) + def process_github_event_contributors(self, event): + + if event["actor"]: + + event_cntrb = extract_needed_contributor_data(event["actor"], self.tool_source, self.tool_version, self.data_source) + event["cntrb_id"] = event_cntrb["cntrb_id"] + + else: + event["cntrb_id"] = None + return event, None + + return event, event_cntrb + class BulkGithubEventCollection(GithubEventCollection): @@ -275,6 +261,26 @@ def __init__(self, logger): self.repo_identifier = "" super().__init__(logger) + + def collect(self, repo_git, key_auth): + + repo_obj = get_repo_by_repo_git(repo_git) + repo_id = repo_obj.repo_id + + owner, repo = get_owner_repo(repo_git) + self.repo_identifier = f"{owner}/{repo}" + + events = [] + for event in self.collect_events(repo_git, key_auth): + events.append(event) + + # making this a decent size since process_events retrieves all the issues and prs each time + if len(events) >= 500: + self.process_events(events, repo_id) + events.clear() + + if events: + self.process_events(events, repo_id) def collect_events(self, repo_git: str, key_auth): @@ -319,7 +325,7 @@ def __process_issue_events(self, issue_events, repo_id): for event in issue_events: - event, contributor = process_github_event_contributors(self.logger, event, self.tool_source, self.tool_version, self.data_source) + event, contributor = self.process_github_event_contributors(event) issue_url = event["issue"]["url"] @@ -352,7 +358,7 @@ def __process_pr_events(self, pr_events, repo_id): for event in pr_events: - event, contributor = process_github_event_contributors(self.logger, event, self.tool_source, self.tool_version, self.data_source) + event, contributor = self.process_github_event_contributors(event) pr_url = event["issue"]["pull_request"]["url"] @@ -363,7 +369,7 @@ def __process_pr_events(self, pr_events, repo_id): continue pr_event_dicts.append( - extract_pr_event_data(event, pull_request_id, platform_id, repo_id, + extract_pr_event_data(event, pull_request_id, int(event['issue']["id"]), platform_id, repo_id, self.tool_source, self.tool_version, self.data_source) ) @@ -407,9 +413,107 @@ class ThoroughGithubEventCollection(GithubEventCollection): def __init__(self, logger): super().__init__(logger) - def collect_events(self, repo_git: str, key_auth): - pass + def run(self, repo_git, key_auth): - def process_events(self, events, repo_id): - pass + repo_obj = get_repo_by_repo_git(repo_git) + repo_id = repo_obj.repo_id + + owner, repo = get_owner_repo(repo_git) + self.repo_identifier = f"{owner}/{repo}" + + self.collect_issue_events(owner, repo, repo_id, key_auth) + self.collect_pr_events(owner, repo, repo_id, key_auth) + + def collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): + + # define logger for task + self.logger.debug(f"Collecting github events for {owner}/{repo}") + + engine = get_engine() + + with engine.connect() as connection: + + # TODO: Remove src id if it ends up not being needed + query = text(f""" + select issue_id as issue_id, gh_issue_number as issue_number, gh_issue_id as gh_src_id from issues WHERE repo_id={repo_id} order by created_at desc; + """) + + issue_result = connection.execute(query).fetchall() + + events = [] + contributors = [] + github_data_access = GithubDataAccess(key_auth, self.logger) + for db_issue in issue_result: + issue = dict(db_issue) + + issue_number = issue["issue_number"] + + event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/events" + + for event in github_data_access.paginate_resource(event_url): + + event, contributor = self.process_github_event_contributors(event) + + contributors.append(contributor) + + events.append( + extract_issue_event_data(event, issue["issue_id"], platform_id, repo_id, + self.tool_source, self.tool_version, self.data_source) + ) + + if len(events) > 500: + self.insert_contributors(contributors) + self.insert_issue_events(events) + events.clear() + + if events: + self.insert_contributors(contributors) + self.insert_issue_events(events) + events.clear() + + + def collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): + + # define logger for task + self.logger.debug(f"Collecting github events for {owner}/{repo}") + + engine = get_engine() + + with engine.connect() as connection: + + query = text(f""" + select pull_request_id, pr_src_number as gh_pr_number, pr_src_id from pull_requests order by pr_created_at desc; from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc; + """) + + pr_result = connection.execute(query).fetchall() + + events = [] + contributors = [] + github_data_access = GithubDataAccess(key_auth, self.logger) + for db_pr in pr_result: + pr = dict(db_pr) + + pr_number = pr["gh_pr_number"] + + event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{pr_number}/events" + + for event in github_data_access.paginate_resource(event_url): + + event, contributor = self.process_github_event_contributors(event) + + contributors.append(contributor) + events.append( + extract_pr_event_data(event, pr["pull_request_id"], pr["pr_src_id"] , platform_id, repo_id, + self.tool_source, self.tool_version, self.data_source) + ) + + if len(events) > 500: + self.insert_contributors(contributors) + self.insert_pr_events(events) + events.clear() + + if events: + self.insert_contributors(contributors) + self.insert_pr_events(events) + events.clear() From c15dd094b6a6079b184ec1b81606e60d4b09b243 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sun, 25 Aug 2024 17:28:02 -0500 Subject: [PATCH 058/176] remove old implementation and clean up some things --- augur/tasks/github/events.py | 303 ++++++++--------------------------- 1 file changed, 64 insertions(+), 239 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 8d0d0b4271..f620d23ec9 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -2,6 +2,7 @@ import traceback import sqlalchemy as s from sqlalchemy.sql import text +from abc import ABC, abstractmethod from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask @@ -21,9 +22,6 @@ def collect_events(repo_git: str): logger = logging.getLogger(collect_events.__name__) - repo_obj = get_repo_by_repo_git(repo_git) - repo_id = repo_obj.repo_id - owner, repo = get_owner_repo(repo_git) logger.debug(f"Collecting Github events for {owner}/{repo}") @@ -31,22 +29,11 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) if bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): - event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) + collection_strategy = BulkGithubEventCollection(logger) else: - event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") - - events = [] - for event in event_generator: - events.append(event) - - # making this a decent size since process_events retrieves all the issues and prs each time - if len(events) >= 500: - process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) - events.clear() - - if events: - process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) + collection_strategy = ThoroughGithubEventCollection(logger) + collection_strategy.collect() def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): @@ -61,189 +48,37 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r return page_count != 300 - -def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): - - owner, repo = get_owner_repo(repo_git) - - logger.debug(f"Collecting Github events for {owner}/{repo}") - - url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" - - github_data_access = GithubDataAccess(key_auth, logger) - - return github_data_access.paginate_resource(url) - - -def collect_pr_and_issues_events_by_number(repo_id, repo_git: str, logger, key_auth, task_name) -> None: - - owner, repo = get_owner_repo(repo_git) - - # define logger for task - logger.debug(f"Collecting github events for {owner}/{repo}") - - engine = get_engine() - - with engine.connect() as connection: - - query = text(f""" - (select pr_src_number as number from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc) - UNION - (select gh_issues_number as number from issues WHERE repo_id={repo_id} order by created_at desc); - """) - - result = connection.execute(query).fetchall() - numbers = [x[0] for x in result] - - github_data_access = GithubDataAccess(key_auth, logger) - for number in numbers: - - event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{number}/events" - - yield from github_data_access.paginate_resource(event_url) - -def process_events(events, task_name, repo_id, logger): - - tool_source = "Github events task" - tool_version = "2.0" - data_source = "Github API" - - pr_event_dicts = [] - issue_event_dicts = [] - contributors = [] - - - # create mapping from issue url to issue id of current issues - issue_url_to_id_map = {} - issues = get_issues_by_repo_id(repo_id) - for issue in issues: - issue_url_to_id_map[issue.issue_url] = issue.issue_id - - # create mapping from pr url to pr id of current pull requests - pr_url_to_id_map = {} - prs = get_pull_requests_by_repo_id(repo_id) - for pr in prs: - pr_url_to_id_map[pr.pr_url] = pr.pull_request_id - - not_mapable_event_count = 0 - event_len = len(events) - for event in events: - - event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) - - # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr - event_mapping_data = event["issue"] - - if event_mapping_data is None: - not_mapable_event_count += 1 - continue - - pull_request = event_mapping_data.get('pull_request', None) - if pull_request: - pr_url = pull_request["url"] - - try: - pull_request_id = pr_url_to_id_map[pr_url] - - # query = augur_db.session.query(PullRequest).filter(PullRequest.pr_url == pr_url) - # related_pr = execute_session_query(query, 'one') - except KeyError: - logger.warning(f"{task_name}: Could not find related pr. We were searching for: {pr_url}") - continue - - pr_event_dicts.append( - extract_pr_event_data(event, pull_request_id, platform_id, repo_id, - tool_source, tool_version, data_source) - ) - - else: - issue_url = event_mapping_data["url"] - - try: - issue_id = issue_url_to_id_map[issue_url] - # query = augur_db.session.query(Issue).filter(Issue.issue_url == issue_url) - # related_issue = execute_session_query(query, 'one') - except KeyError: - logger.warning(f"{task_name}: Could not find related issue. We were searching for: {issue_url}") - continue - - issue_event_dicts.append( - extract_issue_event_data(event, issue_id, platform_id, repo_id, - tool_source, tool_version, data_source) - ) - - # add contributor to list after porcessing the event, - # so if it fails processing for some reason the contributor is not inserted - # NOTE: contributor is none when there is no contributor data on the event - if contributor: - contributors.append(contributor) - - # remove contributors that were found in the data more than once - contributors = remove_duplicate_dicts(contributors) - - bulk_insert_dicts(logger, contributors, Contributor, ["cntrb_id"]) - - issue_events_len = len(issue_event_dicts) - pr_events_len = len(pr_event_dicts) - if event_len != (issue_events_len + pr_events_len): - - unassigned_events = event_len - issue_events_len - pr_events_len - - logger.error(f"{task_name}: {event_len} events were processed, but {pr_events_len} pr events were found and related to a pr, and {issue_events_len} issue events were found and related to an issue. {not_mapable_event_count} events were not related to a pr or issue due to the api returning insufficient data. For some reason {unassigned_events} events were not able to be processed even when the api returned sufficient data. This is usually because pull requests or issues have not been collected, and the events are skipped because they cannot be related to a pr or issue") - - logger.info(f"{task_name}: Inserting {len(pr_event_dicts)} pr events and {len(issue_event_dicts)} issue events") - - # TODO: Could replace this with "id" but it isn't stored on the table for some reason - pr_event_natural_keys = ["node_id"] - bulk_insert_dicts(logger, pr_event_dicts, PullRequestEvent, pr_event_natural_keys) - - issue_event_natural_keys = ["issue_id", "issue_event_src_id"] - bulk_insert_dicts(logger, issue_event_dicts, IssueEvent, issue_event_natural_keys) - - update_issue_closed_cntrbs_by_repo_id(repo_id) - -# TODO: Should we skip an event if there is no contributor to resolve it o -def process_github_event_contributors(logger, event, tool_source, tool_version, data_source): - - if event["actor"]: - - event_cntrb = extract_needed_contributor_data(event["actor"], tool_source, tool_version, data_source) - event["cntrb_id"] = event_cntrb["cntrb_id"] - - else: - event["cntrb_id"] = None - return event, None - - return event, event_cntrb - -import abc class NotMappableException(Exception): pass -class GithubEventCollection(abc.ABC): +class GithubEventCollection(ABC): def __init__(self, logger): - self.logger = logger - self.tool_source = "Github events task" - self.tool_version = "2.0" - self.data_source = "Github API" + self._logger = logger + self._tool_source = "Github events task" + self._tool_version = "2.0" + self._data_source = "Github API" - def insert_issue_events(self, events): + @abstractmethod + def collect(self, repo_git, key_auth): + pass + + def _insert_issue_events(self, events): issue_event_natural_keys = ["issue_id", "issue_event_src_id"] - bulk_insert_dicts(self.logger, events, IssueEvent, issue_event_natural_keys) + bulk_insert_dicts(self._logger, events, IssueEvent, issue_event_natural_keys) - def insert_pr_events(self, events): + def _insert_pr_events(self, events): pr_event_natural_keys = ["node_id"] - bulk_insert_dicts(self.logger, events, PullRequestEvent, pr_event_natural_keys) + bulk_insert_dicts(self._logger, events, PullRequestEvent, pr_event_natural_keys) - def insert_contributors(self, contributors): - bulk_insert_dicts(self.logger, contributors, Contributor, ["cntrb_id"]) + def _insert_contributors(self, contributors): + bulk_insert_dicts(self._logger, contributors, Contributor, ["cntrb_id"]) - def process_github_event_contributors(self, event): + def _process_github_event_contributors(self, event): if event["actor"]: - event_cntrb = extract_needed_contributor_data(event["actor"], self.tool_source, self.tool_version, self.data_source) + event_cntrb = extract_needed_contributor_data(event["actor"], self._tool_source, self._tool_version, self._data_source) event["cntrb_id"] = event_cntrb["cntrb_id"] else: @@ -252,7 +87,6 @@ def process_github_event_contributors(self, event): return event, event_cntrb - class BulkGithubEventCollection(GithubEventCollection): def __init__(self, logger): @@ -271,7 +105,7 @@ def collect(self, repo_git, key_auth): self.repo_identifier = f"{owner}/{repo}" events = [] - for event in self.collect_events(repo_git, key_auth): + for event in self._collect_events(repo_git, key_auth): events.append(event) # making this a decent size since process_events retrieves all the issues and prs each time @@ -280,21 +114,19 @@ def collect(self, repo_git, key_auth): events.clear() if events: - self.process_events(events, repo_id) + self._process_events(events, repo_id) - def collect_events(self, repo_git: str, key_auth): + def _collect_events(self, repo_git: str, key_auth): owner, repo = get_owner_repo(repo_git) - self.logger.debug(f"Collecting Github events for {owner}/{repo}") - url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" - github_data_access = GithubDataAccess(key_auth, self.logger) + github_data_access = GithubDataAccess(key_auth, self._logger) return github_data_access.paginate_resource(url) - def process_events(self, events, repo_id): + def _process_events(self, events, repo_id): issue_events = [] pr_events = [] @@ -302,42 +134,42 @@ def process_events(self, events, repo_id): for event in events: try: - if self.__is_pr_event(event): + if self._is_pr_event(event): pr_events.append(event) else: issue_events.append(event) except NotMappableException: not_mappable_events.append(event) - self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Unable to map these github events to an issue or pr: {not_mappable_events}") + self._logger.warning(f"{self.repo_identifier} - {self.task_name}: Unable to map these github events to an issue or pr: {not_mappable_events}") - self.__process_issue_events(issue_events, repo_id) - self.__process_pr_events(pr_events, repo_id) + self._process_issue_events(issue_events, repo_id) + self._process_pr_events(pr_events, repo_id) update_issue_closed_cntrbs_by_repo_id(repo_id) - def __process_issue_events(self, issue_events, repo_id): + def _process_issue_events(self, issue_events, repo_id): issue_event_dicts = [] contributors = [] - issue_url_to_id_map = self.__get_map_from_issue_url_to_id(repo_id) + issue_url_to_id_map = self._get_map_from_issue_url_to_id(repo_id) for event in issue_events: - event, contributor = self.process_github_event_contributors(event) + event, contributor = self._process_github_event_contributors(event) issue_url = event["issue"]["url"] try: issue_id = issue_url_to_id_map[issue_url] except KeyError: - self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related issue. We were searching for: {issue_url}") + self._logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related issue. We were searching for: {issue_url}") continue issue_event_dicts.append( extract_issue_event_data(event, issue_id, platform_id, repo_id, - self.tool_source, self.tool_version, self.data_source) + self._tool_source, self._tool_version, self._data_source) ) if contributor: @@ -345,32 +177,32 @@ def __process_issue_events(self, issue_events, repo_id): contributors = remove_duplicate_dicts(contributors) - self.insert_contributors(contributors) + self._insert_contributors(contributors) - self.insert_issue_events(issue_event_dicts) + self._insert_issue_events(issue_event_dicts) - def __process_pr_events(self, pr_events, repo_id): + def _process_pr_events(self, pr_events, repo_id): pr_event_dicts = [] contributors = [] - pr_url_to_id_map = self.__get_map_from_pr_url_to_id(repo_id) + pr_url_to_id_map = self._get_map_from_pr_url_to_id(repo_id) for event in pr_events: - event, contributor = self.process_github_event_contributors(event) + event, contributor = self._process_github_event_contributors(event) pr_url = event["issue"]["pull_request"]["url"] try: pull_request_id = pr_url_to_id_map[pr_url] except KeyError: - self.logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related pr. We were searching for: {pr_url}") + self._logger.warning(f"{self.repo_identifier} - {self.task_name}: Could not find related pr. We were searching for: {pr_url}") continue pr_event_dicts.append( extract_pr_event_data(event, pull_request_id, int(event['issue']["id"]), platform_id, repo_id, - self.tool_source, self.tool_version, self.data_source) + self._tool_source, self._tool_version, self._data_source) ) if contributor: @@ -378,11 +210,11 @@ def __process_pr_events(self, pr_events, repo_id): contributors = remove_duplicate_dicts(contributors) - self.insert_contributors(contributors) + self._insert_contributors(contributors) - self.insert_pr_events(pr_event_dicts) + self._insert_pr_events(pr_event_dicts) - def __get_map_from_pr_url_to_id(self, repo_id): + def _get_map_from_pr_url_to_id(self, repo_id): pr_url_to_id_map = {} prs = get_pull_requests_by_repo_id(repo_id) @@ -391,7 +223,7 @@ def __get_map_from_pr_url_to_id(self, repo_id): return pr_url_to_id_map - def __get_map_from_issue_url_to_id(self, repo_id): + def _get_map_from_issue_url_to_id(self, repo_id): issue_url_to_id_map = {} issues = get_issues_by_repo_id(repo_id) @@ -400,20 +232,19 @@ def __get_map_from_issue_url_to_id(self, repo_id): return issue_url_to_id_map - def __is_pr_event(self, event): + def _is_pr_event(self, event): if event["issue"] is None: raise NotMappableException("Not mappable to pr or issue") return event["issue"].get('pull_request', None) != None - class ThoroughGithubEventCollection(GithubEventCollection): def __init__(self, logger): super().__init__(logger) - def run(self, repo_git, key_auth): + def collect(self, repo_git, key_auth): repo_obj = get_repo_by_repo_git(repo_git) repo_id = repo_obj.repo_id @@ -424,10 +255,7 @@ def run(self, repo_git, key_auth): self.collect_issue_events(owner, repo, repo_id, key_auth) self.collect_pr_events(owner, repo, repo_id, key_auth) - def collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): - - # define logger for task - self.logger.debug(f"Collecting github events for {owner}/{repo}") + def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): engine = get_engine() @@ -442,7 +270,7 @@ def collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): events = [] contributors = [] - github_data_access = GithubDataAccess(key_auth, self.logger) + github_data_access = GithubDataAccess(key_auth, self._logger) for db_issue in issue_result: issue = dict(db_issue) @@ -452,30 +280,27 @@ def collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): for event in github_data_access.paginate_resource(event_url): - event, contributor = self.process_github_event_contributors(event) + event, contributor = self._process_github_event_contributors(event) contributors.append(contributor) events.append( extract_issue_event_data(event, issue["issue_id"], platform_id, repo_id, - self.tool_source, self.tool_version, self.data_source) + self._tool_source, self._tool_version, self._data_source) ) if len(events) > 500: - self.insert_contributors(contributors) - self.insert_issue_events(events) + self._insert_contributors(contributors) + self._insert_issue_events(events) events.clear() if events: - self.insert_contributors(contributors) - self.insert_issue_events(events) + self._insert_contributors(contributors) + self._insert_issue_events(events) events.clear() - def collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): - - # define logger for task - self.logger.debug(f"Collecting github events for {owner}/{repo}") + def _collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): engine = get_engine() @@ -489,7 +314,7 @@ def collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): events = [] contributors = [] - github_data_access = GithubDataAccess(key_auth, self.logger) + github_data_access = GithubDataAccess(key_auth, self._logger) for db_pr in pr_result: pr = dict(db_pr) @@ -499,21 +324,21 @@ def collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): for event in github_data_access.paginate_resource(event_url): - event, contributor = self.process_github_event_contributors(event) + event, contributor = self._process_github_event_contributors(event) contributors.append(contributor) events.append( extract_pr_event_data(event, pr["pull_request_id"], pr["pr_src_id"] , platform_id, repo_id, - self.tool_source, self.tool_version, self.data_source) + self._tool_source, self._tool_version, self._data_source) ) if len(events) > 500: - self.insert_contributors(contributors) - self.insert_pr_events(events) + self._insert_contributors(contributors) + self._insert_pr_events(events) events.clear() if events: - self.insert_contributors(contributors) - self.insert_pr_events(events) + self._insert_contributors(contributors) + self._insert_pr_events(events) events.clear() From a3169b06699e7868f3e4e02767ceb7e905d15122 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 26 Aug 2024 17:22:29 -0500 Subject: [PATCH 059/176] pass params --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index f620d23ec9..4f142e4806 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -33,7 +33,7 @@ def collect_events(repo_git: str): else: collection_strategy = ThoroughGithubEventCollection(logger) - collection_strategy.collect() + collection_strategy.collect(repo_git, key_auth) def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): From d7c093ac5fdc5666ccea0e2458f2bcfb3f22d4ec Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 26 Aug 2024 17:32:25 -0500 Subject: [PATCH 060/176] call correct method name --- augur/tasks/github/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 4f142e4806..91cf7df32a 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -252,8 +252,8 @@ def collect(self, repo_git, key_auth): owner, repo = get_owner_repo(repo_git) self.repo_identifier = f"{owner}/{repo}" - self.collect_issue_events(owner, repo, repo_id, key_auth) - self.collect_pr_events(owner, repo, repo_id, key_auth) + self._collect_issue_events(owner, repo, repo_id, key_auth) + self._collect_pr_events(owner, repo, repo_id, key_auth) def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): From 36ad632c201105bfd96ae9a20193c53761de8df1 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 26 Aug 2024 17:42:43 -0500 Subject: [PATCH 061/176] other syntax fixes --- augur/tasks/github/events.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 91cf7df32a..67d770018d 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -110,7 +110,7 @@ def collect(self, repo_git, key_auth): # making this a decent size since process_events retrieves all the issues and prs each time if len(events) >= 500: - self.process_events(events, repo_id) + self._process_events(events, repo_id) events.clear() if events: @@ -252,8 +252,8 @@ def collect(self, repo_git, key_auth): owner, repo = get_owner_repo(repo_git) self.repo_identifier = f"{owner}/{repo}" - self._collect_issue_events(owner, repo, repo_id, key_auth) - self._collect_pr_events(owner, repo, repo_id, key_auth) + self._collect_and_process_issue_events(owner, repo, repo_id, key_auth) + self._collect_and_process_pr_events(owner, repo, repo_id, key_auth) def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): @@ -272,7 +272,7 @@ def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): contributors = [] github_data_access = GithubDataAccess(key_auth, self._logger) for db_issue in issue_result: - issue = dict(db_issue) + issue = db_issue._asdict() issue_number = issue["issue_number"] @@ -316,7 +316,7 @@ def _collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): contributors = [] github_data_access = GithubDataAccess(key_auth, self._logger) for db_pr in pr_result: - pr = dict(db_pr) + pr = db_pr._asdict() pr_number = pr["gh_pr_number"] From 347a2e22c3209fcae6a59c6b2ab97d825d200abe Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 26 Aug 2024 17:48:05 -0500 Subject: [PATCH 062/176] only log not mappable events when there are some --- augur/tasks/github/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 67d770018d..6bfb5a952f 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -141,7 +141,8 @@ def _process_events(self, events, repo_id): except NotMappableException: not_mappable_events.append(event) - self._logger.warning(f"{self.repo_identifier} - {self.task_name}: Unable to map these github events to an issue or pr: {not_mappable_events}") + if not_mappable_events: + self._logger.warning(f"{self.repo_identifier} - {self.task_name}: Unable to map these github events to an issue or pr: {not_mappable_events}") self._process_issue_events(issue_events, repo_id) self._process_pr_events(pr_events, repo_id) From b45b37f42abfaaa5e5d502cb2fb808dd9fbf869f Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 26 Aug 2024 17:54:02 -0500 Subject: [PATCH 063/176] only add non null contributors --- augur/tasks/github/events.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 6bfb5a952f..925a882098 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -283,7 +283,8 @@ def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): event, contributor = self._process_github_event_contributors(event) - contributors.append(contributor) + if contributor: + contributors.append(contributor) events.append( extract_issue_event_data(event, issue["issue_id"], platform_id, repo_id, @@ -327,7 +328,8 @@ def _collect_and_process_pr_events(self, owner, repo, repo_id, key_auth): event, contributor = self._process_github_event_contributors(event) - contributors.append(contributor) + if contributor: + contributors.append(contributor) events.append( extract_pr_event_data(event, pr["pull_request_id"], pr["pr_src_id"] , platform_id, repo_id, From 2b5ce1aca7f83d4b17246a5ca5e9dc5b60e2e3a5 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 27 Aug 2024 17:56:25 -0500 Subject: [PATCH 064/176] fix: add url not found catching --- augur/tasks/github/events.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 70115145e1..00789a3423 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -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 * -from augur.tasks.github.util.github_data_access import GithubDataAccess +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.tasks.github.util.util import get_owner_repo from augur.tasks.util.worker_util import remove_duplicate_dicts @@ -280,17 +280,20 @@ def _collect_and_process_issue_events(self, owner, repo, repo_id, key_auth): event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/events" - for event in github_data_access.paginate_resource(event_url): + try: + for event in github_data_access.paginate_resource(event_url): - event, contributor = self._process_github_event_contributors(event) + event, contributor = self._process_github_event_contributors(event) - if contributor: - contributors.append(contributor) + if contributor: + contributors.append(contributor) - events.append( - extract_issue_event_data(event, issue["issue_id"], platform_id, repo_id, - self._tool_source, self._tool_version, self._data_source) - ) + events.append( + extract_issue_event_data(event, issue["issue_id"], platform_id, repo_id, + self._tool_source, self._tool_version, self._data_source) + ) + except UrlNotFoundException as e: + self._logger.warning(f"{self.repo_identifier}: Url not found for {event_url}") if len(events) > 500: self._insert_contributors(contributors) From 36ae56cec093471a68b9e68a6f1ed5dda7f2b3f1 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Sun, 14 Jul 2024 23:34:28 -0500 Subject: [PATCH 065/176] Pull relevant mods from admin-changes Signed-off-by: Ulincsys --- augur/application/cli/backend.py | 65 ++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/augur/application/cli/backend.py b/augur/application/cli/backend.py index 4a6df4d9d4..d3848cd4e6 100644 --- a/augur/application/cli/backend.py +++ b/augur/application/cli/backend.py @@ -47,8 +47,8 @@ def cli(ctx): @click.pass_context def start(ctx, disable_collection, development, pidfile, port): """Start Augur's backend server.""" - with open(pidfile, "w") as pidfile: - pidfile.write(str(os.getpid())) + with open(pidfile, "w") as pidfile_io: + pidfile_io.write(str(os.getpid())) try: if os.environ.get('AUGUR_DOCKER_DEPLOY') != "1": @@ -63,6 +63,8 @@ def start(ctx, disable_collection, development, pidfile, port): if development: os.environ["AUGUR_DEV"] = "1" logger.info("Starting in development mode") + + os.environ["AUGUR_PIDFILE"] = pidfile try: gunicorn_location = os.getcwd() + "/augur/api/gunicorn_conf.py" @@ -74,6 +76,11 @@ def start(ctx, disable_collection, development, pidfile, port): if not port: port = get_value("Server", "port") + os.environ["AUGUR_PORT"] = str(port) + + if disable_collection: + os.environ["AUGUR_DISABLE_COLLECTION"] = "1" + worker_vmem_cap = get_value("Celery", 'worker_process_vmem_cap') gunicorn_command = f"gunicorn -c {gunicorn_location} -b {host}:{port} augur.api.server:app --log-file gunicorn.log" @@ -128,7 +135,7 @@ def start(ctx, disable_collection, development, pidfile, port): augur_collection_monitor.si().apply_async() else: - logger.info("Collection disabled") + logger.info("Collection disabled") try: server.wait() @@ -153,6 +160,8 @@ def start(ctx, disable_collection, development, pidfile, port): cleanup_after_collection_halt(logger, ctx.obj.engine) except RedisConnectionError: pass + + os.unlink(pidfile) def start_celery_worker_processes(vmem_cap_ratio, disable_collection=False): @@ -224,6 +233,54 @@ def stop(ctx): augur_stop(signal.SIGTERM, logger, ctx.obj.engine) +@cli.command('stop-collection-blocking') +@test_connection +@test_db_connection +@with_database +@click.pass_context +def stop_collection(ctx): + """ + Stop collection tasks if they are running, block until complete + """ + processes = get_augur_processes() + + stopped = [] + + p: psutil.Process + for p in processes: + if p.name() == "celery": + stopped.append(p) + p.terminate() + + if not len(stopped): + logger.info("No collection processes found") + return + + _, alive = psutil.wait_procs(stopped, 5, + lambda p: logger.info(f"STOPPED: {p.pid}")) + + killed = [] + while True: + for i in range(len(alive)): + if alive[i].status() == psutil.STATUS_ZOMBIE: + logger.info(f"KILLING ZOMBIE: {alive[i].pid}") + alive[i].kill() + killed.append(i) + elif not alive[i].is_running(): + logger.info(f"STOPPED: {p.pid}") + killed.append(i) + + for i in reversed(killed): + alive.pop(i) + + if not len(alive): + break + + logger.info(f"Waiting on [{', '.join(str(p.pid for p in alive))}]") + time.sleep(0.5) + + cleanup_after_collection_halt(logger, ctx.obj.engine) + @cli.command('kill') @test_connection @test_db_connection @@ -388,7 +445,7 @@ def processes(): Outputs the name/PID of all Augur server & worker processes""" augur_processes = get_augur_processes() for process in augur_processes: - logger.info(f"Found process {process.pid}") + logger.info(f"Found process {process.pid} [{process.name()}] -> Parent: {process.parent().pid}") def get_augur_processes(): augur_processes = [] From f0e27a30fe7b09e0dfcf3b7e05b3436e0abd2824 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 15 Jul 2024 17:03:21 -0500 Subject: [PATCH 066/176] initial work on jumpstart project Signed-off-by: Ulincsys --- .gitignore | 1 + augur/application/cli/_multicommand.py | 1 - augur/application/cli/jumpstart.py | 61 ++++++++++++++ scripts/control/jumpstart.py | 108 +++++++++++++++++++++++++ 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 augur/application/cli/jumpstart.py create mode 100644 scripts/control/jumpstart.py diff --git a/.gitignore b/.gitignore index 8b8fb107ac..2c29307851 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ augur_export_env.sh config.yml reports.yml *.pid +*.sock node_modules/ .idea/ diff --git a/augur/application/cli/_multicommand.py b/augur/application/cli/_multicommand.py index 2a1bfd1c71..19392b2742 100644 --- a/augur/application/cli/_multicommand.py +++ b/augur/application/cli/_multicommand.py @@ -30,7 +30,6 @@ def get_command(self, ctx, name): # Check that the command exists before importing if not cmdfile.is_file(): - return # Prefer to raise exception instead of silcencing it diff --git a/augur/application/cli/jumpstart.py b/augur/application/cli/jumpstart.py new file mode 100644 index 0000000000..738ce444d6 --- /dev/null +++ b/augur/application/cli/jumpstart.py @@ -0,0 +1,61 @@ +import psutil +import click +import subprocess +from pathlib import Path +from datetime import datetime + +@click.group(invoke_without_command=True) +@click.pass_context +def cli(ctx): + if ctx.invoked_subcommand is None: + p = check_running() + if not p: + click.echo("Starting service") + launch(ctx) + else: + click.echo(f"Connecting to Jumpstart: [{p.pid}]") + +def check_running(pidfile = ".jumpstart.pid") -> psutil.Process: + jumpidf = Path(pidfile) + + try: + jumpid, create_time = jumpidf.read_text().splitlines() + jumpp = psutil.Process(int(jumpid)) + + if create_time != str(jumpp.create_time()): + # PID was reused, not the original + jumpidf.unlink() + return + + return jumpp + except (psutil.NoSuchProcess, FileNotFoundError): + return + except PermissionError: + click.echo(f"Permission denied while reading from or writing to pidfile [{str(jumpidf.resolve())}]") + +@cli.command("status") +def get_status(): + p = check_running() + + if not p: + click.echo("Jumpstart is not running") + else: + since = datetime.fromtimestamp(p.create_time()).astimezone() + delta = datetime.now().astimezone() - since + click.echo(f"Jumpstart is running at: [{p.pid}] since {since.strftime('%a %b %d, %Y %H:%M:%S %z:%Z')} [{delta}]") + +@cli.command("processID") +def get_main_ID(): + p = check_running() + + if p: + click.echo(p.pid) + +def launch(ctx, pidfile = ".jumpstart.pid"): + service = subprocess.Popen(f"python scripts/control/jumpstart.py pidfile={pidfile}".split()) + + # Popen object does not have create_time for some reason + ext_process = psutil.Process(service.pid) + + with open(pidfile, "w") as file: + file.write(f"{ext_process.pid}\n{ext_process.create_time()}") diff --git a/scripts/control/jumpstart.py b/scripts/control/jumpstart.py new file mode 100644 index 0000000000..92b7b342a7 --- /dev/null +++ b/scripts/control/jumpstart.py @@ -0,0 +1,108 @@ +import os +import sys +import time +import json +import socket +import signal +import logging +import threading +from pathlib import Path + +# Preemt globals declared later in scope +# Purely performative +globals().update({ + "console": None, + "clients": None, + "server": None +}) + +def init_logging(console = logging.Logger("jumpstart") , errlog_file = Path("logs/jumpstart.error"), stdout_file = Path("logs/jumpstart.log")) -> logging.Logger: + errlog = logging.FileHandler(errlog_file, "w") + stdout = logging.FileHandler(stdout_file, "w") + + formatter = logging.Formatter("[%(asctime)s] [%(name)s] [%(process)d]->[%(threadName)s] [%(levelname)s] %(message)s", "%Y-%m-%d %H:%M:%S %z") + + errlog.setLevel(logging.WARN) + stdout.setLevel(logging.INFO) + stdout.addFilter(lambda entry: entry.levelno < logging.WARN) + errlog.formatter = stdout.formatter = formatter + + console.addHandler(errlog) + console.addHandler(stdout) + console.setLevel(logging.INFO) + +def handle_terminate(*args): + console.info("shutting down") + + global server, socketfile, clients + + for client in clients: + client.close() + + server.close() + socketfile.unlink() + + exit(0) + +def input_loop(wake_lock: threading.Lock, server: socket.socket): + server.listen() + global clients + clients = [] + + while True: + conn, addr = server.accept() + console.info(f"Accepted client: {addr}") + clients.append(Client(conn, wake_lock, len(clients))) + + server.close() + +class Client: + def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int): + self.socket = sock + self.io = socket.SocketIO(sock, "rw") + self.lock = wake_lock + self.ID = ID + self.thread = threading.Thread(target=self.loop, args=[self]) + + def loop(self): + global console + + while line := self.io.readline().decode(): + console.info(f"Recieved message: {line}") + + console.info(f"Client disconnect: {self.ID}") + + def close(self): + self.io.close() + +if __name__ == "__main__": + global console + console = init_logging() + + global socketfile + socketfile = Path("jumpstart.sock").resolve() + + try: + socketfile.unlink(True) + except: + console.critical(f"socket in use: {socketfile}") + exit(1) + + global server + server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + server.bind(str(socketfile)) + + signal.signal(signal.SIGTERM, handle_terminate) + signal.signal(signal.SIGINT, handle_terminate) + threading.current_thread().setName("main") + input_lock = threading.Lock() + + loop = threading.Thread(target=input_loop, args=[input_lock, server]) + loop.setName("console") + loop.start() + + while True: + if input_lock.acquire(True, 1): + # The input thread has notified us of a new message + pass + \ No newline at end of file From 709e7711d17c7db7ba91ffd8a9f8dd1c0b752437 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 15 Jul 2024 17:16:52 -0500 Subject: [PATCH 067/176] Implement decoding and blocking Signed-off-by: Ulincsys --- scripts/control/jumpstart.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/control/jumpstart.py b/scripts/control/jumpstart.py index 92b7b342a7..13e69489a3 100644 --- a/scripts/control/jumpstart.py +++ b/scripts/control/jumpstart.py @@ -11,6 +11,7 @@ # Preemt globals declared later in scope # Purely performative globals().update({ + "messages": None, "console": None, "clients": None, "server": None @@ -31,7 +32,7 @@ def init_logging(console = logging.Logger("jumpstart") , errlog_file = Path("log console.addHandler(stdout) console.setLevel(logging.INFO) -def handle_terminate(*args): +def handle_terminate(*args, **kwargs): console.info("shutting down") global server, socketfile, clients @@ -46,8 +47,9 @@ def handle_terminate(*args): def input_loop(wake_lock: threading.Lock, server: socket.socket): server.listen() - global clients + global clients, messages clients = [] + messages = [] while True: conn, addr = server.accept() @@ -59,6 +61,7 @@ def input_loop(wake_lock: threading.Lock, server: socket.socket): class Client: def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int): self.socket = sock + sock.setblocking(True) self.io = socket.SocketIO(sock, "rw") self.lock = wake_lock self.ID = ID @@ -69,6 +72,14 @@ def loop(self): while line := self.io.readline().decode(): console.info(f"Recieved message: {line}") + + try: + body = json.loads(line) + except json.JSONDecodeError: + self.io.write(json.dumps({ + "status": "E", + "detail": "Invalid JSON" + }) + "\n") console.info(f"Client disconnect: {self.ID}") @@ -91,6 +102,7 @@ def close(self): global server server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) server.bind(str(socketfile)) + server.setblocking(True) signal.signal(signal.SIGTERM, handle_terminate) signal.signal(signal.SIGINT, handle_terminate) @@ -105,4 +117,5 @@ def close(self): if input_lock.acquire(True, 1): # The input thread has notified us of a new message pass - \ No newline at end of file + else: + pass \ No newline at end of file From d7c6a87dd93bf07db85dd50ebef1f12c5d3f57ac Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 22 Jul 2024 17:30:22 -0500 Subject: [PATCH 068/176] add TUI, expand server basis Signed-off-by: Ulincsys --- augur/application/cli/jumpstart.py | 35 ++++- jumpstart/API.py | 170 +++++++++++++++++++++ jumpstart/Client.py | 55 +++++++ jumpstart/Logging.py | 25 ++++ jumpstart/Server.py | 56 +++++++ jumpstart/jumpstart.py | 37 +++++ jumpstart/tui.py | 233 +++++++++++++++++++++++++++++ jumpstart/tui.tcss | 20 +++ jumpstart/utils.py | 10 ++ scripts/control/jumpstart.py | 121 --------------- setup.py | 1 + 11 files changed, 637 insertions(+), 126 deletions(-) create mode 100644 jumpstart/API.py create mode 100644 jumpstart/Client.py create mode 100644 jumpstart/Logging.py create mode 100644 jumpstart/Server.py create mode 100644 jumpstart/jumpstart.py create mode 100644 jumpstart/tui.py create mode 100644 jumpstart/tui.tcss create mode 100644 jumpstart/utils.py delete mode 100644 scripts/control/jumpstart.py diff --git a/augur/application/cli/jumpstart.py b/augur/application/cli/jumpstart.py index 738ce444d6..3c02ddc8af 100644 --- a/augur/application/cli/jumpstart.py +++ b/augur/application/cli/jumpstart.py @@ -1,5 +1,6 @@ import psutil import click +import time import subprocess from pathlib import Path from datetime import datetime @@ -11,10 +12,20 @@ def cli(ctx): p = check_running() if not p: click.echo("Starting service") - launch(ctx) - else: - click.echo(f"Connecting to Jumpstart: [{p.pid}]") + p = launch(ctx) + click.echo(f"Connecting to Jumpstart: [{p.pid}]") + + while p.is_running() and not len(p.connections("unix")): + # Waiting for app to open fd socket + time.sleep(0.1) + + if not p.is_running(): + click.echo("Error: Jumpstart server exited abnormally") + + from jumpstart.tui import run_app + run_app(ctx=ctx) + def check_running(pidfile = ".jumpstart.pid") -> psutil.Process: jumpidf = Path(pidfile) @@ -51,11 +62,25 @@ def get_main_ID(): if p: click.echo(p.pid) -def launch(ctx, pidfile = ".jumpstart.pid"): - service = subprocess.Popen(f"python scripts/control/jumpstart.py pidfile={pidfile}".split()) +@cli.command("shutdown") +def shutdown_server(): + p = check_running() + + if not p: + click.echo("Jumpstart is not running") + return + + click.echo("Blocking on shutdown") + p.terminate() + p.wait() + +def launch(ctx, pidfile = ".jumpstart.pid", socketfile = "jumpstart.sock"): + service = subprocess.Popen(f"python -m jumpstart.jumpstart pidfile={pidfile} socketfile={socketfile}".split()) # Popen object does not have create_time for some reason ext_process = psutil.Process(service.pid) with open(pidfile, "w") as file: file.write(f"{ext_process.pid}\n{ext_process.create_time()}") + + return ext_process diff --git a/jumpstart/API.py b/jumpstart/API.py new file mode 100644 index 0000000000..67de435fc9 --- /dev/null +++ b/jumpstart/API.py @@ -0,0 +1,170 @@ +spec = { + "commands": [ + { + "name": "status", + "desc": "Display the current status of Augur processes", + "args": [] + }, { + "name": "start", + "desc": "Start one or more components of Augur", + "args": [ + { + "name": "component", + "required": True, + "type": "enum", + "values": [ + "all", "frontend", "api", "collection" + ] + }, { + "name": "options", + "required": False, + "type": "list" + } + ] + }, { + "name": "stop", + "desc": "Stop one or more components of Augur", + "args": [ + { + "name": "component", + "required": True, + "type": "enum", + "values": [ + "all", "frontend", "api", "collection" + ] + } + ] + }, { + "name": "restart", + "desc": "restart one or more components of Augur", + "args": [ + { + "name": "component", + "required": True, + "type": "enum", + "values": [ + "all", "frontend", "api", "collection" + ] + } + ] + }, { + "name": "shutdown", + "desc": "Stop all Augur components and shut down Jumpstart", + "args": [] + } + ], + "statuses": [ + { + "ID": "E", + "desc": "An error occurred", + "fields": [ + { + "key": "detail", + "desc": "A detail message about the error", + "required": True + } + ] + }, { + "ID": "T", + "desc": "Connection terminated", + "fields": [ + { + "key": "reason", + "desc": "A message describing the reason for disconnection", + "required": False + } + ] + }, { + "ID": "I", + "desc": "Information from server", + "fields": [ + { + "key": "detail", + "desc": "An informational message from the jumpstart server", + "required": True + } + ] + }, { + "ID": "S", + "desc": "Status of Augur components", + "fields": [ + { + "key": "frontend", + "desc": "The frontend status", + "required": True + }, { + "key": "api", + "desc": "The API status", + "required": True + }, { + "key": "collection", + "desc": "The collection status", + "required": True + } + ] + } + ] +} + +from enum import Enum, auto + +class Status(Enum): + error="E" + terminated="T" + information="I" + status="S" + + @classmethod + def __call__(self, msg = None): + if self == Status.error: + return { + "status": self.value, + "detail": msg or "unspecified" + } + elif self == Status.success: + return { + "status": self.value + } + elif self == Status.terminated: + if not msg: + return { + "status": self.value + } + else: + return { + "status": self.value, + "reason": msg + } + elif self == Status.information: + return { + "status": self.value, + "detail": msg or "ack" + } + elif self == Status.status: + return { + "status": self.value, + "frontend": None, + "api": None, + "collection": None + } + +class Command(Enum): + status=auto() + start=auto() + stop=auto() + restart=auto() + shutdown=auto() + unknown=auto() + + @staticmethod + def of(msg: dict): + if msg["name"] == "status": + msg.pop("name") + return Command.status(msg) + + @classmethod + def __call__(self, args): + self.args = args + return self + +Component = Enum("Component", ["all", "frontend", "api", "collection"]) \ No newline at end of file diff --git a/jumpstart/Client.py b/jumpstart/Client.py new file mode 100644 index 0000000000..ee4ea078d5 --- /dev/null +++ b/jumpstart/Client.py @@ -0,0 +1,55 @@ +import json +import socket +import threading + +from .Logging import console +from .utils import synchronized +from .API import spec, Status, Command + +class JumpstartClient: + def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int, destroy_callback): + self.socket = sock + self.io = socket.SocketIO(sock, "rw") + self.lock = wake_lock + self.ID = ID + self.respond(spec) + self.thread = threading.Thread(target=self.loop, args=[destroy_callback], name=f"client_{ID}") + self.thread.start() + + def loop(self, callback): + while line := self.io.readline().decode(): + console.info(f"Recieved message: {line}") + + try: + body = json.loads(line) + console.info(body) + except json.JSONDecodeError: + self.send(Status.error("Invalid JSON")) + + console.info(f"Client disconnect") + callback(self) + + @synchronized + def send(self, *args, **kwargs): + if args and kwargs: + kwargs["args"] = args + + if self.io.closed: + return + + self.io.write((json.dumps(kwargs) + "\n").encode()) + self.io.flush() + + @synchronized + def respond(self, msg: Status): + if self.io.closed: + return + + self.io.write((json.dumps(msg) + "\n").encode()) + self.io.flush() + + @synchronized + def close(self, **kwargs): + self.send(status="T", **kwargs) + self.io.close() + self.thread.join() diff --git a/jumpstart/Logging.py b/jumpstart/Logging.py new file mode 100644 index 0000000000..574a6b52f7 --- /dev/null +++ b/jumpstart/Logging.py @@ -0,0 +1,25 @@ +import logging +from pathlib import Path + +def init_logging(logger = logging.Logger("jumpstart") , errlog_file = Path("logs/jumpstart.error"), stdout_file = Path("logs/jumpstart.log")) -> logging.Logger: + errlog = logging.FileHandler(errlog_file, "w") + stdout = logging.FileHandler(stdout_file, "w") + + formatter = logging.Formatter("[%(asctime)s] [%(name)s] [%(process)d]->[%(threadName)s] [%(levelname)s] %(message)s", "%Y-%m-%d %H:%M:%S %z") + + errlog.setLevel(logging.WARN) + stdout.setLevel(logging.INFO) + stdout.addFilter(lambda entry: entry.levelno < logging.WARN) + errlog.formatter = stdout.formatter = formatter + + logger.addHandler(errlog) + logger.addHandler(stdout) + logger.setLevel(logging.INFO) + + global console + console = logger + + return logger + +if "console" not in globals(): + init_logging() diff --git a/jumpstart/Server.py b/jumpstart/Server.py new file mode 100644 index 0000000000..63261c77d5 --- /dev/null +++ b/jumpstart/Server.py @@ -0,0 +1,56 @@ +import socket +import threading +from pathlib import Path + +from .Logging import console +from .utils import synchronized +from .Client import JumpstartClient as Client + +class JumpstartServer: + def __init__(self, socketfile = Path("jumpstart.sock").resolve(), input_lock = threading.Lock()): + try: + socketfile.unlink(True) + except: + console.critical(f"socket in use: {socketfile}") + exit(1) + + self.socketfile = socketfile + self.server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + self.server.bind(str(socketfile)) + self.server.setblocking(True) + self.lock = input_lock + + self.clients: list[Client] = [] + self.messages = [] + + self.loop = threading.Thread(target=self.accept_loop, name="console") + + def accept_loop(self): + self.server.listen() + + try: + while request := self.server.accept(): + conn, addr = request + console.info(f"Accepted client: {len(self.clients)}") + self.clients.append(Client(conn, self.lock, len(self.clients), destroy_callback = self._remove_client)) + except OSError: + # OSError is thrown when the socket is closed while blocking on accept + console.info("Server no longer accepting connections") + except Exception as e: + console.error("An exception occurred during accept") + console.error(str(e)) + + @synchronized + def _remove_client(self, client): + self.clients.remove(client) + + def start(self): + self.loop.start() + + def close(self): + self.server.shutdown(socket.SHUT_RDWR) + self.server.close() + self.socketfile.unlink() + + for client in self.clients: + client.close(reason="Server shutting down") diff --git a/jumpstart/jumpstart.py b/jumpstart/jumpstart.py new file mode 100644 index 0000000000..a67ec2efd1 --- /dev/null +++ b/jumpstart/jumpstart.py @@ -0,0 +1,37 @@ +import os +import sys +import time +import json +import socket +import signal +import logging +import threading +from pathlib import Path + +from .Logging import console +from .Server import JumpstartServer + +global server + +def handle_terminate(*args, **kwargs): + console.info("shutting down") + + server.close() + + exit(0) + +if __name__ == "__main__": + signal.signal(signal.SIGTERM, handle_terminate) + signal.signal(signal.SIGINT, handle_terminate) + threading.current_thread().setName("main") + + server = JumpstartServer() + server.start() + + while True: + if server.lock.acquire(True, 0.1): + # The input thread has notified us of a new message + server.lock.release() + pass + else: + time.sleep(0.1) diff --git a/jumpstart/tui.py b/jumpstart/tui.py new file mode 100644 index 0000000000..02e03a4906 --- /dev/null +++ b/jumpstart/tui.py @@ -0,0 +1,233 @@ +import socket as sockets +from socket import socket + +import json +import logging +from sys import argv +from pathlib import Path +from datetime import datetime + +from textual import work +from textual.app import App, on +from textual.binding import Binding +from textual.events import Load, Mount +from textual.widgets import RichLog, Input, Button +from textual.containers import Horizontal, Vertical + +class JumpstartTUI(App): + CSS_PATH = "tui.tcss" + + BINDINGS = [ + Binding("ctrl+d", "kb_exit", "Exit", priority=True) + ] + + def action_kb_exit(self, force = False): + inbox = self.query(Input).only_one() + value = inbox.value + + if not value or force: + self.app.exit() + + def exit_dirty(self): + inbox = self.query(Input).only_one() + inbox.value = "" + inbox.disabled = True + + self.error("Use CTRL+D or CTRL+C to exit") + + def error(self, msg): + self.out("ERROR", msg) + + def info(self, msg): + self.out("INFO", msg) + + def out(self, level, msg, source = "console"): + time_str = datetime.now().astimezone().strftime("%Y-%m-%d %H:%M:%S %z") + formatted = "[{}] [{}] [{}] {}".format(time_str, source, level, msg) + self.raw(formatted) + + def raw(self, obj, disable_highlighting = False, enable_markup = False): + stdout = self.query_one(RichLog) + if disable_highlighting: + stdout.highlight = False + if enable_markup: + stdout.markup = True + stdout.write(obj) + if disable_highlighting: + stdout.highlight = True + if enable_markup: + stdout.markup = False + + @on(Mount) + async def startup_process_tasks(self): + inbox = self.query(Input).only_one() + inbox.focus() + + self.server_rec() + + @on(Button.Pressed, "#exitbtn") + def handle_btn_exit(self): + self.action_kb_exit(True) + + @on(Input.Submitted) + def accept_input(self): + inbox = self.query(Input).only_one() + value = inbox.value + + if value == "exit": + self.action_kb_exit(True) + + self.out("INFO", value, "user") + inbox.value = "" + + args = value.split() + + if args[0] == "help": + self.show_help(*args[1:]) + + def send(self, **kwargs): + self.server_IO.write(json.dumps(kwargs) + "\n") + self.server_IO.flush() + + @on(Button.Pressed, "#statusbtn") + def get_status(self): + self.send({ + "name": "status" + }) + + def show_help(self, command = None, *args): + if not command: + self.raw(self.help_str, True, True) + else: + self.info("Granular help not yet available") + + @work(name="server", thread=True) + def server_rec(self): + stdout = self.query_one(RichLog) + + def log(obj): + self.call_from_thread(stdout.write, obj) + + def info(msg, source = "server"): + time_str = datetime.now().astimezone().strftime("%Y-%m-%d %H:%M:%S %z") + formatted = "[{}] [{}] [INFO] {}".format(time_str, source, msg) + log(formatted) + + def error(msg, source = "server"): + time_str = datetime.now().astimezone().strftime("%Y-%m-%d %H:%M:%S %z") + formatted = "[{}] [{}] [ERROR] {}".format(time_str, source, msg) + log(formatted) + + self.server = socket(sockets.AF_UNIX, sockets.SOCK_STREAM) + try: + self.server.connect(self.socket_file) + self.server.setblocking(True) + io = sockets.SocketIO(self.server, "rw") + self.server_IO = io + except Exception as e: + error(f"Could not connect to the jumpstart server [{self.socket_file}]") + log(e) + self.call_from_thread(self.exit_dirty) + return + + # Jumpstart sends the spec as a dict on connection + try: + import time + init = io.readline() + self.spec = json.loads(init) + except json.JSONDecodeError as e: + error("Could not decode handshake", "console") + log(e) + self.call_from_thread(self.exit_dirty) + return + + info("Connected") + + help_str = "Command Reference:\n" + + for command in self.spec["commands"]: + help_str += f'\t> [bold yellow]{command["name"]}' + for arg in command["args"]: + if arg["required"]: + arg_str = f' {arg["name"]} {{}}' + else: + arg_str = f' \\[{arg["name"]} {{}}]' + + if arg["type"] == "enum": + help_str += arg_str.format(f'<{", ".join(arg["values"])}>') + elif arg["type"] == "list": + help_str += arg_str.format("...") + help_str += "[/bold yellow]\n" + help_str += f'\t\t [green]{command["desc"]}[/green]\n' + + self.help_str = help_str + + while not io.closed: + line = io.readline() + + try: + msg = json.loads(line) + if msg["ID"] == "E": + error(msg["detail"]) + elif msg["ID"] == "T": + info("Connection closed: " + msg.get("reason") or "Reason unspecified") + self.call_from_thread(self.exit_dirty) + return + elif msg["ID"] == "I": + info(msg["detail"]) + elif msg["ID"] == "S": + ... + except json.JSONDecodeError: + error("Bad packet from server", "console") + log(line) + except Exception: + error("Exception while reacting to incoming packet", "console") + log(msg) + + def compose(self): + with Horizontal(): + with Vertical(classes="sidebar"): + yield Button("Status") + yield Button("Exit", variant="error", id="exitbtn") + + with Vertical(): + yield RichLog( + highlight=True, + auto_scroll=True, + wrap=True, + id="stdout" + ) + yield Input( + placeholder="Enter Command", + id="command_line", + valid_empty=False + ) + +def run_app(socket_file = Path("jumpstart.sock"), ctx = None): + app = JumpstartTUI() + + if not socket_file.exists(): + raise ValueError(f"Socket file {str(socket_file.resolve())} does not exist") + + app.socket_file = str(socket_file) + app.run() + + if ctx: + import click + click.echo("Exited application") + + if app.server_IO: + app.server.shutdown(sockets.SHUT_RDWR) + app.server_IO.close() + app.server.close() + + # Clean up any residual threads + app.workers.cancel_all() + +if __name__ == "__main__": + socket_file = Path("jumpstart.sock") + for arg in argv: + if arg.startswith("socketfile="): + socket_file = Path(arg.split("=", 1)[1]) + + run_app(socket_file) diff --git a/jumpstart/tui.tcss b/jumpstart/tui.tcss new file mode 100644 index 0000000000..8625236c30 --- /dev/null +++ b/jumpstart/tui.tcss @@ -0,0 +1,20 @@ +#stdout { + dock: top; + width: 100% +} + +#command_line { + dock: bottom; +} + +.sidebar { + width: auto; + margin: 1; + padding: 1; + background: $boost; + height: 100%; +} + +#exitbtn { + dock: bottom; +} diff --git a/jumpstart/utils.py b/jumpstart/utils.py new file mode 100644 index 0000000000..ec084c1600 --- /dev/null +++ b/jumpstart/utils.py @@ -0,0 +1,10 @@ +from functools import wraps +from threading import Lock + +def synchronized(func): + lock = Lock() + @wraps(func) + def call_sync(*args, **kwargs): + with lock: + return func(*args, **kwargs) + return call_sync \ No newline at end of file diff --git a/scripts/control/jumpstart.py b/scripts/control/jumpstart.py deleted file mode 100644 index 13e69489a3..0000000000 --- a/scripts/control/jumpstart.py +++ /dev/null @@ -1,121 +0,0 @@ -import os -import sys -import time -import json -import socket -import signal -import logging -import threading -from pathlib import Path - -# Preemt globals declared later in scope -# Purely performative -globals().update({ - "messages": None, - "console": None, - "clients": None, - "server": None -}) - -def init_logging(console = logging.Logger("jumpstart") , errlog_file = Path("logs/jumpstart.error"), stdout_file = Path("logs/jumpstart.log")) -> logging.Logger: - errlog = logging.FileHandler(errlog_file, "w") - stdout = logging.FileHandler(stdout_file, "w") - - formatter = logging.Formatter("[%(asctime)s] [%(name)s] [%(process)d]->[%(threadName)s] [%(levelname)s] %(message)s", "%Y-%m-%d %H:%M:%S %z") - - errlog.setLevel(logging.WARN) - stdout.setLevel(logging.INFO) - stdout.addFilter(lambda entry: entry.levelno < logging.WARN) - errlog.formatter = stdout.formatter = formatter - - console.addHandler(errlog) - console.addHandler(stdout) - console.setLevel(logging.INFO) - -def handle_terminate(*args, **kwargs): - console.info("shutting down") - - global server, socketfile, clients - - for client in clients: - client.close() - - server.close() - socketfile.unlink() - - exit(0) - -def input_loop(wake_lock: threading.Lock, server: socket.socket): - server.listen() - global clients, messages - clients = [] - messages = [] - - while True: - conn, addr = server.accept() - console.info(f"Accepted client: {addr}") - clients.append(Client(conn, wake_lock, len(clients))) - - server.close() - -class Client: - def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int): - self.socket = sock - sock.setblocking(True) - self.io = socket.SocketIO(sock, "rw") - self.lock = wake_lock - self.ID = ID - self.thread = threading.Thread(target=self.loop, args=[self]) - - def loop(self): - global console - - while line := self.io.readline().decode(): - console.info(f"Recieved message: {line}") - - try: - body = json.loads(line) - except json.JSONDecodeError: - self.io.write(json.dumps({ - "status": "E", - "detail": "Invalid JSON" - }) + "\n") - - console.info(f"Client disconnect: {self.ID}") - - def close(self): - self.io.close() - -if __name__ == "__main__": - global console - console = init_logging() - - global socketfile - socketfile = Path("jumpstart.sock").resolve() - - try: - socketfile.unlink(True) - except: - console.critical(f"socket in use: {socketfile}") - exit(1) - - global server - server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) - server.bind(str(socketfile)) - server.setblocking(True) - - signal.signal(signal.SIGTERM, handle_terminate) - signal.signal(signal.SIGINT, handle_terminate) - threading.current_thread().setName("main") - input_lock = threading.Lock() - - loop = threading.Thread(target=input_loop, args=[input_lock, server]) - loop.setName("console") - loop.start() - - while True: - if input_lock.acquire(True, 1): - # The input thread has notified us of a new message - pass - else: - pass \ No newline at end of file diff --git a/setup.py b/setup.py index a27f0463fd..1c2fa89c2b 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ "flask_graphql", "wheel", "sendgrid", + "textual>=0.73.0" "alembic==1.8.1", # 1.8.1 "coloredlogs==15.0", # 15.0.1 "Beaker==1.11.0", # 1.11.0 From 3bac8278669cdc3ed72985db77f28cd30669b288 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 22 Jul 2024 19:36:54 -0500 Subject: [PATCH 069/176] update encoding Signed-off-by: Ulincsys --- augur/application/cli/jumpstart.py | 15 +++++++++++++-- jumpstart/tui.py | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/augur/application/cli/jumpstart.py b/augur/application/cli/jumpstart.py index 3c02ddc8af..83d36446a6 100644 --- a/augur/application/cli/jumpstart.py +++ b/augur/application/cli/jumpstart.py @@ -11,8 +11,8 @@ def cli(ctx): if ctx.invoked_subcommand is None: p = check_running() if not p: - click.echo("Starting service") - p = launch(ctx) + click.echo("Jumpstart is not running. Start it with: augur jumpstart run") + return click.echo(f"Connecting to Jumpstart: [{p.pid}]") @@ -55,6 +55,17 @@ def get_status(): delta = datetime.now().astimezone() - since click.echo(f"Jumpstart is running at: [{p.pid}] since {since.strftime('%a %b %d, %Y %H:%M:%S %z:%Z')} [{delta}]") +@cli.command("run") +@click.pass_context +def startup(ctx): + p = check_running() + + if not p: + click.echo("Starting") + p = launch(ctx) + else: + click.echo(f"Jumpstart is already running [{p.pid}]") + @cli.command("processID") def get_main_ID(): p = check_running() diff --git a/jumpstart/tui.py b/jumpstart/tui.py index 02e03a4906..e5a7dd4a9e 100644 --- a/jumpstart/tui.py +++ b/jumpstart/tui.py @@ -86,7 +86,7 @@ def accept_input(self): self.show_help(*args[1:]) def send(self, **kwargs): - self.server_IO.write(json.dumps(kwargs) + "\n") + self.server_IO.write((json.dumps(kwargs) + "\n").encode()) self.server_IO.flush() @on(Button.Pressed, "#statusbtn") @@ -94,6 +94,7 @@ def get_status(self): self.send({ "name": "status" }) + self.info("Status requested") def show_help(self, command = None, *args): if not command: From cf6c9ec5d3c3fa461f8e22826f0ba3b54e8bcd0a Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 29 Jul 2024 22:20:48 -0500 Subject: [PATCH 070/176] continue work on concurrency Signed-off-by: Ulincsys --- augur/application/cli/jumpstart.py | 1 + jumpstart/API.py | 131 +++++++-------- jumpstart/Client.py | 29 ++-- jumpstart/Server.py | 20 ++- jumpstart/jumpstart.py | 25 ++- jumpstart/tui.py | 247 +++++++++++++++++++++-------- jumpstart/tui.tcss | 30 +++- jumpstart/utils.py | 24 ++- 8 files changed, 350 insertions(+), 157 deletions(-) diff --git a/augur/application/cli/jumpstart.py b/augur/application/cli/jumpstart.py index 83d36446a6..b65255ec17 100644 --- a/augur/application/cli/jumpstart.py +++ b/augur/application/cli/jumpstart.py @@ -22,6 +22,7 @@ def cli(ctx): if not p.is_running(): click.echo("Error: Jumpstart server exited abnormally") + return from jumpstart.tui import run_app run_app(ctx=ctx) diff --git a/jumpstart/API.py b/jumpstart/API.py index 67de435fc9..da23d0cfce 100644 --- a/jumpstart/API.py +++ b/jumpstart/API.py @@ -1,3 +1,51 @@ +from enum import Enum, EnumMeta, auto + +Component = Enum("Component", ["all", "frontend", "api", "collection"]) + +class Status(Enum): + error="E" + terminated="T" + information="I" + status="S" + + def __call__(self, msg = None): + response = {"status": self.value} + + if self == Status.error: + response.update({ + "detail": msg or "unspecified" + }) + elif self == Status.terminated: + if msg: + response.update({ + "reason": msg + }) + elif self == Status.information: + response.update({ + "detail": msg or "ack" + }) + elif self == Status.status: + response.update(msg) + + return response + +class Command(Enum): + status=auto() + start=auto() + stop=auto() + restart=auto() + shutdown=auto() + unknown=auto() + + @staticmethod + def of(msg: dict): + cmd = msg.pop("cmd") + + try: + return Command[cmd] + except KeyError: + raise Exception(f"Unknown command: [{cmd}]") + spec = { "commands": [ { @@ -11,10 +59,7 @@ { "name": "component", "required": True, - "type": "enum", - "values": [ - "all", "frontend", "api", "collection" - ] + "type": Component }, { "name": "options", "required": False, @@ -28,10 +73,7 @@ { "name": "component", "required": True, - "type": "enum", - "values": [ - "all", "frontend", "api", "collection" - ] + "type": Component } ] }, { @@ -41,10 +83,7 @@ { "name": "component", "required": True, - "type": "enum", - "values": [ - "all", "frontend", "api", "collection" - ] + "type": Component } ] }, { @@ -106,65 +145,9 @@ ] } -from enum import Enum, auto - -class Status(Enum): - error="E" - terminated="T" - information="I" - status="S" - - @classmethod - def __call__(self, msg = None): - if self == Status.error: - return { - "status": self.value, - "detail": msg or "unspecified" - } - elif self == Status.success: - return { - "status": self.value - } - elif self == Status.terminated: - if not msg: - return { - "status": self.value - } - else: - return { - "status": self.value, - "reason": msg - } - elif self == Status.information: - return { - "status": self.value, - "detail": msg or "ack" - } - elif self == Status.status: - return { - "status": self.value, - "frontend": None, - "api": None, - "collection": None - } - -class Command(Enum): - status=auto() - start=auto() - stop=auto() - restart=auto() - shutdown=auto() - unknown=auto() - - @staticmethod - def of(msg: dict): - if msg["name"] == "status": - msg.pop("name") - return Command.status(msg) - - @classmethod - def __call__(self, args): - self.args = args - return self - -Component = Enum("Component", ["all", "frontend", "api", "collection"]) \ No newline at end of file +for command in spec["commands"]: + for arg in command["args"]: + if issubclass(type(arg["type"]), (Enum, EnumMeta)): + t = arg["type"] + arg["type"] = "enum" + arg["values"] = [c.name for c in t] diff --git a/jumpstart/Client.py b/jumpstart/Client.py index ee4ea078d5..1b990d4056 100644 --- a/jumpstart/Client.py +++ b/jumpstart/Client.py @@ -7,27 +7,38 @@ from .API import spec, Status, Command class JumpstartClient: - def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int, destroy_callback): + def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int, callbacks): self.socket = sock self.io = socket.SocketIO(sock, "rw") self.lock = wake_lock self.ID = ID self.respond(spec) - self.thread = threading.Thread(target=self.loop, args=[destroy_callback], name=f"client_{ID}") + self.thread = threading.Thread(target=self.loop, + args=[callbacks], + name=f"client_{ID}") self.thread.start() - def loop(self, callback): + def loop(self, cbs): while line := self.io.readline().decode(): - console.info(f"Recieved message: {line}") - try: body = json.loads(line) - console.info(body) + + if not "cmd" in body: + self.send(Status.error("Command unspecified")) + + cmd = Command.of(body) + if cmd == Command.status: + status_dict = cbs.get_status() + self.respond(Status.status(status_dict)) + if cmd == Command.shutdown: + cbs.shutdown() except json.JSONDecodeError: self.send(Status.error("Invalid JSON")) + except Exception as e: + self.send(Status.error(str(e))) - console.info(f"Client disconnect") - callback(self) + console.info(f"Disconnect") + cbs.disconnect(self) @synchronized def send(self, *args, **kwargs): @@ -44,7 +55,7 @@ def send(self, *args, **kwargs): def respond(self, msg: Status): if self.io.closed: return - + console.info(msg) self.io.write((json.dumps(msg) + "\n").encode()) self.io.flush() diff --git a/jumpstart/Server.py b/jumpstart/Server.py index 63261c77d5..7239806727 100644 --- a/jumpstart/Server.py +++ b/jumpstart/Server.py @@ -3,22 +3,28 @@ from pathlib import Path from .Logging import console -from .utils import synchronized from .Client import JumpstartClient as Client +from .utils import synchronized, CallbackCollection class JumpstartServer: - def __init__(self, socketfile = Path("jumpstart.sock").resolve(), input_lock = threading.Lock()): + def __init__(self, callbacks: CallbackCollection, + socketfile = Path("jumpstart.sock").resolve(), + input_lock = threading.Lock()): try: socketfile.unlink(True) except: console.critical(f"socket in use: {socketfile}") exit(1) + callbacks.register_all(disconnect=self._remove_client) + self.socketfile = socketfile self.server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.server.bind(str(socketfile)) self.server.setblocking(True) self.lock = input_lock + callbacks.register("shutdown", self._shutdown_callback) + self.callbacks = callbacks self.clients: list[Client] = [] self.messages = [] @@ -32,7 +38,7 @@ def accept_loop(self): while request := self.server.accept(): conn, addr = request console.info(f"Accepted client: {len(self.clients)}") - self.clients.append(Client(conn, self.lock, len(self.clients), destroy_callback = self._remove_client)) + self.clients.append(Client(conn, self.lock, len(self.clients), callbacks=self.callbacks)) except OSError: # OSError is thrown when the socket is closed while blocking on accept console.info("Server no longer accepting connections") @@ -44,8 +50,16 @@ def accept_loop(self): def _remove_client(self, client): self.clients.remove(client) + @synchronized + def _shutdown_callback(self, client): + console.info("Server shutdown requested") + self.close() + def start(self): self.loop.start() + + def closed(self): + return not self.loop.is_alive() def close(self): self.server.shutdown(socket.SHUT_RDWR) diff --git a/jumpstart/jumpstart.py b/jumpstart/jumpstart.py index a67ec2efd1..4d4c57af3d 100644 --- a/jumpstart/jumpstart.py +++ b/jumpstart/jumpstart.py @@ -10,6 +10,7 @@ from .Logging import console from .Server import JumpstartServer +from .utils import synchronized, CallbackCollection global server @@ -20,15 +21,35 @@ def handle_terminate(*args, **kwargs): exit(0) +frontend = False +collection = False + +@synchronized +def start_component(component) -> bool: + """Returns True if the given component was not already running""" + +@synchronized +def stop_component(component) -> bool: + """Returns True if the given component was running and was stopped""" + +@synchronized +def get_status(): + return { + "frontend": frontend, + "api": frontend, + "collection": bool(collection) + } + if __name__ == "__main__": signal.signal(signal.SIGTERM, handle_terminate) signal.signal(signal.SIGINT, handle_terminate) threading.current_thread().setName("main") - server = JumpstartServer() + callbacks = CallbackCollection(start=start_component, stop=stop_component, status=get_status) + server = JumpstartServer(callbacks) server.start() - while True: + while not server.closed(): if server.lock.acquire(True, 0.1): # The input thread has notified us of a new message server.lock.release() diff --git a/jumpstart/tui.py b/jumpstart/tui.py index e5a7dd4a9e..0717e64669 100644 --- a/jumpstart/tui.py +++ b/jumpstart/tui.py @@ -2,6 +2,7 @@ from socket import socket import json +import asyncio import logging from sys import argv from pathlib import Path @@ -10,40 +11,113 @@ from textual import work from textual.app import App, on from textual.binding import Binding +from textual.message import Message from textual.events import Load, Mount -from textual.widgets import RichLog, Input, Button from textual.containers import Horizontal, Vertical +from textual.widgets import RichLog, Input, Button, Label class JumpstartTUI(App): + # Setup CSS_PATH = "tui.tcss" + """ + The name of a binding's action automatically links + to a function of the same name, but prefixed with + "action_". So, by putting "kb_exit" here, I'm + telling the runtime to call a function named + "action_kb_exit" any time the user presses CTRL+D. + + I don't personally like that, but you'll find the + function defined below. + """ BINDINGS = [ Binding("ctrl+d", "kb_exit", "Exit", priority=True) ] + + def compose(self): + # Yield the app's components on load + with Horizontal(): + with Vertical(classes="sidebar"): + with Vertical(classes="status_container"): + with Horizontal(classes="info_container"): + yield Label("Frontend") + yield Label(id="frontend_label", classes="status_label label_down") + with Horizontal(classes="info_container"): + yield Label("API") + yield Label(id="api_label", classes="status_label label_down") + with Horizontal(classes="info_container"): + yield Label("Collection") + yield Label(id="collection_label", classes="status_label label_down") + + yield Button("Status", id="statusbtn") + yield Button("Exit", variant="error", id="exitbtn") + + with Vertical(): + yield RichLog( + highlight=True, + auto_scroll=True, + wrap=True, + id="stdout" + ) + yield Input( + placeholder="Enter Command", + id="command_line", + valid_empty=False + ) + + class ServerMessage(Message): + """Add a message to the outgoing queue""" + + def __init__(self, **msg) -> None: + self.msg = msg + super().__init__() + + class DirtyExit(Message): + """Custom event to shut down app without immediately closing""" + + def __init__(self) -> None: + super().__init__() + + class Info(Message): + """Custom event to print an info message""" + + def __init__(self, msg) -> None: + self.msg = msg + super().__init__() + + def __str__(self): + return self.msg + + class Error(Message): + """Custom event to print an error message""" + + def __init__(self, msg) -> None: + self.msg = msg + super().__init__() + + def __str__(self): + return self.msg def action_kb_exit(self, force = False): - inbox = self.query(Input).only_one() + """Called when the user requests to exit""" + inbox = self.query(Input).filter("#command_line").only_one() value = inbox.value if not value or force: self.app.exit() - def exit_dirty(self): - inbox = self.query(Input).only_one() - inbox.value = "" - inbox.disabled = True - - self.error("Use CTRL+D or CTRL+C to exit") - + # Logging + @on(Error) def error(self, msg): self.out("ERROR", msg) + @on(Info) def info(self, msg): self.out("INFO", msg) def out(self, level, msg, source = "console"): time_str = datetime.now().astimezone().strftime("%Y-%m-%d %H:%M:%S %z") - formatted = "[{}] [{}] [{}] {}".format(time_str, source, level, msg) + formatted = "[{}] [{}] [{}] {}".format(time_str, source, level, str(msg)) self.raw(formatted) def raw(self, obj, disable_highlighting = False, enable_markup = False): @@ -58,49 +132,112 @@ def raw(self, obj, disable_highlighting = False, enable_markup = False): if enable_markup: stdout.markup = False + def show_help(self, command = None, *args): + if not command: + self.raw(self.help_str, True, True) + else: + self.info("Granular help not currently available") + + # Events @on(Mount) async def startup_process_tasks(self): - inbox = self.query(Input).only_one() + # Make sure the cmd input takes focus + inbox = self.query(Input).filter("#command_line").only_one() inbox.focus() self.server_rec() + self.status_ping() + + @on(DirtyExit) + def exit_dirty(self): + self.workers.cancel_all() + inbox = self.query(Input).filter("#command_line").only_one() + inbox.value = "" + inbox.disabled = True + + for btn in self.query(Button).results(): + if not btn.id == "exitbtn": + btn.disabled = True + + self.error("Use CTRL+D or CTRL+C to exit") @on(Button.Pressed, "#exitbtn") def handle_btn_exit(self): self.action_kb_exit(True) - @on(Input.Submitted) - def accept_input(self): - inbox = self.query(Input).only_one() - value = inbox.value + @on(Input.Submitted, "#command_line") + def accept_input(self, event: Input.Submitted): + value = event.value + + # The input box only accepts non-empty strings + cmd, *args = value.split() - if value == "exit": + if cmd == "exit": self.action_kb_exit(True) self.out("INFO", value, "user") - inbox.value = "" + event.input.value = "" - args = value.split() - - if args[0] == "help": - self.show_help(*args[1:]) + if cmd == "help": + self.show_help(*args) + + packet = {} + + for command in self.spec["commands"]: + if command["name"] == cmd: + packet["cmd"] = cmd + for arg in command["args"]: + if arg["required"] and not len(args): + self.error(f'Missing required positional argument: [{arg["name"]}]') + return + elif len(args): + if arg["type"] == "enum": + if args[0] not in arg["values"]: + self.error(f'Invalid value for arg [{arg["name"]}]') + self.error(f'> Must be one of <{", ".join(arg["values"])}>') + return + packet[arg["name"]] = args.pop(0) + elif arg["type"] == "list": + packet[arg["name"]] = args + break + break + if packet: + pass + else: + self.error("Unknown command") + + @on(Button.Pressed, "#statusbtn") + def get_status(self): + self.send(cmd = "status") + @on(ServerMessage) + def server_send(self, carrier: ServerMessage): + self.send(**carrier.msg) + + # Server communication def send(self, **kwargs): - self.server_IO.write((json.dumps(kwargs) + "\n").encode()) - self.server_IO.flush() + try: + self.server_IO.write((json.dumps(kwargs) + "\n").encode()) + self.server_IO.flush() + except Exception: + self.post_message(self.DirtyExit()) - @on(Button.Pressed, "#statusbtn") - def get_status(self): - self.send({ - "name": "status" - }) - self.info("Status requested") + def sendraw(self, msg: str): + self.server_IO.write((msg + "\n").encode()) + self.server_IO.flush() - def show_help(self, command = None, *args): - if not command: - self.raw(self.help_str, True, True) - else: - self.info("Granular help not yet available") + # Worker tasks + @work(name="status") + async def status_ping(self): + while not hasattr(self, "server_IO"): + # Wait for server connection + await asyncio.sleep(0.1) + + await asyncio.sleep(1) + + while not self.server_IO.closed: + self.post_message(self.ServerMessage(cmd = "status")) + await asyncio.sleep(1) @work(name="server", thread=True) def server_rec(self): @@ -128,18 +265,18 @@ def error(msg, source = "server"): except Exception as e: error(f"Could not connect to the jumpstart server [{self.socket_file}]") log(e) - self.call_from_thread(self.exit_dirty) + self.post_message(self.DirtyExit()) return # Jumpstart sends the spec as a dict on connection try: - import time init = io.readline() self.spec = json.loads(init) except json.JSONDecodeError as e: error("Could not decode handshake", "console") + log(init.decode()) log(e) - self.call_from_thread(self.exit_dirty) + self.post_message(self.DirtyExit()) return info("Connected") @@ -168,41 +305,23 @@ def error(msg, source = "server"): try: msg = json.loads(line) - if msg["ID"] == "E": + if msg["status"] == "E": error(msg["detail"]) - elif msg["ID"] == "T": + elif msg["status"] == "T": info("Connection closed: " + msg.get("reason") or "Reason unspecified") - self.call_from_thread(self.exit_dirty) + self.post_message(self.DirtyExit()) return - elif msg["ID"] == "I": + elif msg["status"] == "I": info(msg["detail"]) - elif msg["ID"] == "S": - ... + elif msg["status"] == "S": + log(msg) except json.JSONDecodeError: error("Bad packet from server", "console") log(line) - except Exception: + except Exception as e: error("Exception while reacting to incoming packet", "console") + log(e) log(msg) - - def compose(self): - with Horizontal(): - with Vertical(classes="sidebar"): - yield Button("Status") - yield Button("Exit", variant="error", id="exitbtn") - - with Vertical(): - yield RichLog( - highlight=True, - auto_scroll=True, - wrap=True, - id="stdout" - ) - yield Input( - placeholder="Enter Command", - id="command_line", - valid_empty=False - ) def run_app(socket_file = Path("jumpstart.sock"), ctx = None): app = JumpstartTUI() @@ -222,7 +341,7 @@ def run_app(socket_file = Path("jumpstart.sock"), ctx = None): app.server_IO.close() app.server.close() - # Clean up any residual threads + # Clean up any residual workers app.workers.cancel_all() if __name__ == "__main__": diff --git a/jumpstart/tui.tcss b/jumpstart/tui.tcss index 8625236c30..710452025d 100644 --- a/jumpstart/tui.tcss +++ b/jumpstart/tui.tcss @@ -1,10 +1,9 @@ #stdout { - dock: top; width: 100% } #command_line { - dock: bottom; + margin-top: 1; } .sidebar { @@ -13,6 +12,33 @@ padding: 1; background: $boost; height: 100%; + min-height: 30; +} + +.status_container { + width: 100w; + height: auto; + content-align: center top; + border-bottom: heavy $background; +} + +.info_container { + padding: 0; + margin: 1; + height: auto; +} + +.status_label { + dock: right; + width: 2; +} + +.label_down { + background: red; +} + +.label_up { + background: green; } #exitbtn { diff --git a/jumpstart/utils.py b/jumpstart/utils.py index ec084c1600..b36a2754c4 100644 --- a/jumpstart/utils.py +++ b/jumpstart/utils.py @@ -1,10 +1,28 @@ from functools import wraps -from threading import Lock +from threading import RLock def synchronized(func): - lock = Lock() + lock = RLock() @wraps(func) def call_sync(*args, **kwargs): with lock: return func(*args, **kwargs) - return call_sync \ No newline at end of file + return call_sync + +class CallbackCollection: + def __init__(self, **cbs) -> None: + for name, cb in cbs.items(): + if not callable(cb): + raise TypeError("A callback must be callable") + setattr(self, name, cb) + + def register(self, name, cb): + if not callable(cb): + raise TypeError("A callback must be callable") + setattr(self, name, cb) + + def register_all(self, **cbs): + for name, cb in cbs.items(): + if not callable(cb): + raise TypeError("A callback must be callable") + setattr(self, name, cb) \ No newline at end of file From 121ee03b339bc30fd86b5612a153b2e2135cdb48 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 12 Aug 2024 15:01:39 -0500 Subject: [PATCH 071/176] mvp Signed-off-by: Ulincsys --- augur/api/view/init.py | 2 +- augur/application/cli/api.py | 9 ++- augur/application/cli/collection.py | 9 ++- augur/application/cli/tasks.py | 2 +- jumpstart/API.py | 16 +++- jumpstart/Client.py | 25 +++--- jumpstart/Server.py | 10 ++- jumpstart/jumpstart.py | 43 +++++----- jumpstart/procman.py | 117 ++++++++++++++++++++++++++++ jumpstart/tui.py | 47 +++++++++-- jumpstart/tui.tcss | 3 - jumpstart/utils.py | 9 ++- 12 files changed, 238 insertions(+), 54 deletions(-) create mode 100644 jumpstart/procman.py diff --git a/augur/api/view/init.py b/augur/api/view/init.py index b0b4b27446..37b1972e86 100644 --- a/augur/api/view/init.py +++ b/augur/api/view/init.py @@ -91,4 +91,4 @@ def write_settings(current_settings): # Initialize logging def init_logging(): global logger - logger = AugurLogger("augur_view", reset_logfiles=True).get_logger() + logger = AugurLogger("augur_view", reset_logfiles=False).get_logger() diff --git a/augur/application/cli/api.py b/augur/application/cli/api.py index d716957c0b..50044de7cf 100644 --- a/augur/application/cli/api.py +++ b/augur/application/cli/api.py @@ -14,15 +14,16 @@ from augur.application.db.session import DatabaseSession from augur.application.logs import AugurLogger -from augur.application.cli import test_connection, test_db_connection, with_database +from augur.application.cli import test_connection, test_db_connection, with_database, DatabaseContext from augur.application.cli._cli_util import _broadcast_signal_to_processes, raise_open_file_limit, clear_redis_caches, clear_rabbitmq_messages from augur.application.db.lib import get_value -logger = AugurLogger("augur", reset_logfiles=True).get_logger() +logger = AugurLogger("augur", reset_logfiles=False).get_logger() @click.group('api', short_help='Commands for controlling the backend API server') -def cli(): - pass +@click.pass_context +def cli(ctx): + ctx.obj = DatabaseContext() @cli.command("start") @click.option("--development", is_flag=True, default=False, help="Enable development mode") diff --git a/augur/application/cli/collection.py b/augur/application/cli/collection.py index 3cb08ef1cd..a7666aa118 100644 --- a/augur/application/cli/collection.py +++ b/augur/application/cli/collection.py @@ -22,14 +22,15 @@ from augur.application.db.session import DatabaseSession from augur.application.logs import AugurLogger from augur.application.db.lib import get_value -from augur.application.cli import test_connection, test_db_connection, with_database +from augur.application.cli import test_connection, test_db_connection, with_database, DatabaseContext from augur.application.cli._cli_util import _broadcast_signal_to_processes, raise_open_file_limit, clear_redis_caches, clear_rabbitmq_messages -logger = AugurLogger("augur", reset_logfiles=True).get_logger() +logger = AugurLogger("augur", reset_logfiles=False).get_logger() @click.group('server', short_help='Commands for controlling the backend API server & data collection workers') -def cli(): - pass +@click.pass_context +def cli(ctx): + ctx.obj = DatabaseContext() @cli.command("start") @click.option("--development", is_flag=True, default=False, help="Enable development mode, implies --disable-collection") diff --git a/augur/application/cli/tasks.py b/augur/application/cli/tasks.py index d7ce4e4398..bb2344db38 100644 --- a/augur/application/cli/tasks.py +++ b/augur/application/cli/tasks.py @@ -17,7 +17,7 @@ from augur.application.cli import test_connection, test_db_connection from augur.application.cli.backend import clear_rabbitmq_messages, raise_open_file_limit -logger = AugurLogger("augur", reset_logfiles=True).get_logger() +logger = AugurLogger("augur", reset_logfiles=False).get_logger() @click.group('celery', short_help='Commands for controlling the backend API server & data collection workers') def cli(): diff --git a/jumpstart/API.py b/jumpstart/API.py index da23d0cfce..1020a8043e 100644 --- a/jumpstart/API.py +++ b/jumpstart/API.py @@ -1,6 +1,20 @@ from enum import Enum, EnumMeta, auto -Component = Enum("Component", ["all", "frontend", "api", "collection"]) +class Component(Enum): + all = auto() + frontend = auto() + api = auto() + collection = auto() + + @staticmethod + def from_str(s): + if isinstance(s, Component): + return s + + try: + return Component[s] + except: + return None class Status(Enum): error="E" diff --git a/jumpstart/Client.py b/jumpstart/Client.py index 1b990d4056..32a124c3ba 100644 --- a/jumpstart/Client.py +++ b/jumpstart/Client.py @@ -3,11 +3,11 @@ import threading from .Logging import console -from .utils import synchronized from .API import spec, Status, Command +from .utils import synchronized, CallbackCollection class JumpstartClient: - def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int, callbacks): + def __init__(self, sock: socket.socket, wake_lock: threading.Lock, ID: int, callbacks: CallbackCollection): self.socket = sock self.io = socket.SocketIO(sock, "rw") self.lock = wake_lock @@ -24,18 +24,23 @@ def loop(self, cbs): body = json.loads(line) if not "cmd" in body: - self.send(Status.error("Command unspecified")) + self.respond(Status.error("Command unspecified")) cmd = Command.of(body) if cmd == Command.status: - status_dict = cbs.get_status() + status_dict = cbs.status() self.respond(Status.status(status_dict)) if cmd == Command.shutdown: - cbs.shutdown() + cbs.shutdown(self) + if cmd == Command.start: + cbs.start(body["component"], self, *body.get("options", [])) + if cmd == Command.stop: + cbs.stop(body["component"], self) except json.JSONDecodeError: - self.send(Status.error("Invalid JSON")) + self.respone(Status.error("Invalid JSON")) except Exception as e: - self.send(Status.error(str(e))) + self.respond(Status.error(str(e))) + console.exception("Exception while handling request: " + line) console.info(f"Disconnect") cbs.disconnect(self) @@ -55,7 +60,7 @@ def send(self, *args, **kwargs): def respond(self, msg: Status): if self.io.closed: return - console.info(msg) + # console.info(msg) self.io.write((json.dumps(msg) + "\n").encode()) self.io.flush() @@ -63,4 +68,6 @@ def respond(self, msg: Status): def close(self, **kwargs): self.send(status="T", **kwargs) self.io.close() - self.thread.join() + + if not self.thread is threading.currentThread(): + self.thread.join() diff --git a/jumpstart/Server.py b/jumpstart/Server.py index 7239806727..0cca3a87d4 100644 --- a/jumpstart/Server.py +++ b/jumpstart/Server.py @@ -2,6 +2,7 @@ import threading from pathlib import Path +from .API import Status from .Logging import console from .Client import JumpstartClient as Client from .utils import synchronized, CallbackCollection @@ -51,9 +52,14 @@ def _remove_client(self, client): self.clients.remove(client) @synchronized - def _shutdown_callback(self, client): - console.info("Server shutdown requested") + def _shutdown_callback(self, client: Client): + console.info(f"Server shutdown requested by {client.thread.name}") self.close() + + @synchronized + def broadcast(self, msg, level=Status.information): + for client in self.clients: + client.respond(level(f"BROADCAST: {msg}")) def start(self): self.loop.start() diff --git a/jumpstart/jumpstart.py b/jumpstart/jumpstart.py index 4d4c57af3d..2474dac02c 100644 --- a/jumpstart/jumpstart.py +++ b/jumpstart/jumpstart.py @@ -6,53 +6,52 @@ import signal import logging import threading + from pathlib import Path +from subprocess import Popen, PIPE, STDOUT +from .API import Status +from .API import Component from .Logging import console +from .procman import ProcessManager from .Server import JumpstartServer -from .utils import synchronized, CallbackCollection +from .utils import CallbackCollection +from .utils import UniversalPlaceholder -global server +global server, manager def handle_terminate(*args, **kwargs): console.info("shutting down") + manager.stop(Component.all, UniversalPlaceholder()) server.close() exit(0) - -frontend = False -collection = False - -@synchronized -def start_component(component) -> bool: - """Returns True if the given component was not already running""" - -@synchronized -def stop_component(component) -> bool: - """Returns True if the given component was running and was stopped""" - -@synchronized -def get_status(): - return { - "frontend": frontend, - "api": frontend, - "collection": bool(collection) - } if __name__ == "__main__": signal.signal(signal.SIGTERM, handle_terminate) signal.signal(signal.SIGINT, handle_terminate) threading.current_thread().setName("main") - callbacks = CallbackCollection(start=start_component, stop=stop_component, status=get_status) + manager = ProcessManager() + + callbacks = CallbackCollection(start=manager.start, stop=manager.stop, status=manager.status) server = JumpstartServer(callbacks) server.start() while not server.closed(): + try: + manager.refresh() + except: + console.exception("Exception while refreshing status") + server.broadcast("Exception while refreshing status, going down", Status.error) + break + if server.lock.acquire(True, 0.1): # The input thread has notified us of a new message server.lock.release() pass else: time.sleep(0.1) + + handle_terminate() diff --git a/jumpstart/procman.py b/jumpstart/procman.py new file mode 100644 index 0000000000..69513ec87e --- /dev/null +++ b/jumpstart/procman.py @@ -0,0 +1,117 @@ +from .API import Status +from .API import Component +from .Logging import console +from .utils import synchronized +from .utils import UniversalPlaceholder +from .Client import JumpstartClient as Client + +import signal + +from time import sleep +from typing import Union +from pathlib import Path +from threading import Lock +from subprocess import Popen, PIPE, STDOUT, run + +class ProcessManager: + def __init__(self): + self.frontend = False + self._frontend = None + self.collection = False + self._collection = None + + # Ensure a read of the component status cannot happen during bringup + self._startlock = Lock() + + self.frontend_stdout = Path("logs/jumpstart_frontend.info") + self.frontend_stderr = Path("logs/jumpstart_frontend.error") + self.collection_stdout = Path("logs/jumpstart_collection.info") + self.collection_stderr = Path("logs/jumpstart_collection.error") + + def status(self): + return { + "frontend": self.frontend, + "api": self.frontend, + "collection": self.collection + } + + @synchronized + def start(self, component: Union[Component, str], client: Client, *options): + if not (c := Component.from_str(component)): + client.respond(Status.error(f"Invalid component for start: {component}")) + return + + if c in (Component.api, Component.frontend, Component.all): + if self.frontend: + client.respond(Status.information(f"The frontend/api is already running")) + else: + with(self._startlock): + self._frontend = { + "stdout": self.frontend_stdout.open("w"), + "stderr": self.frontend_stderr.open("w") + } + self._frontend["process"] = Popen("augur api start".split() + list(options), + stdout=self._frontend["stdout"], + stderr=self._frontend["stderr"]) + if c in (Component.collection, Component.all): + if self.collection: + client.respond(Status.information(f"The collection is already running")) + else: + with(self._startlock): + self._collection = { + "stdout": self.collection_stdout.open("w"), + "stderr": self.collection_stderr.open("w") + } + self._collection["process"] = Popen("augur collection start".split() + list(options), + stdout=self._collection["stdout"], + stderr=self._collection["stderr"]) + + @synchronized + def stop(self, component: Union[Component, str], client: Client): + if not (c := Component.from_str(component)): + client.respond(Status.error(f"Invalid component for stop: {component}")) + return + + if c in (Component.api, Component.frontend, Component.all): + if not self.frontend: + client.respond(Status.information("The frontend/api is not running")) + else: + self._frontend["process"].send_signal(signal.SIGINT) + run("augur api stop".split(), stderr=PIPE, stdout=PIPE) + if c in (Component.collection, Component.all): + if not self.collection: + client.respond(Status.information("The collection is not running")) + else: + self._collection["process"].send_signal(signal.SIGINT) + run("augur collection stop".split(), stderr=PIPE, stdout=PIPE) + + @synchronized + def shutdown(self): + self.stop(Component.all, UniversalPlaceholder()) + + while self.refresh(): + sleep(0.1) + + @synchronized + def refresh(self): + with(self._startlock): + if self._frontend is not None: + if self._frontend["process"].poll() is not None: + self.frontend = False + self._frontend["stderr"].close() + self._frontend["stdout"].close() + self._frontend = None + console.info("Frontend shut down") + else: + self.frontend = True + if self._collection is not None: + if self._collection["process"].poll() is not None: + self.collection = False + self._collection["stderr"].close() + self._collection["stdout"].close() + self._collection = None + console.info("Collection shut down") + else: + self.collection = True + + return self.frontend or self.collection \ No newline at end of file diff --git a/jumpstart/tui.py b/jumpstart/tui.py index 0717e64669..43f0fa7a25 100644 --- a/jumpstart/tui.py +++ b/jumpstart/tui.py @@ -41,13 +41,13 @@ def compose(self): with Vertical(classes="status_container"): with Horizontal(classes="info_container"): yield Label("Frontend") - yield Label(id="frontend_label", classes="status_label label_down") + yield Label(id="frontend_label", classes="status_label") with Horizontal(classes="info_container"): yield Label("API") - yield Label(id="api_label", classes="status_label label_down") + yield Label(id="api_label", classes="status_label") with Horizontal(classes="info_container"): yield Label("Collection") - yield Label(id="collection_label", classes="status_label label_down") + yield Label(id="collection_label", classes="status_label") yield Button("Status", id="statusbtn") yield Button("Exit", variant="error", id="exitbtn") @@ -98,6 +98,15 @@ def __init__(self, msg) -> None: def __str__(self): return self.msg + class Status(Message): + """Notify the UI of an updated status""" + + def __init__(self, frontend: bool, api: bool, collection: bool): + self.f = frontend + self.a = api + self.c = collection + super().__init__() + def action_kb_exit(self, force = False): """Called when the user requests to exit""" inbox = self.query(Input).filter("#command_line").only_one() @@ -202,9 +211,10 @@ def accept_input(self, event: Input.Submitted): break break if packet: - pass + self.send(**packet) else: self.error("Unknown command") + @on(Button.Pressed, "#statusbtn") def get_status(self): @@ -213,6 +223,27 @@ def get_status(self): @on(ServerMessage) def server_send(self, carrier: ServerMessage): self.send(**carrier.msg) + + @on(Status) + def status_update(self, status): + labels = self.query(".status_label") + + for label in labels: + if label.id == "frontend_label": + if status.f: + label.add_class("label_up") + else: + label.remove_class("label_up") + elif label.id == "api_label": + if status.a: + label.add_class("label_up") + else: + label.remove_class("label_up") + elif label.id == "collection_label": + if status.c: + label.add_class("label_up") + else: + label.remove_class("label_up") # Server communication def send(self, **kwargs): @@ -314,7 +345,11 @@ def error(msg, source = "server"): elif msg["status"] == "I": info(msg["detail"]) elif msg["status"] == "S": - log(msg) + self.post_message(self.Status( + msg["frontend"], + msg["api"], + msg["collection"] + )) except json.JSONDecodeError: error("Bad packet from server", "console") log(line) @@ -336,7 +371,7 @@ def run_app(socket_file = Path("jumpstart.sock"), ctx = None): import click click.echo("Exited application") - if app.server_IO: + if hasattr(app, "server_IO"): app.server.shutdown(sockets.SHUT_RDWR) app.server_IO.close() app.server.close() diff --git a/jumpstart/tui.tcss b/jumpstart/tui.tcss index 710452025d..eb457d7126 100644 --- a/jumpstart/tui.tcss +++ b/jumpstart/tui.tcss @@ -31,9 +31,6 @@ .status_label { dock: right; width: 2; -} - -.label_down { background: red; } diff --git a/jumpstart/utils.py b/jumpstart/utils.py index b36a2754c4..e1d9de5cff 100644 --- a/jumpstart/utils.py +++ b/jumpstart/utils.py @@ -25,4 +25,11 @@ def register_all(self, **cbs): for name, cb in cbs.items(): if not callable(cb): raise TypeError("A callback must be callable") - setattr(self, name, cb) \ No newline at end of file + setattr(self, name, cb) + +class UniversalPlaceholder: + def __getattr__(self, name, default=...): + return self + + def __call__(self, *args, **kwargs): + pass From 761cc50d4cfd679493dfce909d5b666eab9d81a5 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Mon, 12 Aug 2024 15:36:05 -0500 Subject: [PATCH 072/176] Fix improper client shutdown on some platforms Signed-off-by: Ulincsys --- jumpstart/tui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jumpstart/tui.py b/jumpstart/tui.py index 43f0fa7a25..3eeb4f8309 100644 --- a/jumpstart/tui.py +++ b/jumpstart/tui.py @@ -113,6 +113,8 @@ def action_kb_exit(self, force = False): value = inbox.value if not value or force: + self.server.shutdown(sockets.SHUT_RDWR) + self.server_IO.close() self.app.exit() # Logging @@ -372,6 +374,7 @@ def run_app(socket_file = Path("jumpstart.sock"), ctx = None): click.echo("Exited application") if hasattr(app, "server_IO"): + # This is duplicated above in case of partial shutdown app.server.shutdown(sockets.SHUT_RDWR) app.server_IO.close() app.server.close() From e92089025a6ed879fe4655ee42e6666a77b86e8d Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Tue, 27 Aug 2024 17:16:33 -0500 Subject: [PATCH 073/176] Add DB check before parsing start command Signed-off-by: Ulincsys --- augur/application/cli/__init__.py | 4 ++-- jumpstart/procman.py | 6 ++++++ jumpstart/tui.py | 9 +++++---- jumpstart/tui.tcss | 3 +++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/augur/application/cli/__init__.py b/augur/application/cli/__init__.py index f15758c9cf..00f41a5534 100644 --- a/augur/application/cli/__init__.py +++ b/augur/application/cli/__init__.py @@ -32,7 +32,7 @@ def new_func(ctx, *args, **kwargs): You are not connected to the internet.\n \ Please connect to the internet to run Augur\n \ Consider setting http_proxy variables for limited access installations.") - sys.exit() + sys.exit(-1) return update_wrapper(new_func, function_internet_connection) @@ -78,7 +78,7 @@ def new_func(ctx, *args, **kwargs): print(f"\n\n{usage} command setup failed\nERROR: connecting to database\nHINT: The {incorrect_values} may be incorrectly specified in {location}\n") engine.dispose() - sys.exit() + sys.exit(-2) return update_wrapper(new_func, function_db_connection) diff --git a/jumpstart/procman.py b/jumpstart/procman.py index 69513ec87e..b15853161f 100644 --- a/jumpstart/procman.py +++ b/jumpstart/procman.py @@ -41,6 +41,12 @@ def start(self, component: Union[Component, str], client: Client, *options): client.respond(Status.error(f"Invalid component for start: {component}")) return + check_db = run("augur db test-connection".split()) + + if check_db.returncode != 0: + client.respond(Status.error(f"Could not communicate with the database: {check_db.returncode}")) + return + if c in (Component.api, Component.frontend, Component.all): if self.frontend: client.respond(Status.information(f"The frontend/api is already running")) diff --git a/jumpstart/tui.py b/jumpstart/tui.py index 3eeb4f8309..2a09316885 100644 --- a/jumpstart/tui.py +++ b/jumpstart/tui.py @@ -41,15 +41,16 @@ def compose(self): with Vertical(classes="status_container"): with Horizontal(classes="info_container"): yield Label("Frontend") - yield Label(id="frontend_label", classes="status_label") + yield Label("X", id="frontend_label", classes="status_label") with Horizontal(classes="info_container"): yield Label("API") - yield Label(id="api_label", classes="status_label") + yield Label("X", id="api_label", classes="status_label") with Horizontal(classes="info_container"): yield Label("Collection") - yield Label(id="collection_label", classes="status_label") + yield Label("X", id="collection_label", classes="status_label") - yield Button("Status", id="statusbtn") + yield Button("Start", id="startbtn") + yield Button("Stop", id="stopbtn") yield Button("Exit", variant="error", id="exitbtn") with Vertical(): diff --git a/jumpstart/tui.tcss b/jumpstart/tui.tcss index eb457d7126..2c431a72a3 100644 --- a/jumpstart/tui.tcss +++ b/jumpstart/tui.tcss @@ -32,10 +32,13 @@ dock: right; width: 2; background: red; + color: black; + text-align: center; } .label_up { background: green; + color: green; } #exitbtn { From 2067d448e1639125418433b0b14892a59ec127b9 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Wed, 3 Jul 2024 18:57:15 -0500 Subject: [PATCH 074/176] Add github graphql data access' Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/util/github_graphql_data_access.py | 201 ++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 augur/tasks/github/util/github_graphql_data_access.py diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py new file mode 100644 index 0000000000..4167d2ed3e --- /dev/null +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -0,0 +1,201 @@ +import logging +import time +import httpx +from tenacity import retry, stop_after_attempt, wait_fixed, retry_if_exception, RetryError + +URL = "https://api.github.com/graphql" + +class RatelimitException(Exception): + + def __init__(self, response, message="Github Rate limit exceeded") -> None: + + self.response = response + + super().__init__(message) + +class UrlNotFoundException(Exception): + pass + +class GithubGraphQlDataAccess: + + def __init__(self, key_manager, logger: logging.Logger): + + self.logger = logger + self.key_manager = key_manager + + def paginate_resource(self, query, variables, result_keys): + + params = { + "numRecords" : self.per_page, + "cursor" : None + } + params.update(variables) + + response = self.make_request_with_retries(query, params) + result_json = response.json() + + data = self.__extract_data_section(result_keys, result_json) + + self.__raise_exception_for_invalid_total_count(data) + + if int(data["totalCount"]) == 0: + return + + yield from self.__extract_raw_data_into_list(data) + + self.__raise_exception_for_invalid_page_info(data) + + while data['pageInfo']['hasNextPage']: + params['cursor'] = data['pageInfo']['endCursor'] + + response = self.make_request_with_retries(query, params) + result_json = response.json() + + data = self.__extract_data_section(result_keys, result_json) + + yield from self.__extract_raw_data_into_list(data) + + self.__raise_exception_for_invalid_page_info(data) + + + def make_request(self, query, variables={}, timeout=40): + + with httpx.Client() as client: + + json_dict = { + 'query' : query + } + + if variables: + json_dict['variables'] = variables + + response = client.post(url=URL,auth=self.key_manager,json=json_dict, timeout=timeout) + + if response.status_code in [403, 429]: + raise RatelimitException(response) + + if response.status_code == 404: + raise UrlNotFoundException(f"404 for {self.url} with query of {query}") + + response.raise_for_status() + + return response + + + def make_request_with_retries(self, query, variables, timeout=100): + """ What method does? + 1. Catches RetryError and rethrows a nicely formatted OutOfRetriesException that includes that last exception thrown + """ + + try: + return self.__make_request_with_retries(query, variables, timeout) + except RetryError as e: + raise e.last_attempt.exception() + + @retry(stop=stop_after_attempt(10), wait=wait_fixed(5), retry=retry_if_exception(lambda exc: not isinstance(exc, UrlNotFoundException))) + def __make_request_with_retries(self, query, variables, timeout=40): + """ What method does? + 1. Retires 10 times + 2. Waits 5 seconds between retires + 3. Does not rety UrlNotFoundException + 4. Catches RatelimitException and waits before raising exception + """ + + try: + return self.make_request(query, variables, timeout) + except RatelimitException as e: + self.__handle_github_ratelimit_response(e.response) + raise e + + def __handle_github_ratelimit_response(self, response): + + headers = response.headers + + if "Retry-After" in headers: + + retry_after = int(headers["Retry-After"]) + self.logger.info( + f'\n\n\n\nSleeping for {retry_after} seconds due to secondary rate limit issue.\n\n\n\n') + time.sleep(retry_after) + + elif "X-RateLimit-Remaining" in headers and int(headers["X-RateLimit-Remaining"]) == 0: + current_epoch = int(time.time()) + epoch_when_key_resets = int(headers["X-RateLimit-Reset"]) + key_reset_time = epoch_when_key_resets - current_epoch + + if key_reset_time < 0: + self.logger.error(f"Key reset time was less than 0 setting it to 0.\nThe current epoch is {current_epoch} and the epoch that the key resets at is {epoch_when_key_resets}") + key_reset_time = 0 + + self.logger.info(f"\n\n\nAPI rate limit exceeded. Sleeping until the key resets ({key_reset_time} seconds)") + time.sleep(key_reset_time) + else: + time.sleep(60) + + def __extract_data_section(self, keys, json_response): + + if not json_response or not json_response.strip(): + raise Exception(f"Empty data returned. Data: {json_response}") + + if 'data' not in json_response: + raise Exception(f"Error: 'data' key missing from response. Response: {json_response}") + + core = json_response['data'] + + # iterate deeper into the json_response object until we get to the desired data + for value in keys: + core = core[value] + + return core + + def __raise_exception_for_invalid_total_count(self, data): + + if 'totalCount' not in data: + raise Exception(f"Error: totalCount key not found in data. Data: {data}") + + if not data["totalCount"]: + raise Exception(f"Error: totalCount is null. Data: {data}") + + if not data["totalCount"]: + raise Exception(f"Error: totalCount is null. Data: {data}") + + try: + int(data["totalCount"]) + except ValueError: + raise Exception(f"Error: totalCount is not an integer. Data: {data}") + + def __raise_exception_for_invalid_page_info(self, data): + + if 'pageInfo' not in data: + raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") + + if 'hasNextPage' not in data['pageInfo']: + raise Exception(f"Error: 'hasNextPage' key not present in data. Data {data}") + + if 'endCursor' not in data['pageInfo']: + raise Exception(f"Error: 'endCursor' key not present in data. Data {data}") + + def __extract_raw_data_into_list(self, data): + + if 'edges' not in data: + raise Exception(f"Error: 'edges' key not present in data. Data {data}") + + data_list = [] + for edge in data['edges']: + + if 'node' not in edge: + raise Exception(f"Error: 'node' key not present in data. Data {data}") + + data_list.append(data['node']) + + return data_list + + + + + + + + + + From 140ea066932a2509c4ff338ca693fe5d508418b9 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:52:05 -0500 Subject: [PATCH 075/176] Improve paginate_resource logic Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/util/github_graphql_data_access.py | 73 ++++++++++++------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 4167d2ed3e..54cf9e7a71 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -31,33 +31,24 @@ def paginate_resource(self, query, variables, result_keys): } params.update(variables) - response = self.make_request_with_retries(query, params) - result_json = response.json() + result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) - self.__raise_exception_for_invalid_total_count(data) - - if int(data["totalCount"]) == 0: + if self.__get_total_count(data) == 0: return yield from self.__extract_raw_data_into_list(data) - - self.__raise_exception_for_invalid_page_info(data) - - while data['pageInfo']['hasNextPage']: - params['cursor'] = data['pageInfo']['endCursor'] + + while self.__has_next_page(): + params["cursor"] = self.__get_next_page_cursor(data) - response = self.make_request_with_retries(query, params) - result_json = response.json() + result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) yield from self.__extract_raw_data_into_list(data) - self.__raise_exception_for_invalid_page_info(data) - - def make_request(self, query, variables={}, timeout=40): with httpx.Client() as client: @@ -163,17 +154,6 @@ def __raise_exception_for_invalid_total_count(self, data): int(data["totalCount"]) except ValueError: raise Exception(f"Error: totalCount is not an integer. Data: {data}") - - def __raise_exception_for_invalid_page_info(self, data): - - if 'pageInfo' not in data: - raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") - - if 'hasNextPage' not in data['pageInfo']: - raise Exception(f"Error: 'hasNextPage' key not present in data. Data {data}") - - if 'endCursor' not in data['pageInfo']: - raise Exception(f"Error: 'endCursor' key not present in data. Data {data}") def __extract_raw_data_into_list(self, data): @@ -189,6 +169,47 @@ def __extract_raw_data_into_list(self, data): data_list.append(data['node']) return data_list + + def __has_next_page(data): + + if 'pageInfo' not in data: + raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") + + if 'hasNextPage' not in data['pageInfo']: + raise Exception(f"Error: 'hasNextPage' key not present in data. Data {data}") + + if not isinstance(data['pageInfo']['hasNextPage'], bool): + raise Exception(f"Error: pageInfo.hasNextPage is not a bool. Data {data}") + + return data['pageInfo']['hasNextPage'] + + def __get_next_page_cursor(data): + + if 'pageInfo' not in data: + raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") + + if 'endCursor' not in data['pageInfo']: + raise Exception(f"Error: 'endCursor' key not present in data. Data {data}") + + return data['pageInfo']['endCursor'] + + def __get_total_count(data): + + if 'totalCount' not in data: + raise Exception(f"Error: totalCount key not found in data. Data: {data}") + + if not data["totalCount"]: + raise Exception(f"Error: totalCount is null. Data: {data}") + + if not data["totalCount"]: + raise Exception(f"Error: totalCount is null. Data: {data}") + + try: + return int(data["totalCount"]) + except ValueError: + raise Exception(f"Error: totalCount is not an integer. Data: {data}") + + From 5577ce04105ef39e878e7dd85ad076e87a4c3eaf Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:53:19 -0500 Subject: [PATCH 076/176] Remove unused method Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/util/github_graphql_data_access.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 54cf9e7a71..485c1de3b3 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -138,22 +138,6 @@ def __extract_data_section(self, keys, json_response): core = core[value] return core - - def __raise_exception_for_invalid_total_count(self, data): - - if 'totalCount' not in data: - raise Exception(f"Error: totalCount key not found in data. Data: {data}") - - if not data["totalCount"]: - raise Exception(f"Error: totalCount is null. Data: {data}") - - if not data["totalCount"]: - raise Exception(f"Error: totalCount is null. Data: {data}") - - try: - int(data["totalCount"]) - except ValueError: - raise Exception(f"Error: totalCount is not an integer. Data: {data}") def __extract_raw_data_into_list(self, data): From 06d2c06126a950c7a8ab9f0edaccba60d48ba2ef Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 08:44:59 -0500 Subject: [PATCH 077/176] Move repo_info to new graphql endpoint Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/repo_info/core.py | 146 ++++++------------ .../github/util/github_graphql_data_access.py | 19 ++- 2 files changed, 62 insertions(+), 103 deletions(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index 0cf6705fca..24e72355ea 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -2,6 +2,7 @@ import json import sqlalchemy as s from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess from augur.tasks.github.util.github_paginator import hit_api from augur.tasks.github.util.util import get_owner_repo from augur.tasks.github.util.gh_graphql_entities import request_graphql_dict @@ -98,123 +99,74 @@ def repo_info_model(key_auth, repo_orm_obj, logger): owner, repo = get_owner_repo(repo_orm_obj.repo_git) - url = 'https://api.github.com/graphql' - - query = """ - { - repository(owner:"%s", name:"%s"){ - updatedAt - hasIssuesEnabled - issues(states:OPEN) { + query = """query($repo: String!, $owner: String!) { + repository(name: $repo, owner: $owner) { + updatedAt + hasIssuesEnabled + issues(states: OPEN) { totalCount - } - hasWikiEnabled - forkCount - defaultBranchRef { + } + hasWikiEnabled + forkCount + defaultBranchRef { name - } - watchers { + } + watchers { totalCount - } - id - licenseInfo { + } + id + licenseInfo { name url - } - stargazers { + } + stargazers { totalCount - } - codeOfConduct { + } + codeOfConduct { name url - } - issue_count: issues { + } + issue_count: issues { totalCount - } - issues_closed: issues(states:CLOSED) { + } + issues_closed: issues(states: CLOSED) { totalCount - } - pr_count: pullRequests { + } + pr_count: pullRequests { totalCount - } - pr_open: pullRequests(states: OPEN) { + } + pr_open: pullRequests(states: OPEN) { totalCount - } - pr_closed: pullRequests(states: CLOSED) { + } + pr_closed: pullRequests(states: CLOSED) { totalCount - } - pr_merged: pullRequests(states: MERGED) { + } + pr_merged: pullRequests(states: MERGED) { totalCount - } - defaultBranchRef { + } + defaultBranchRef { target { ... on Commit { - history { - totalCount - } + history { + totalCount } + } + } } } - } - } - - """ % (owner, repo) - - ############################## - # { - # repository(owner: "chaoss", name: "augur") { - # updatedAt - # hasIssuesEnabled - # issues(states: OPEN) { - # totalCount - # } - # hasWikiEnabled - # forkCount - # defaultBranchRef { - # name - # } - # watchers { - # totalCount - # } - # id - # licenseInfo { - # name - # url - # } - # stargazers { - # totalCount - # } - # codeOfConduct { - # name - # url - # } - # issue_count: issues { - # totalCount - # } - # issues_closed: issues(states: CLOSED) { - # totalCount - # } - # pr_count: pullRequests { - # totalCount - # } - # pr_open: pullRequests(states: OPEN) { - # totalCount - # } - # pr_closed: pullRequests(states: CLOSED) { - # totalCount - # } - # pr_merged: pullRequests(states: MERGED) { - # totalCount - # } - # stargazerCount - # } - # } + } + """ + + github_graphql_data_access = GithubGraphQlDataAccess(key_auth, logger) - try: - data = grab_repo_info_from_graphql_endpoint(key_auth, logger, query) - except Exception as e: - logger.error(f"Could not grab info for repo {repo_orm_obj.repo_id}") - raise e + variables = { + "owner": owner, + "repo": repo + } + + result_keys = ("repository") + + data = github_graphql_data_access.get_resource(query, variables, result_keys) # Get committers count info that requires seperate endpoint committers_count = query_committers_count(key_auth, logger, owner, repo) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 485c1de3b3..99794b5554 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -17,16 +17,26 @@ class UrlNotFoundException(Exception): pass class GithubGraphQlDataAccess: + def __init__(self, key_manager, logger: logging.Logger): self.logger = logger self.key_manager = key_manager + def get_resource(self, query, variables, result_keys): + + result_json = self.make_request_with_retries(query, variables).json() + + data = self.__extract_data_section(result_keys, result_json) + + return self.__extract_raw_data_into_list(data) + + def paginate_resource(self, query, variables, result_keys): params = { - "numRecords" : self.per_page, + "numRecords" : 100, "cursor" : None } params.update(variables) @@ -36,7 +46,7 @@ def paginate_resource(self, query, variables, result_keys): data = self.__extract_data_section(result_keys, result_json) if self.__get_total_count(data) == 0: - return + return yield from self.__extract_raw_data_into_list(data) @@ -49,7 +59,7 @@ def paginate_resource(self, query, variables, result_keys): yield from self.__extract_raw_data_into_list(data) - def make_request(self, query, variables={}, timeout=40): + def make_request(self, query, variables, timeout=40): with httpx.Client() as client: @@ -185,9 +195,6 @@ def __get_total_count(data): if not data["totalCount"]: raise Exception(f"Error: totalCount is null. Data: {data}") - if not data["totalCount"]: - raise Exception(f"Error: totalCount is null. Data: {data}") - try: return int(data["totalCount"]) except ValueError: From fde0ec40c54b2fe69984bc610be6ac3652052d08 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 08:55:25 -0500 Subject: [PATCH 078/176] Migrate pr files to github_graphql_data_access Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/pull_requests/files_model/core.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/augur/tasks/github/pull_requests/files_model/core.py b/augur/tasks/github/pull_requests/files_model/core.py index 983ac67595..6d51698adc 100644 --- a/augur/tasks/github/pull_requests/files_model/core.py +++ b/augur/tasks/github/pull_requests/files_model/core.py @@ -1,6 +1,7 @@ import sqlalchemy as s import httpx from augur.tasks.github.util.gh_graphql_entities import GraphQlPageCollection +from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo from augur.application.db.lib import bulk_insert_dicts, execute_sql @@ -38,6 +39,8 @@ def pull_request_files_model(repo_id,logger, augur_db, key_auth, full_collection repo = execute_session_query(query, 'one') owner, name = get_owner_repo(repo.repo_git) + github_graphql_data_access = GithubGraphQlDataAccess(key_auth, logger) + pr_file_rows = [] logger.info(f"Getting pull request files for repo: {repo.repo_git}") for index, pr_info in enumerate(pr_numbers): @@ -72,24 +75,23 @@ def pull_request_files_model(repo_id,logger, augur_db, key_auth, full_collection 'owner': owner, 'repo': name, 'pr_number': pr_info['pr_src_number'], - 'values': values } - try: - file_collection = GraphQlPageCollection(query, key_auth, logger, bind=params) + for pr_file in github_graphql_data_access.paginate_resource(query, params, values): + + if not pr_file or 'path' not in pr_file: + continue - pr_file_rows += [{ + data = { 'pull_request_id': pr_info['pull_request_id'], 'pr_file_additions': pr_file['additions'] if 'additions' in pr_file else None, 'pr_file_deletions': pr_file['deletions'] if 'deletions' in pr_file else None, 'pr_file_path': pr_file['path'], 'data_source': 'GitHub API', 'repo_id': repo.repo_id, - } for pr_file in file_collection if pr_file and 'path' in pr_file] - except httpx.RequestError as e: - logger.error(f"An error occurred while requesting data from the GitHub API: {e}") - except httpx.HTTPStatusError as e: - logger.error(f"HTTP error occurred while requesting data from the GitHub API: {e}") + } + + pr_file_rows.append(data) if len(pr_file_rows) > 0: # Execute a bulk upsert with sqlalchemy From 06bc536b42c827e1024ee14b35accd1d3a81007d Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 10:27:42 -0500 Subject: [PATCH 079/176] Indent client' Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 99794b5554..9b51756d07 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -70,7 +70,7 @@ def make_request(self, query, variables, timeout=40): if variables: json_dict['variables'] = variables - response = client.post(url=URL,auth=self.key_manager,json=json_dict, timeout=timeout) + response = client.post(url=URL,auth=self.key_manager,json=json_dict, timeout=timeout) if response.status_code in [403, 429]: raise RatelimitException(response) From 2e056182a7dc072d03c51a27fa452f430886f7af Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 10:32:21 -0500 Subject: [PATCH 080/176] Remove strip Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 9b51756d07..e819e8f867 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -135,7 +135,7 @@ def __handle_github_ratelimit_response(self, response): def __extract_data_section(self, keys, json_response): - if not json_response or not json_response.strip(): + if not json_response: raise Exception(f"Empty data returned. Data: {json_response}") if 'data' not in json_response: From ec71977dabd8d04b18819d16d57cb55476613a15 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 10:34:39 -0500 Subject: [PATCH 081/176] Define keys as list Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/pull_requests/files_model/core.py | 2 +- augur/tasks/github/repo_info/core.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/pull_requests/files_model/core.py b/augur/tasks/github/pull_requests/files_model/core.py index 6d51698adc..9b80b99b61 100644 --- a/augur/tasks/github/pull_requests/files_model/core.py +++ b/augur/tasks/github/pull_requests/files_model/core.py @@ -70,7 +70,7 @@ def pull_request_files_model(repo_id,logger, augur_db, key_auth, full_collection } """ - values = ("repository", "pullRequest", "files") + values = ["repository", "pullRequest", "files"] params = { 'owner': owner, 'repo': name, diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index 24e72355ea..fbdae02026 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -164,7 +164,7 @@ def repo_info_model(key_auth, repo_orm_obj, logger): "repo": repo } - result_keys = ("repository") + result_keys = ["repository"] data = github_graphql_data_access.get_resource(query, variables, result_keys) From 034333e8126240930f102d2df560df813fa3ba67 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 10:37:23 -0500 Subject: [PATCH 082/176] Return data properly Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index e819e8f867..04e0fc6717 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -30,7 +30,7 @@ def get_resource(self, query, variables, result_keys): data = self.__extract_data_section(result_keys, result_json) - return self.__extract_raw_data_into_list(data) + return data def paginate_resource(self, query, variables, result_keys): From 93577d77248fdb04716b698b6a9a782e1bb538e0 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:21:55 -0500 Subject: [PATCH 083/176] Add self Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/util/github_graphql_data_access.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 04e0fc6717..8505ff2a0d 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -164,7 +164,7 @@ def __extract_raw_data_into_list(self, data): return data_list - def __has_next_page(data): + def __has_next_page(self, data): if 'pageInfo' not in data: raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") @@ -177,7 +177,7 @@ def __has_next_page(data): return data['pageInfo']['hasNextPage'] - def __get_next_page_cursor(data): + def __get_next_page_cursor(self, data): if 'pageInfo' not in data: raise Exception(f"Error: 'pageInfo' key not present in data. Data {data}") @@ -187,7 +187,7 @@ def __get_next_page_cursor(data): return data['pageInfo']['endCursor'] - def __get_total_count(data): + def __get_total_count(self, data): if 'totalCount' not in data: raise Exception(f"Error: totalCount key not found in data. Data: {data}") @@ -199,15 +199,3 @@ def __get_total_count(data): return int(data["totalCount"]) except ValueError: raise Exception(f"Error: totalCount is not an integer. Data: {data}") - - - - - - - - - - - - From 078bc8a39c8013f88de1f3eae3ccf5493d849381 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:27:18 -0500 Subject: [PATCH 084/176] Fix syntax error Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 8505ff2a0d..a194ea124d 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -160,7 +160,7 @@ def __extract_raw_data_into_list(self, data): if 'node' not in edge: raise Exception(f"Error: 'node' key not present in data. Data {data}") - data_list.append(data['node']) + data_list.append(edge['node']) return data_list From 358b1462d7821a43dd370e3a72a5dab7794ac783 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:31:42 -0500 Subject: [PATCH 085/176] Fix syntax error Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index a194ea124d..d88ed9fa2d 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -50,7 +50,7 @@ def paginate_resource(self, query, variables, result_keys): yield from self.__extract_raw_data_into_list(data) - while self.__has_next_page(): + while self.__has_next_page(data): params["cursor"] = self.__get_next_page_cursor(data) result_json = self.make_request_with_retries(query, params).json() From a96b380cde0c1f3483b170fa701bb022af6518be Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:39:05 -0500 Subject: [PATCH 086/176] Fixes Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/pull_requests/files_model/core.py | 3 --- augur/tasks/github/util/github_graphql_data_access.py | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/augur/tasks/github/pull_requests/files_model/core.py b/augur/tasks/github/pull_requests/files_model/core.py index 9b80b99b61..f1983fa141 100644 --- a/augur/tasks/github/pull_requests/files_model/core.py +++ b/augur/tasks/github/pull_requests/files_model/core.py @@ -1,10 +1,7 @@ import sqlalchemy as s -import httpx -from augur.tasks.github.util.gh_graphql_entities import GraphQlPageCollection from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo -from augur.application.db.lib import bulk_insert_dicts, execute_sql from augur.application.db.util import execute_session_query from augur.application.db.lib import get_secondary_data_last_collected, get_updated_prs diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index d88ed9fa2d..1775fd5494 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -76,7 +76,7 @@ def make_request(self, query, variables, timeout=40): raise RatelimitException(response) if response.status_code == 404: - raise UrlNotFoundException(f"404 for {self.url} with query of {query}") + raise UrlNotFoundException(f"404 for {URL} with query of {query}") response.raise_for_status() @@ -192,7 +192,7 @@ def __get_total_count(self, data): if 'totalCount' not in data: raise Exception(f"Error: totalCount key not found in data. Data: {data}") - if not data["totalCount"]: + if data["totalCount"] is None: raise Exception(f"Error: totalCount is null. Data: {data}") try: From 97af39b8c0f625dcbf2e7d63938bf9082bf3845c Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:44:55 -0500 Subject: [PATCH 087/176] Raise from original exception Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 1775fd5494..7604f3d593 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -197,5 +197,5 @@ def __get_total_count(self, data): try: return int(data["totalCount"]) - except ValueError: - raise Exception(f"Error: totalCount is not an integer. Data: {data}") + except ValueError as exc: + raise Exception(f"Error: totalCount is not an integer. Data: {data}") from exc From ecb7b574aa108e92e55b2fdaf5abdb7dc9d50627 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 15 Jul 2024 18:46:26 -0500 Subject: [PATCH 088/176] Make annoying info log a debug Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/util/random_key_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/util/random_key_auth.py b/augur/tasks/util/random_key_auth.py index c9f865db9e..f2fea35b36 100644 --- a/augur/tasks/util/random_key_auth.py +++ b/augur/tasks/util/random_key_auth.py @@ -33,7 +33,7 @@ def auth_flow(self, request: Request) -> Generator[Request, Response, None]: if self.list_of_keys: key_value = choice(self.list_of_keys) - self.logger.info(f'Key value used in request: {key_value}') + self.logger.debug(f'Key value used in request: {key_value}') # formats the key string into a format GitHub will accept if self.key_format: From 46438df372b822394198fcb7b8bf5ee83b27c6a3 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 17 Jul 2024 16:18:43 +0000 Subject: [PATCH 089/176] updating version Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- README.md | 4 ++-- docker/backend/Dockerfile | 2 +- docker/database/Dockerfile | 2 +- docker/rabbitmq/Dockerfile | 2 +- metadata.py | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e5dde81d04..b5b55526dc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Augur NEW Release v0.76.0 +# Augur NEW Release v0.76.1 Augur is primarily a data engineering tool that makes it possible for data scientists to gather open source software community data. Less data carpentry for everyone else! The primary way of looking at Augur data is through [8Knot](https://github.com/oss-aspen/8knot) ... A public instance of 8Knot is available at https://metrix.chaoss.io ... That is tied to a public instance of Augur at https://ai.chaoss.io @@ -10,7 +10,7 @@ The primary way of looking at Augur data is through [8Knot](https://github.com/o ## NEW RELEASE ALERT! ### [If you want to jump right in, updated docker build/compose and bare metal installation instructions are available here](docs/new-install.md) -Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.76.0 +Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.76.1 - The `main` branch is a stable version of our new architecture, which features: - Dramatic improvement in the speed of large scale data collection (100,000+ repos). All data is obtained for 100k+ repos within 2 weeks. diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 9676b40ce5..892a140ac0 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -2,7 +2,7 @@ FROM python:3.10-bookworm LABEL maintainer="outdoors@acm.org" -LABEL version="0.71.0" +LABEL version="0.76.1" ENV DEBIAN_FRONTEND=noninteractive diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index df88b16c1e..c384d0f306 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -2,7 +2,7 @@ FROM postgres:14 LABEL maintainer="outdoors@acm.org" -LABEL version="0.71.0" +LABEL version="0.76.1" ENV POSTGRES_DB "test" ENV POSTGRES_USER "augur" diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile index 266bec64a5..6b020e6412 100644 --- a/docker/rabbitmq/Dockerfile +++ b/docker/rabbitmq/Dockerfile @@ -1,7 +1,7 @@ FROM rabbitmq:3.12-management-alpine LABEL maintainer="574/augur@simplelogin.com" -LABEL version="0.71.0" +LABEL version="0.76.1" ARG RABBIT_MQ_DEFAULT_USER=augur ARG RABBIT_MQ_DEFAULT_PASSWORD=password123 diff --git a/metadata.py b/metadata.py index d7b4ac37a2..5cc02b504c 100644 --- a/metadata.py +++ b/metadata.py @@ -5,8 +5,8 @@ __short_description__ = "Python 3 package for free/libre and open-source software community metrics, models & data collection" -__version__ = "0.76.0" -__release__ = "v0.76.0 (England's Favorite Traitors)" +__version__ = "0.76.1" +__release__ = "v0.76.1 (For the Good of the Data)" __license__ = "MIT" __copyright__ = "University of Missouri, University of Nebraska-Omaha, CHAOSS, Brian Warner & Augurlabs 2024" From f3cb92a88ac8579f78e8afa4c56bc5d5735c8123 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 18:02:37 -0500 Subject: [PATCH 090/176] Address release bugs Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/messages.py | 8 ++++++-- augur/tasks/github/pull_requests/tasks.py | 11 +++++++---- augur/tasks/github/util/github_graphql_data_access.py | 4 ++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/augur/tasks/github/messages.py b/augur/tasks/github/messages.py index d47107c163..86fbe054fa 100644 --- a/augur/tasks/github/messages.py +++ b/augur/tasks/github/messages.py @@ -4,7 +4,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 * -from augur.tasks.github.util.github_data_access import GithubDataAccess +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.tasks.github.util.github_task_session import GithubTaskManifest from augur.tasks.util.worker_util import remove_duplicate_dicts from augur.tasks.github.util.util import get_owner_repo @@ -97,7 +97,11 @@ def process_large_issue_and_pr_message_collection(repo_id, repo_git: str, logger all_data = [] for comment_url in comment_urls: - messages = list(github_data_access.paginate_resource(comment_url)) + try: + messages = list(github_data_access.paginate_resource(comment_url)) + except UrlNotFoundException as e: + logger.warning(e) + continue all_data += messages diff --git a/augur/tasks/github/pull_requests/tasks.py b/augur/tasks/github/pull_requests/tasks.py index 017cf36385..c581ceb357 100644 --- a/augur/tasks/github/pull_requests/tasks.py +++ b/augur/tasks/github/pull_requests/tasks.py @@ -5,8 +5,7 @@ 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 * -from augur.tasks.github.util.github_data_access import GithubDataAccess -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.tasks.util.worker_util import remove_duplicate_dicts from augur.tasks.github.util.util import add_key_value_pair_to_dicts, get_owner_repo from augur.application.db.models import PullRequest, Message, PullRequestReview, PullRequestLabel, PullRequestReviewer, PullRequestMeta, PullRequestAssignee, PullRequestReviewMessageRef, Contributor, Repo @@ -359,8 +358,12 @@ def collect_pull_request_reviews(repo_git: str, full_collection: bool) -> None: pr_review_url = f"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}/reviews" - pr_reviews = list(github_data_access.paginate_resource(pr_review_url)) - + try: + pr_reviews = list(github_data_access.paginate_resource(pr_review_url)) + except UrlNotFoundException as e: + logger.warning(e) + continue + if pr_reviews: all_pr_reviews[pull_request_id] = pr_reviews diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 7604f3d593..aca316361d 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -145,6 +145,10 @@ def __extract_data_section(self, keys, json_response): # iterate deeper into the json_response object until we get to the desired data for value in keys: + + if core is None: + raise Exception(f"Error: 'core' is None when trying to index by {value}. Response: {json_response}") + core = core[value] return core From 3b3f42a6ba483f62ce9b5f13a53dedeb6a57f407 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 18:55:52 -0500 Subject: [PATCH 091/176] Raise exceptions on graphql errors Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/util/github_graphql_data_access.py | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index aca316361d..e5474a57c1 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -13,7 +13,7 @@ def __init__(self, response, message="Github Rate limit exceeded") -> None: super().__init__(message) -class UrlNotFoundException(Exception): +class NotFoundException(Exception): pass class GithubGraphQlDataAccess: @@ -72,14 +72,21 @@ def make_request(self, query, variables, timeout=40): response = client.post(url=URL,auth=self.key_manager,json=json_dict, timeout=timeout) - if response.status_code in [403, 429]: - raise RatelimitException(response) - - if response.status_code == 404: - raise UrlNotFoundException(f"404 for {URL} with query of {query}") - response.raise_for_status() + json_response = response.json() + if "errors" in json_response and len(json_response["errors"]) > 0: + errors = json_response["errors"] + + # Find the first NOT_FOUND error + not_found_error = self.__find_first_error_of_type(errors, "NOT_FOUND") + + if not_found_error: + message = not_found_error.get("message", "Resource not found.") + raise NotFoundException(f"Could not find: {message}") + + raise Exception(f"Github Graphql Data Access Errors: {errors}") + return response @@ -93,7 +100,7 @@ def make_request_with_retries(self, query, variables, timeout=100): except RetryError as e: raise e.last_attempt.exception() - @retry(stop=stop_after_attempt(10), wait=wait_fixed(5), retry=retry_if_exception(lambda exc: not isinstance(exc, UrlNotFoundException))) + @retry(stop=stop_after_attempt(10), wait=wait_fixed(5), retry=retry_if_exception(lambda exc: not isinstance(exc, NotFoundException))) def __make_request_with_retries(self, query, variables, timeout=40): """ What method does? 1. Retires 10 times @@ -203,3 +210,7 @@ def __get_total_count(self, data): return int(data["totalCount"]) except ValueError as exc: raise Exception(f"Error: totalCount is not an integer. Data: {data}") from exc + + def __find_first_error_of_type(errors, type): + + return next((error for error in errors if error.get("type").lower() == type.lower()), None) From cbdcfff4ca0df0dfb018e7c547642007c2de9405 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:00:53 -0500 Subject: [PATCH 092/176] Remove comment Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 1 - 1 file changed, 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index e5474a57c1..fe64ba1290 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -78,7 +78,6 @@ def make_request(self, query, variables, timeout=40): if "errors" in json_response and len(json_response["errors"]) > 0: errors = json_response["errors"] - # Find the first NOT_FOUND error not_found_error = self.__find_first_error_of_type(errors, "NOT_FOUND") if not_found_error: From e208c033cc929bacc6cb441411cd53c918d8ace5 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:13:23 -0500 Subject: [PATCH 093/176] Fix syntax error Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index fe64ba1290..e588444043 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -210,6 +210,6 @@ def __get_total_count(self, data): except ValueError as exc: raise Exception(f"Error: totalCount is not an integer. Data: {data}") from exc - def __find_first_error_of_type(errors, type): + def __find_first_error_of_type(self, errors, type): return next((error for error in errors if error.get("type").lower() == type.lower()), None) From afd7c188165924279536a6fdc76d9a6bb4ad8430 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:23:29 -0500 Subject: [PATCH 094/176] Catch not found for prs Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../github/pull_requests/files_model/core.py | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/augur/tasks/github/pull_requests/files_model/core.py b/augur/tasks/github/pull_requests/files_model/core.py index f1983fa141..01407eb801 100644 --- a/augur/tasks/github/pull_requests/files_model/core.py +++ b/augur/tasks/github/pull_requests/files_model/core.py @@ -1,5 +1,5 @@ import sqlalchemy as s -from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess +from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess, NotFoundException from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo from augur.application.db.util import execute_session_query @@ -74,21 +74,25 @@ def pull_request_files_model(repo_id,logger, augur_db, key_auth, full_collection 'pr_number': pr_info['pr_src_number'], } - for pr_file in github_graphql_data_access.paginate_resource(query, params, values): + try: + for pr_file in github_graphql_data_access.paginate_resource(query, params, values): - if not pr_file or 'path' not in pr_file: - continue + if not pr_file or 'path' not in pr_file: + continue - data = { - 'pull_request_id': pr_info['pull_request_id'], - 'pr_file_additions': pr_file['additions'] if 'additions' in pr_file else None, - 'pr_file_deletions': pr_file['deletions'] if 'deletions' in pr_file else None, - 'pr_file_path': pr_file['path'], - 'data_source': 'GitHub API', - 'repo_id': repo.repo_id, - } + data = { + 'pull_request_id': pr_info['pull_request_id'], + 'pr_file_additions': pr_file['additions'] if 'additions' in pr_file else None, + 'pr_file_deletions': pr_file['deletions'] if 'deletions' in pr_file else None, + 'pr_file_path': pr_file['path'], + 'data_source': 'GitHub API', + 'repo_id': repo.repo_id, + } - pr_file_rows.append(data) + pr_file_rows.append(data) + except NotFoundException as e: + logger.warning(e) + continue if len(pr_file_rows) > 0: # Execute a bulk upsert with sqlalchemy From 42e7ad8a9e69bd73a7c540d5eab0f177c7dbe2db Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:36:49 -0500 Subject: [PATCH 095/176] Throw exception when data is none Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index e588444043..b7586496a6 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -157,6 +157,9 @@ def __extract_data_section(self, keys, json_response): core = core[value] + if core is None: + raise Exception(f"Error: data section of response is None. Response: {json_response}") + return core def __extract_raw_data_into_list(self, data): From 84b97f4ea421c354d7b5205f9e14d20b996b48a7 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:46:16 -0500 Subject: [PATCH 096/176] try this Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index b7586496a6..3af16366da 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -44,6 +44,8 @@ def paginate_resource(self, query, variables, result_keys): result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) + if data is None: + raise Exception(f"Error: data section of response is None. Query: {query}. Response: {result_json}") if self.__get_total_count(data) == 0: return @@ -56,6 +58,8 @@ def paginate_resource(self, query, variables, result_keys): result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) + if data is None: + raise Exception(f"Error: data section of response is None. Query: {query}. Response: {result_json}") yield from self.__extract_raw_data_into_list(data) @@ -157,8 +161,6 @@ def __extract_data_section(self, keys, json_response): core = core[value] - if core is None: - raise Exception(f"Error: data section of response is None. Response: {json_response}") return core From 44da38346e7a0cf568602c2134339e510cfba161 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 19:52:15 -0500 Subject: [PATCH 097/176] Add variables Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_graphql_data_access.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index 3af16366da..b39799f5b8 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -45,7 +45,7 @@ def paginate_resource(self, query, variables, result_keys): data = self.__extract_data_section(result_keys, result_json) if data is None: - raise Exception(f"Error: data section of response is None. Query: {query}. Response: {result_json}") + raise Exception(f"Error: data section of response is None. Variables: {variables}. Query: {query}. Response: {result_json}") if self.__get_total_count(data) == 0: return @@ -59,7 +59,7 @@ def paginate_resource(self, query, variables, result_keys): data = self.__extract_data_section(result_keys, result_json) if data is None: - raise Exception(f"Error: data section of response is None. Query: {query}. Response: {result_json}") + raise Exception(f"Error: data section of response is None. Variables: {variables}. Query: {query}. Response: {result_json}") yield from self.__extract_raw_data_into_list(data) From 4b368e4322021f26cf50a050b9412c807d4af609 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 22 Jul 2024 20:19:35 -0500 Subject: [PATCH 098/176] Handle case where api returns None Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/pull_requests/files_model/core.py | 4 ++-- augur/tasks/github/util/github_graphql_data_access.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/augur/tasks/github/pull_requests/files_model/core.py b/augur/tasks/github/pull_requests/files_model/core.py index 01407eb801..badc86cd38 100644 --- a/augur/tasks/github/pull_requests/files_model/core.py +++ b/augur/tasks/github/pull_requests/files_model/core.py @@ -1,5 +1,5 @@ import sqlalchemy as s -from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess, NotFoundException +from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess, NotFoundException, InvalidDataException from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo from augur.application.db.util import execute_session_query @@ -90,7 +90,7 @@ def pull_request_files_model(repo_id,logger, augur_db, key_auth, full_collection } pr_file_rows.append(data) - except NotFoundException as e: + except (NotFoundException, InvalidDataException) as e: logger.warning(e) continue diff --git a/augur/tasks/github/util/github_graphql_data_access.py b/augur/tasks/github/util/github_graphql_data_access.py index b39799f5b8..7d8c6851e1 100644 --- a/augur/tasks/github/util/github_graphql_data_access.py +++ b/augur/tasks/github/util/github_graphql_data_access.py @@ -16,6 +16,9 @@ def __init__(self, response, message="Github Rate limit exceeded") -> None: class NotFoundException(Exception): pass +class InvalidDataException(Exception): + pass + class GithubGraphQlDataAccess: @@ -44,8 +47,6 @@ def paginate_resource(self, query, variables, result_keys): result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) - if data is None: - raise Exception(f"Error: data section of response is None. Variables: {variables}. Query: {query}. Response: {result_json}") if self.__get_total_count(data) == 0: return @@ -58,8 +59,6 @@ def paginate_resource(self, query, variables, result_keys): result_json = self.make_request_with_retries(query, params).json() data = self.__extract_data_section(result_keys, result_json) - if data is None: - raise Exception(f"Error: data section of response is None. Variables: {variables}. Query: {query}. Response: {result_json}") yield from self.__extract_raw_data_into_list(data) @@ -161,6 +160,8 @@ def __extract_data_section(self, keys, json_response): core = core[value] + if core is None: + raise InvalidDataException(f"Error: The data section is null. Unable to process") return core From a5081be0dee8161737fc66c1c71e839960d528ab Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 09:20:09 -0500 Subject: [PATCH 099/176] collection tweak Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/application/cli/backend.py | 2 +- augur/application/cli/collection.py | 2 +- augur/application/cli/tasks.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/application/cli/backend.py b/augur/application/cli/backend.py index d3848cd4e6..f470675d1b 100644 --- a/augur/application/cli/backend.py +++ b/augur/application/cli/backend.py @@ -194,7 +194,7 @@ def determine_worker_processes(ratio,maximum): sleep_time += 6 #60% of estimate, Maximum value of 45 : Reduced because it can be lower - core_num_processes = determine_worker_processes(.40, 50) + core_num_processes = determine_worker_processes(.40, 90) logger.info(f"Starting core worker processes with concurrency={core_num_processes}") core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h" process_list.append(subprocess.Popen(core_worker.split(" "))) diff --git a/augur/application/cli/collection.py b/augur/application/cli/collection.py index a7666aa118..84bbd5cbae 100644 --- a/augur/application/cli/collection.py +++ b/augur/application/cli/collection.py @@ -126,7 +126,7 @@ def determine_worker_processes(ratio,maximum): sleep_time += 6 #60% of estimate, Maximum value of 45: Reduced because not needed - core_num_processes = determine_worker_processes(.40, 50) + core_num_processes = determine_worker_processes(.40, 90) logger.info(f"Starting core worker processes with concurrency={core_num_processes}") core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency={core_num_processes} -n core:{uuid.uuid4().hex}@%h" process_list.append(subprocess.Popen(core_worker.split(" "))) diff --git a/augur/application/cli/tasks.py b/augur/application/cli/tasks.py index bb2344db38..7072c1ad31 100644 --- a/augur/application/cli/tasks.py +++ b/augur/application/cli/tasks.py @@ -36,7 +36,7 @@ def start(): secondary_worker_process = None scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling" - core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n core:{uuid.uuid4().hex}@%h" + core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=90 -n core:{uuid.uuid4().hex}@%h" secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" ")) From 49f1f5bea03f358267349fa4da312f3ec1e84ece Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 09:21:35 -0500 Subject: [PATCH 100/176] update to collection Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/application/cli/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/application/cli/tasks.py b/augur/application/cli/tasks.py index 7072c1ad31..f760dfddeb 100644 --- a/augur/application/cli/tasks.py +++ b/augur/application/cli/tasks.py @@ -37,7 +37,7 @@ def start(): scheduling_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=1 -n scheduling:{uuid.uuid4().hex}@%h -Q scheduling" core_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=90 -n core:{uuid.uuid4().hex}@%h" - secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=50 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" + secondary_worker = f"celery -A augur.tasks.init.celery_app.celery_app worker -l info --concurrency=20 -n secondary:{uuid.uuid4().hex}@%h -Q secondary" scheduling_worker_process = subprocess.Popen(scheduling_worker.split(" ")) core_worker_process = subprocess.Popen(core_worker.split(" ")) From 50f290906762f0a0dfc5e53016592ae866071a6a Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 12:52:20 -0500 Subject: [PATCH 101/176] updated docker schema Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/database/augur-new-schema.sql | 4635 +++++---- docker/database/augur-retired-sql.schema | 10330 +++++++++++++++++++++ docs/new-install.md | 4 +- 3 files changed, 13385 insertions(+), 1584 deletions(-) create mode 100644 docker/database/augur-retired-sql.schema diff --git a/docker/database/augur-new-schema.sql b/docker/database/augur-new-schema.sql index ac3872a1d5..3731ae2aec 100644 --- a/docker/database/augur-new-schema.sql +++ b/docker/database/augur-new-schema.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) --- Dumped by pg_dump version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) +-- Dumped from database version 16.3 (Homebrew) +-- Dumped by pg_dump version 16.3 (Homebrew) SET statement_timeout = 0; SET lock_timeout = 0; @@ -140,10 +140,10 @@ CREATE TABLE augur_data.analysis_log ( ALTER TABLE augur_data.analysis_log OWNER TO augur; -- --- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" +CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -151,180 +151,127 @@ CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" CACHE 1; -ALTER TABLE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; - --- --- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; -- --- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.chaoss_metric_status ( - cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, - cm_group character varying, - cm_source character varying, - cm_type character varying, - cm_backend_status character varying, - cm_frontend_status character varying, - cm_defined boolean, - cm_api_endpoint_repo character varying, - cm_api_endpoint_rg character varying, - cm_name character varying, - cm_working_group character varying, - cm_info json, +CREATE TABLE augur_data.pull_requests ( + pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, + repo_id bigint DEFAULT 0, + pr_url character varying, + pr_src_id bigint, + pr_src_node_id character varying, + pr_html_url character varying, + pr_diff_url character varying, + pr_patch_url character varying, + pr_issue_url character varying, + pr_augur_issue_id bigint, + pr_src_number bigint, + pr_src_state character varying, + pr_src_locked boolean, + pr_src_title character varying, + pr_body text, + pr_created_at timestamp(0) without time zone, + pr_updated_at timestamp(0) without time zone, + pr_closed_at timestamp(0) without time zone, + pr_merged_at timestamp(0) without time zone, + pr_merge_commit_sha character varying, + pr_teams bigint, + pr_milestone character varying, + pr_commits_url character varying, + pr_review_comments_url character varying, + pr_review_comment_url character varying, + pr_comments_url character varying, + pr_statuses_url character varying, + pr_meta_head_id character varying, + pr_meta_base_id character varying, + pr_src_issue_url character varying, + pr_src_comments_url character varying, + pr_src_review_comments_url character varying, + pr_src_commits_url character varying, + pr_src_statuses_url character varying, + pr_src_author_association character varying, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cm_working_group_focus_area character varying + pr_augur_contributor_id uuid ); -ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; - --- --- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; - +ALTER TABLE augur_data.pull_requests OWNER TO augur; -- --- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.chaoss_user ( - chaoss_id bigint NOT NULL, - chaoss_login_name character varying, - chaoss_login_hashword character varying, - chaoss_email character varying, - chaoss_text_phone character varying, - chaoss_first_name character varying, - chaoss_last_name character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT now() -); - +COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; -ALTER TABLE augur_data.chaoss_user OWNER TO augur; -- --- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; -ALTER TABLE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; -- --- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur -- -ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; +COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; -- --- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; -ALTER TABLE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; -- --- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.commit_comment_ref ( - cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, - cmt_id bigint NOT NULL, - repo_id bigint, - msg_id bigint NOT NULL, - user_id bigint NOT NULL, - body text, - line bigint, - "position" bigint, - commit_comment_src_node_id character varying, - cmt_comment_src_id bigint NOT NULL, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - +COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; -ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; -- --- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; -- --- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; -- --- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.commit_parents_parent_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; -ALTER TABLE augur_data.commit_parents_parent_id_seq OWNER TO augur; -- --- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repo_prs; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.commit_parents ( - cmt_id bigint NOT NULL, - parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +CREATE MATERIALIZED VIEW augur_data.api_get_all_repo_prs AS + SELECT repo_id, + count(*) AS pull_requests_all_time + FROM augur_data.pull_requests + GROUP BY repo_id + WITH NO DATA; -ALTER TABLE augur_data.commit_parents OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.api_get_all_repo_prs OWNER TO augur; -- -- Name: commits_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur @@ -338,7 +285,7 @@ CREATE SEQUENCE augur_data.commits_cmt_id_seq CACHE 1; -ALTER TABLE augur_data.commits_cmt_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commits_cmt_id_seq OWNER TO augur; -- -- Name: commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -352,12 +299,12 @@ CREATE TABLE augur_data.commits ( cmt_author_raw_email character varying NOT NULL, cmt_author_email character varying NOT NULL, cmt_author_date character varying(10) NOT NULL, - cmt_author_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_author_affiliation character varying, cmt_committer_name character varying NOT NULL, cmt_committer_raw_email character varying NOT NULL, cmt_committer_email character varying NOT NULL, cmt_committer_date character varying NOT NULL, - cmt_committer_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_committer_affiliation character varying, cmt_added integer NOT NULL, cmt_removed integer NOT NULL, cmt_whitespace integer NOT NULL, @@ -373,7 +320,8 @@ CREATE TABLE augur_data.commits ( data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, cmt_ght_author_id uuid -); +) +WITH (autovacuum_vacuum_scale_factor='0', autovacuum_vacuum_threshold='1000'); ALTER TABLE augur_data.commits OWNER TO augur; @@ -387,125 +335,113 @@ Each row represents changes to one FILE within a single commit. So you will enco -- --- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repos_commits; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq - START WITH 25430 +CREATE MATERIALIZED VIEW augur_data.api_get_all_repos_commits AS + SELECT repo_id, + count(DISTINCT cmt_commit_hash) AS commits_all_time + FROM augur_data.commits + GROUP BY repo_id + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.api_get_all_repos_commits OWNER TO augur; + +-- +-- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_seq + START WITH 31000 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_seq OWNER TO augur; -- --- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributor_affiliations ( - ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, - ca_domain character varying(64) NOT NULL, - ca_start_date date DEFAULT '1970-01-01'::date, - ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - ca_affiliation character varying, - ca_active smallint DEFAULT 1, +CREATE TABLE augur_data.issues ( + issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, + repo_id bigint, + pull_request bigint, + pull_request_id bigint, + created_at timestamp(0) without time zone, + issue_title character varying, + issue_body character varying, + comment_count bigint, + updated_at timestamp(0) without time zone, + closed_at timestamp(0) without time zone, + due_on timestamp(0) without time zone, + repository_url character varying, + issue_url character varying, + labels_url character varying, + comments_url character varying, + events_url character varying, + html_url character varying, + issue_state character varying, + issue_node_id character varying, + gh_issue_number bigint, + gh_issue_id bigint, + gh_user_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + reporter_id uuid, + cntrb_id uuid ); -ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; +ALTER TABLE augur_data.issues OWNER TO augur; -- --- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; +COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; -- --- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - +COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; -ALTER TABLE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; -- --- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: api_get_all_repos_issues; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributor_repo ( - cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, - repo_git character varying NOT NULL, - repo_name character varying NOT NULL, - gh_repo_id bigint NOT NULL, - cntrb_category character varying, - event_id bigint, - created_at timestamp(0) without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL -); +CREATE MATERIALIZED VIEW augur_data.api_get_all_repos_issues AS + SELECT repo_id, + count(*) AS issues_all_time + FROM augur_data.issues + WHERE (pull_request IS NULL) + GROUP BY repo_id + WITH NO DATA; -ALTER TABLE augur_data.contributor_repo OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.api_get_all_repos_issues OWNER TO augur; -- --- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. -From: [ - { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - } -] -'; - - --- --- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; - - --- --- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur --- +CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; +ALTER SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; -- -- Name: contributors; Type: TABLE; Schema: augur_data; Owner: augur @@ -731,53 +667,63 @@ https://gitlab.com/api/v4/users?search=outdoors@acm.org -- --- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.issue_events_event_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_events_event_id_seq OWNER TO augur; -- --- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.contributors_aliases ( - cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, - canonical_email character varying NOT NULL, - alias_email character varying NOT NULL, - cntrb_active smallint DEFAULT 1 NOT NULL, - cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, +CREATE TABLE augur_data.issue_events ( + event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, + issue_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + node_id character varying, + node_url character varying, + platform_id bigint NOT NULL, + issue_event_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL + cntrb_id uuid ); -ALTER TABLE augur_data.contributors_aliases OWNER TO augur; +ALTER TABLE augur_data.issue_events OWNER TO augur; -- --- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. +COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; -The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + +-- +-- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; -- --- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq +CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -785,149 +731,168 @@ CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq CACHE 1; -ALTER TABLE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; -- --- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_cntrb_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE TABLE augur_data.issue_message_ref ( + issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + msg_id bigint, + issue_msg_ref_src_node_id character varying, + issue_msg_ref_src_comment_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -ALTER TABLE augur_data.contributors_cntrb_id_seq OWNER TO augur; +ALTER TABLE augur_data.issue_message_ref OWNER TO augur; -- --- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; -ALTER TABLE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; -- --- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 - START WITH 1 +CREATE SEQUENCE augur_data.message_msg_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.message_msg_id_seq OWNER TO augur; -- --- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: message; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.discourse_insights ( - msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, - msg_id bigint, - discourse_act character varying, +CREATE TABLE augur_data.message ( + msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, + rgls_id bigint, + platform_msg_id bigint, + platform_node_id character varying, + repo_id bigint, + msg_text character varying, + msg_timestamp timestamp(0) without time zone, + msg_sender_email character varying, + msg_header character varying, + pltfrm_id bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid ); -ALTER TABLE augur_data.discourse_insights OWNER TO augur; +ALTER TABLE augur_data.message OWNER TO augur; -- --- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; +COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; -- --- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; -- --- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_annual ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE TABLE augur_data.pull_request_events ( + pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + issue_event_src_id bigint, + node_id character varying, + node_url character varying, + platform_id bigint DEFAULT 25150 NOT NULL, + pr_platform_event_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid ); -ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; +ALTER TABLE augur_data.pull_request_events OWNER TO augur; -- --- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_annual ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; -ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; +-- +-- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + -- --- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_monthly ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - month smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_message_ref ( + pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + msg_id bigint, + pr_message_ref_src_comment_id bigint, + pr_message_ref_src_node_id character varying, + pr_issue_url character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -935,71 +900,85 @@ CREATE TABLE augur_data.dm_repo_group_monthly ( ); -ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; +ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; -- --- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_group_weekly ( - repo_group_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - week smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); +CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; -- --- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_monthly ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - month smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE TABLE augur_data.pull_request_reviews ( + pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + pr_review_author_association character varying, + pr_review_state character varying, + pr_review_body character varying, + pr_review_submitted_at timestamp(6) without time zone, + pr_review_src_id bigint, + pr_review_node_id character varying, + pr_review_html_url character varying, + pr_review_pull_request_url character varying, + pr_review_commit_id character varying, + platform_id bigint DEFAULT 25150, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; +ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; -- --- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.dm_repo_weekly ( - repo_id bigint NOT NULL, - email character varying NOT NULL, - affiliation character varying DEFAULT 'NULL'::character varying, - week smallint NOT NULL, - year smallint NOT NULL, - added bigint NOT NULL, - removed bigint NOT NULL, - whitespace bigint NOT NULL, - files bigint NOT NULL, - patches bigint NOT NULL, +CREATE SEQUENCE augur_data.repo_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.repo_repo_id_seq OWNER TO augur; + +-- +-- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo ( + repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + repo_git character varying NOT NULL, + repo_path character varying DEFAULT 'NULL'::character varying, + repo_name character varying DEFAULT 'NULL'::character varying, + repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + repo_type character varying DEFAULT ''::character varying, + url character varying, + owner_id integer, + description character varying, + primary_language character varying, + created_at character varying, + forked_from character varying, + updated_at timestamp(0) without time zone, + repo_archived_date_collected timestamp(0) with time zone, + repo_archived integer, tool_source character varying, tool_version character varying, data_source character varying, @@ -1007,27 +986,134 @@ CREATE TABLE augur_data.dm_repo_weekly ( ); -ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; +ALTER TABLE augur_data.repo OWNER TO augur; -- --- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.exclude ( - id integer NOT NULL, - projects_id integer NOT NULL, - email character varying DEFAULT 'NULL'::character varying, - domain character varying DEFAULT 'NULL'::character varying -); +COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; -ALTER TABLE augur_data.exclude OWNER TO augur; +-- +-- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; + -- --- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: augur_new_contributors; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.augur_new_contributors AS + SELECT a.id AS cntrb_id, + a.created_at, + a.repo_id, + a.action, + repo.repo_name, + a.login, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT commits.cmt_ght_author_id AS id, + commits.cmt_author_timestamp AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_id)::text = (commits.cmt_ght_author_id)::text))) + GROUP BY commits.cmt_commit_hash, commits.cmt_ght_author_id, commits.repo_id, commits.cmt_author_timestamp, 'commit'::text, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + WHERE (issues.pull_request IS NULL) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests.pr_merged_at IS NULL) AND ((pull_request_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_merged'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND ((pull_request_events.action)::text = 'merged'::text)) + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + (augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND ((issue_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_reviews.cntrb_id AS id, + pull_request_reviews.pr_review_submitted_at AS created_at, + pull_requests.repo_id, + ('pull_request_review_'::text || (pull_request_reviews.pr_review_state)::text) AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_reviews + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_reviews.cntrb_id))) + WHERE (pull_requests.pull_request_id = pull_request_reviews.pull_request_id) + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'pull_request_open'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.closed_at <> message.msg_timestamp))) a, + augur_data.repo + WHERE (a.repo_id = repo.repo_id) + ORDER BY a.created_at DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.augur_new_contributors OWNER TO augur; + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq +CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1035,47 +1121,89 @@ CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq CACHE 1; -ALTER TABLE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; -- --- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_assignees ( - issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - issue_assignee_src_id bigint, - issue_assignee_src_node character varying, +CREATE TABLE augur_data.chaoss_metric_status ( + cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, + cm_group character varying, + cm_source character varying, + cm_type character varying, + cm_backend_status character varying, + cm_frontend_status character varying, + cm_defined boolean, + cm_api_endpoint_repo character varying, + cm_api_endpoint_rg character varying, + cm_name character varying, + cm_working_group character varying, + cm_info json, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + cm_working_group_focus_area character varying ); -ALTER TABLE augur_data.issue_assignees OWNER TO augur; +ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; -- --- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; +COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; -- --- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; +CREATE TABLE augur_data.chaoss_user ( + chaoss_id bigint NOT NULL, + chaoss_login_name character varying, + chaoss_login_hashword character varying, + chaoss_email character varying, + chaoss_text_phone character varying, + chaoss_first_name character varying, + chaoss_last_name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT now() +); +ALTER TABLE augur_data.chaoss_user OWNER TO augur; + -- --- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_events_event_id_seq +CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1083,52 +1211,52 @@ CREATE SEQUENCE augur_data.issue_events_event_id_seq CACHE 1; -ALTER TABLE augur_data.issue_events_event_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; -- --- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_events ( - event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, - issue_id bigint NOT NULL, +CREATE TABLE augur_data.commit_comment_ref ( + cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, + cmt_id bigint NOT NULL, repo_id bigint, - action character varying NOT NULL, - action_commit_hash character varying, + msg_id bigint NOT NULL, + user_id bigint NOT NULL, + body text, + line bigint, + "position" bigint, + commit_comment_src_node_id character varying, + cmt_comment_src_id bigint NOT NULL, created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - node_id character varying, - node_url character varying, - platform_id bigint NOT NULL, - issue_event_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.issue_events OWNER TO augur; +ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; -- --- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; +COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; -- --- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; +COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; -- --- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq +CREATE SEQUENCE augur_data.commit_parents_parent_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1136,21 +1264,15 @@ CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq CACHE 1; -ALTER TABLE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.commit_parents_parent_id_seq OWNER TO augur; -- --- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_labels ( - issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - label_text character varying, - label_description character varying, - label_color character varying, - label_src_id bigint, - label_src_node_id character varying, +CREATE TABLE augur_data.commit_parents ( + cmt_id bigint NOT NULL, + parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, @@ -1158,20 +1280,13 @@ CREATE TABLE augur_data.issue_labels ( ); -ALTER TABLE augur_data.issue_labels OWNER TO augur; - --- --- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; - +ALTER TABLE augur_data.commit_parents OWNER TO augur; -- --- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq +CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1179,19 +1294,19 @@ CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq CACHE 1; -ALTER TABLE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; -- --- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issue_message_ref ( - issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, - issue_id bigint, - repo_id bigint, - msg_id bigint, - issue_msg_ref_src_node_id character varying, - issue_msg_ref_src_comment_id bigint, +CREATE TABLE augur_data.contributor_affiliations ( + ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, + ca_domain character varying(64) NOT NULL, + ca_start_date date DEFAULT '1970-01-01'::date, + ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + ca_affiliation character varying, + ca_active smallint DEFAULT 1, tool_source character varying, tool_version character varying, data_source character varying, @@ -1199,138 +1314,143 @@ CREATE TABLE augur_data.issue_message_ref ( ); -ALTER TABLE augur_data.issue_message_ref OWNER TO augur; - --- --- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; - +ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; -- --- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; +COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; -- --- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.issue_seq - START WITH 31000 +CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.issue_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; -- --- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.issues ( - issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, - repo_id bigint, - pull_request bigint, - pull_request_id bigint, +CREATE TABLE augur_data.contributor_repo ( + cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, + repo_git character varying NOT NULL, + repo_name character varying NOT NULL, + gh_repo_id bigint NOT NULL, + cntrb_category character varying, + event_id bigint, created_at timestamp(0) without time zone, - issue_title character varying, - issue_body character varying, - comment_count bigint, - updated_at timestamp(0) without time zone, - closed_at timestamp(0) without time zone, - due_on timestamp(0) without time zone, - repository_url character varying, - issue_url character varying, - labels_url character varying, - comments_url character varying, - events_url character varying, - html_url character varying, - issue_state character varying, - issue_node_id character varying, - gh_issue_number bigint, - gh_issue_id bigint, - gh_user_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - reporter_id uuid, - cntrb_id uuid + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.issues OWNER TO augur; +ALTER TABLE augur_data.contributor_repo OWNER TO augur; -- --- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; +COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. +From: [ + { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + } +] +'; -- --- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; +COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; -- --- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.libraries_library_id_seq - START WITH 25430 +COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.libraries_library_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; -- --- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.libraries ( - library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, - repo_id bigint, - platform character varying, - name character varying, - created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - library_description character varying(2000) DEFAULT NULL::character varying, - keywords character varying, - library_homepage character varying(1000) DEFAULT NULL::character varying, - license character varying, - version_count integer, - latest_release_timestamp character varying, - latest_release_number character varying, - package_manager_id character varying, - dependency_count integer, - dependent_library_count integer, - primary_language character varying, +CREATE TABLE augur_data.contributors_aliases ( + cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, + canonical_email character varying NOT NULL, + alias_email character varying NOT NULL, + cntrb_active smallint DEFAULT 1 NOT NULL, + cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL ); -ALTER TABLE augur_data.libraries OWNER TO augur; +ALTER TABLE augur_data.contributors_aliases OWNER TO augur; -- --- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq +COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. + +The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1338,33 +1458,27 @@ CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq CACHE 1; -ALTER TABLE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; -- --- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.library_dependencies ( - lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, - library_id bigint, - manifest_platform character varying, - manifest_filepath character varying(1000) DEFAULT NULL::character varying, - manifest_kind character varying, - repo_id_branch character varying NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); +CREATE SEQUENCE augur_data.contributors_cntrb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; -ALTER TABLE augur_data.library_dependencies OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_cntrb_id_seq OWNER TO augur; -- --- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.library_version_library_version_id_seq +CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1372,32 +1486,28 @@ CREATE SEQUENCE augur_data.library_version_library_version_id_seq CACHE 1; -ALTER TABLE augur_data.library_version_library_version_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; -- --- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dei_badging; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.library_version ( - library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, - library_id bigint, - library_platform character varying, - version_number character varying, - version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone +CREATE TABLE augur_data.dei_badging ( + id integer NOT NULL, + badging_id integer NOT NULL, + level character varying NOT NULL, + repo_id bigint NOT NULL ); -ALTER TABLE augur_data.library_version OWNER TO augur; +ALTER TABLE augur_data.dei_badging OWNER TO augur; -- --- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: dei_badging_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq +CREATE SEQUENCE augur_data.dei_badging_id_seq + AS integer START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1405,34 +1515,20 @@ CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq CACHE 1; -ALTER TABLE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.dei_badging_id_seq OWNER TO augur; -- --- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dei_badging_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.lstm_anomaly_models ( - model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, - model_name character varying, - model_description character varying, - look_back_days bigint, - training_days bigint, - batch_size bigint, - metric character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP -); - +ALTER SEQUENCE augur_data.dei_badging_id_seq OWNED BY augur_data.dei_badging.id; -ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; -- --- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1440,112 +1536,131 @@ CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq CACHE 1; -ALTER TABLE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; -- --- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.lstm_anomaly_results ( - result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, - repo_id bigint, - repo_category character varying, - model_id bigint, - metric character varying, - contamination_factor double precision, - mean_absolute_error double precision, - remarks character varying, - metric_field character varying, - mean_absolute_actual_value double precision, - mean_absolute_prediction_value double precision, +CREATE TABLE augur_data.discourse_insights ( + msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, + msg_id bigint, + discourse_act character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; +ALTER TABLE augur_data.discourse_insights OWNER TO augur; -- --- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; +COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; -- --- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_msg_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.message_msg_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; -- --- Name: message; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message ( - msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, - rgls_id bigint, - platform_msg_id bigint, - platform_node_id character varying, - repo_id bigint, - msg_text character varying, - msg_timestamp timestamp(0) without time zone, - msg_sender_email character varying, - msg_header character varying, - pltfrm_id bigint NOT NULL, +CREATE TABLE augur_data.dm_repo_annual ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP ); -ALTER TABLE augur_data.message OWNER TO augur; +ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; -- --- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; +CREATE TABLE augur_data.dm_repo_group_annual ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + +ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; -- --- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE TABLE augur_data.dm_repo_group_monthly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -ALTER TABLE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; +ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; -- --- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_analysis ( - msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, - msg_id bigint, - worker_run_id bigint, - sentiment_score double precision, - reconstruction_error double precision, - novelty_flag boolean, - feedback_flag boolean, +CREATE TABLE augur_data.dm_repo_group_weekly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, tool_source character varying, tool_version character varying, data_source character varying, @@ -1553,111 +1668,474 @@ CREATE TABLE augur_data.message_analysis ( ); -ALTER TABLE augur_data.message_analysis OWNER TO augur; +ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; -- --- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; - - --- --- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur --- +CREATE TABLE augur_data.dm_repo_monthly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); -COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; +ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; -- --- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; +CREATE TABLE augur_data.dm_repo_weekly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); +ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; + -- --- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; - +CREATE TABLE augur_data.exclude ( + id integer NOT NULL, + projects_id integer NOT NULL, + email character varying DEFAULT 'NULL'::character varying, + domain character varying DEFAULT 'NULL'::character varying +); --- --- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- -COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; +ALTER TABLE augur_data.exclude OWNER TO augur; +-- +-- Name: explorer_commits_and_committers_daily_count; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count AS + SELECT repo.repo_id, + repo.repo_name, + commits.cmt_committer_date, + count(commits.cmt_id) AS num_of_commits, + count(DISTINCT commits.cmt_committer_raw_email) AS num_of_unique_committers + FROM (augur_data.commits + LEFT JOIN augur_data.repo ON ((repo.repo_id = commits.repo_id))) + GROUP BY repo.repo_id, repo.repo_name, commits.cmt_committer_date + ORDER BY repo.repo_id, commits.cmt_committer_date + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count OWNER TO augur; + +-- +-- Name: explorer_contributor_actions; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_contributor_actions AS + SELECT a.id AS cntrb_id, + a.created_at, + a.repo_id, + a.action, + repo.repo_name, + a.login, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT commits.cmt_ght_author_id AS id, + commits.cmt_author_timestamp AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_id)::text = (commits.cmt_ght_author_id)::text))) + GROUP BY commits.cmt_commit_hash, commits.cmt_ght_author_id, commits.repo_id, commits.cmt_author_timestamp, 'commit'::text, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + WHERE (issues.pull_request IS NULL) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests.pr_merged_at IS NULL) AND ((pull_request_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_events.cntrb_id AS id, + pull_request_events.created_at, + pull_requests.repo_id, + 'pull_request_merged'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_events.cntrb_id))) + WHERE ((pull_requests.pull_request_id = pull_request_events.pull_request_id) AND ((pull_request_events.action)::text = 'merged'::text)) + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + (augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND ((issue_events.action)::text = 'closed'::text)) + UNION ALL + SELECT pull_request_reviews.cntrb_id AS id, + pull_request_reviews.pr_review_submitted_at AS created_at, + pull_requests.repo_id, + ('pull_request_review_'::text || (pull_request_reviews.pr_review_state)::text) AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + (augur_data.pull_request_reviews + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = pull_request_reviews.cntrb_id))) + WHERE (pull_requests.pull_request_id = pull_request_reviews.pull_request_id) + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'pull_request_open'::text AS action, + contributors.cntrb_login AS login + FROM (augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + (augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.closed_at <> message.msg_timestamp))) a, + augur_data.repo + WHERE (a.repo_id = repo.repo_id) + ORDER BY a.created_at DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_contributor_actions OWNER TO augur; -- --- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq - START WITH 1 +CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; -- --- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_analysis_summary ( - msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, - repo_id bigint, - worker_run_id bigint, - positive_ratio double precision, - negative_ratio double precision, - novel_count bigint, - period timestamp(0) without time zone, +CREATE TABLE augur_data.repo_groups ( + repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, + rg_name character varying NOT NULL, + rg_description character varying DEFAULT 'NULL'::character varying, + rg_website character varying(128) DEFAULT 'NULL'::character varying, + rg_recache smallint DEFAULT 1, + rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + rg_type character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; - --- --- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; - - --- --- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; - +ALTER TABLE augur_data.repo_groups OWNER TO augur; -- --- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; +COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; -- --- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; - +-- Name: explorer_entry_list; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_entry_list AS + SELECT DISTINCT r.repo_git, + r.repo_id, + r.repo_name, + rg.rg_name + FROM (augur_data.repo r + JOIN augur_data.repo_groups rg ON ((rg.repo_group_id = r.repo_group_id))) + ORDER BY rg.rg_name + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_entry_list OWNER TO augur; + +-- +-- Name: explorer_issue_assignments; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_issue_assignments AS + SELECT i.issue_id, + i.repo_id AS id, + i.created_at AS created, + i.closed_at AS closed, + ie.created_at AS assign_date, + ie.action AS assignment_action, + ie.cntrb_id AS assignee, + ie.node_id + FROM (augur_data.issues i + LEFT JOIN augur_data.issue_events ie ON (((i.issue_id = ie.issue_id) AND ((ie.action)::text = ANY (ARRAY[('unassigned'::character varying)::text, ('assigned'::character varying)::text]))))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_issue_assignments OWNER TO augur; + +-- +-- Name: explorer_new_contributors; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_new_contributors AS + SELECT cntrb_id, + created_at, + month, + year, + repo_id, + repo_name, + full_name, + login, + rank + FROM ( SELECT b.cntrb_id, + b.created_at, + b.month, + b.year, + b.repo_id, + b.repo_name, + b.full_name, + b.login, + b.action, + b.rank + FROM ( SELECT a.id AS cntrb_id, + a.created_at, + date_part('month'::text, (a.created_at)::date) AS month, + date_part('year'::text, (a.created_at)::date) AS year, + a.repo_id, + repo.repo_name, + a.full_name, + a.login, + a.action, + row_number() OVER (PARTITION BY a.id, a.repo_id ORDER BY a.created_at DESC) AS rank + FROM ( SELECT canonical_full_names.canonical_id AS id, + issues.created_at, + issues.repo_id, + 'issue_opened'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.issues + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issues.reporter_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE (issues.pull_request IS NULL) + GROUP BY canonical_full_names.canonical_id, issues.repo_id, issues.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT canonical_full_names.canonical_id AS id, + to_timestamp((commits.cmt_author_date)::text, 'YYYY-MM-DD'::text) AS created_at, + commits.repo_id, + 'commit'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.commits + LEFT JOIN augur_data.contributors ON (((contributors.cntrb_canonical)::text = (commits.cmt_author_email)::text))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + GROUP BY commits.repo_id, canonical_full_names.canonical_email, canonical_full_names.canonical_id, commits.cmt_author_date, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT message.cntrb_id AS id, + commit_comment_ref.created_at, + commits.repo_id, + 'commit_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.commit_comment_ref, + augur_data.commits, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((commits.cmt_id = commit_comment_ref.cmt_id) AND (commit_comment_ref.msg_id = message.msg_id)) + GROUP BY message.cntrb_id, commits.repo_id, commit_comment_ref.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT issue_events.cntrb_id AS id, + issue_events.created_at, + issues.repo_id, + 'issue_closed'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.issues, + ((augur_data.issue_events + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = issue_events.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((issues.issue_id = issue_events.issue_id) AND (issues.pull_request IS NULL) AND (issue_events.cntrb_id IS NOT NULL) AND ((issue_events.action)::text = 'closed'::text)) + GROUP BY issue_events.cntrb_id, issues.repo_id, issue_events.created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT pull_requests.pr_augur_contributor_id AS id, + pull_requests.pr_created_at AS created_at, + pull_requests.repo_id, + 'open_pull_request'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM ((augur_data.pull_requests + LEFT JOIN augur_data.contributors ON ((pull_requests.pr_augur_contributor_id = contributors.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + GROUP BY pull_requests.pr_augur_contributor_id, pull_requests.repo_id, pull_requests.pr_created_at, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT message.cntrb_id AS id, + message.msg_timestamp AS created_at, + pull_requests.repo_id, + 'pull_request_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.pull_requests, + augur_data.pull_request_message_ref, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((pull_request_message_ref.pull_request_id = pull_requests.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + GROUP BY message.cntrb_id, pull_requests.repo_id, message.msg_timestamp, contributors.cntrb_full_name, contributors.cntrb_login + UNION ALL + SELECT issues.reporter_id AS id, + message.msg_timestamp AS created_at, + issues.repo_id, + 'issue_comment'::text AS action, + contributors.cntrb_full_name AS full_name, + contributors.cntrb_login AS login + FROM augur_data.issues, + augur_data.issue_message_ref, + ((augur_data.message + LEFT JOIN augur_data.contributors ON ((contributors.cntrb_id = message.cntrb_id))) + LEFT JOIN ( SELECT DISTINCT ON (contributors_1.cntrb_canonical) contributors_1.cntrb_full_name, + contributors_1.cntrb_canonical AS canonical_email, + contributors_1.data_collection_date, + contributors_1.cntrb_id AS canonical_id + FROM augur_data.contributors contributors_1 + WHERE ((contributors_1.cntrb_canonical)::text = (contributors_1.cntrb_email)::text) + ORDER BY contributors_1.cntrb_canonical) canonical_full_names ON (((canonical_full_names.canonical_email)::text = (contributors.cntrb_canonical)::text))) + WHERE ((issue_message_ref.msg_id = message.msg_id) AND (issues.issue_id = issue_message_ref.issue_id) AND (issues.pull_request_id = NULL::bigint)) + GROUP BY issues.reporter_id, issues.repo_id, message.msg_timestamp, contributors.cntrb_full_name, contributors.cntrb_login) a, + augur_data.repo + WHERE ((a.id IS NOT NULL) AND (a.repo_id = repo.repo_id)) + GROUP BY a.id, a.repo_id, a.action, a.created_at, repo.repo_name, a.full_name, a.login + ORDER BY a.id) b + WHERE (b.rank = ANY (ARRAY[(1)::bigint, (2)::bigint, (3)::bigint, (4)::bigint, (5)::bigint, (6)::bigint, (7)::bigint]))) x + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_new_contributors OWNER TO augur; + +-- +-- Name: explorer_pr_assignments; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_assignments AS + SELECT pr.pull_request_id, + pr.repo_id AS id, + pr.pr_created_at AS created, + pr.pr_closed_at AS closed, + pre.created_at AS assign_date, + pre.action AS assignment_action, + pre.cntrb_id AS assignee, + pre.node_id + FROM (augur_data.pull_requests pr + LEFT JOIN augur_data.pull_request_events pre ON (((pr.pull_request_id = pre.pull_request_id) AND ((pre.action)::text = ANY (ARRAY[('unassigned'::character varying)::text, ('assigned'::character varying)::text]))))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_assignments OWNER TO augur; -- --- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq +CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1665,20 +2143,37 @@ CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq CACHE 1; -ALTER TABLE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; -- --- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.message_sentiment ( - msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, - msg_id bigint, - worker_run_id bigint, - sentiment_score double precision, - reconstruction_error double precision, - novelty_flag boolean, - feedback_flag boolean, +CREATE TABLE augur_data.pull_request_review_message_ref ( + pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, + pr_review_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + pr_review_msg_url character varying, + pr_review_src_id bigint, + pr_review_msg_src_id bigint, + pr_review_msg_node_id character varying, + pr_review_msg_diff_hunk character varying, + pr_review_msg_path character varying, + pr_review_msg_position bigint, + pr_review_msg_original_position bigint, + pr_review_msg_commit_id character varying, + pr_review_msg_original_commit_id character varying, + pr_review_msg_updated_at timestamp(6) without time zone, + pr_review_msg_html_url character varying, + pr_url character varying, + pr_review_msg_author_association character varying, + pr_review_msg_start_line bigint, + pr_review_msg_original_start_line bigint, + pr_review_msg_start_side character varying, + pr_review_msg_line bigint, + pr_review_msg_original_line bigint, + pr_review_msg_side character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -1686,237 +2181,55 @@ CREATE TABLE augur_data.message_sentiment ( ); -ALTER TABLE augur_data.message_sentiment OWNER TO augur; +ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; -- --- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: explorer_pr_response; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_response AS + SELECT pr.pull_request_id, + pr.repo_id AS id, + pr.pr_augur_contributor_id AS cntrb_id, + m.msg_timestamp, + m.msg_cntrb_id, + pr.pr_created_at, + pr.pr_closed_at + FROM (augur_data.pull_requests pr + LEFT JOIN ( SELECT prr.pull_request_id, + m_1.msg_timestamp, + m_1.cntrb_id AS msg_cntrb_id + FROM augur_data.pull_request_review_message_ref prrmr, + augur_data.pull_requests pr_1, + augur_data.message m_1, + augur_data.pull_request_reviews prr + WHERE ((prrmr.pr_review_id = prr.pr_review_id) AND (prrmr.msg_id = m_1.msg_id) AND (prr.pull_request_id = pr_1.pull_request_id)) + UNION + SELECT prmr.pull_request_id, + m_1.msg_timestamp, + m_1.cntrb_id AS msg_cntrb_id + FROM augur_data.pull_request_message_ref prmr, + augur_data.pull_requests pr_1, + augur_data.message m_1 + WHERE ((prmr.pull_request_id = pr_1.pull_request_id) AND (prmr.msg_id = m_1.msg_id))) m ON ((m.pull_request_id = pr.pull_request_id))) + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_response OWNER TO augur; + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; +CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + - --- --- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; - - --- --- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; - - --- --- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; - - --- --- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; - - --- --- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; - --- --- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.message_sentiment_summary ( - msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, - repo_id bigint, - worker_run_id bigint, - positive_ratio double precision, - negative_ratio double precision, - novel_count bigint, - period timestamp(0) without time zone, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; - --- --- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; - - --- --- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; - - --- --- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; - - --- --- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; - - --- --- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.platform_pltfrm_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.platform_pltfrm_id_seq OWNER TO augur; - --- --- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.platform ( - pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, - pltfrm_name character varying, - pltfrm_version character varying, - pltfrm_release_date date, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.platform OWNER TO augur; - --- --- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; - --- --- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_analysis ( - pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - merge_probability numeric(256,250), - mechanism character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL -); - - -ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; - --- --- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; - - --- --- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; - - --- --- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; - - --- --- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; - --- --- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_assignees ( - pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_assignee_src_id bigint, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - contrib_id uuid -); - - -ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; - --- --- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; -- -- Name: pull_request_commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -1961,10 +2274,10 @@ COMMENT ON COLUMN augur_data.pull_request_commits.pr_cmt_sha IS 'This is the com -- --- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq +CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -1972,24 +2285,20 @@ CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq CACHE 1; -ALTER TABLE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; -- --- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_events ( - pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, - pull_request_id bigint NOT NULL, +CREATE TABLE augur_data.pull_request_meta ( + pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, + pull_request_id bigint, repo_id bigint, - action character varying NOT NULL, - action_commit_hash character varying, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - issue_event_src_id bigint, - node_id character varying, - node_url character varying, - platform_id bigint DEFAULT 25150 NOT NULL, - pr_platform_event_id bigint, + pr_head_or_base character varying, + pr_src_meta_label character varying, + pr_src_meta_ref character varying, + pr_sha character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -1998,191 +2307,24 @@ CREATE TABLE augur_data.pull_request_events ( ); -ALTER TABLE augur_data.pull_request_events OWNER TO augur; +ALTER TABLE augur_data.pull_request_meta OWNER TO augur; -- --- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; +COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; -- --- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; +COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; -- --- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq - START WITH 25150 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; - --- --- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_files ( - pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_file_additions bigint, - pr_file_deletions bigint, - pr_file_path character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_files OWNER TO augur; - --- --- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. -Not all pull requests are from a branch or fork into master. -The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). -Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. -In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; - - --- --- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; - --- --- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_labels ( - pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_src_id bigint, - pr_src_node_id character varying, - pr_src_url character varying, - pr_src_description character varying, - pr_src_color character varying, - pr_src_default_bool boolean, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_labels OWNER TO augur; - --- --- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; - --- --- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_message_ref ( - pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - msg_id bigint, - pr_message_ref_src_comment_id bigint, - pr_message_ref_src_node_id character varying, - pr_issue_url character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP -); - - -ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; - --- --- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; - --- --- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.pull_request_meta ( - pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, - pull_request_id bigint, - repo_id bigint, - pr_head_or_base character varying, - pr_src_meta_label character varying, - pr_src_meta_ref character varying, - pr_sha character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid -); - - -ALTER TABLE augur_data.pull_request_meta OWNER TO augur; - --- --- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; - - --- --- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; - - --- --- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur -- COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a representation of the repo:branch information in the pull request. Head is issueing the pull request and base is taking the pull request. For example: (We do not store all of this) @@ -2366,10 +2508,115 @@ COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a r -- --- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: explorer_pr_response_times; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_pr_response_times AS + SELECT repo.repo_id, + pull_requests.pr_src_id, + repo.repo_name, + pull_requests.pr_src_author_association, + repo_groups.rg_name AS repo_group, + pull_requests.pr_src_state, + pull_requests.pr_merged_at, + pull_requests.pr_created_at, + pull_requests.pr_closed_at, + date_part('year'::text, (pull_requests.pr_created_at)::date) AS created_year, + date_part('month'::text, (pull_requests.pr_created_at)::date) AS created_month, + date_part('year'::text, (pull_requests.pr_closed_at)::date) AS closed_year, + date_part('month'::text, (pull_requests.pr_closed_at)::date) AS closed_month, + base_labels.pr_src_meta_label, + base_labels.pr_head_or_base, + ((EXTRACT(epoch FROM pull_requests.pr_closed_at) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_close, + ((EXTRACT(epoch FROM pull_requests.pr_closed_at) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_close, + ((EXTRACT(epoch FROM response_times.first_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_first_response, + ((EXTRACT(epoch FROM response_times.first_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_first_response, + ((EXTRACT(epoch FROM response_times.last_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (3600)::numeric) AS hours_to_last_response, + ((EXTRACT(epoch FROM response_times.last_response_time) - EXTRACT(epoch FROM pull_requests.pr_created_at)) / (86400)::numeric) AS days_to_last_response, + response_times.first_response_time, + response_times.last_response_time, + response_times.average_time_between_responses, + response_times.assigned_count, + response_times.review_requested_count, + response_times.labeled_count, + response_times.subscribed_count, + response_times.mentioned_count, + response_times.referenced_count, + response_times.closed_count, + response_times.head_ref_force_pushed_count, + response_times.merged_count, + response_times.milestoned_count, + response_times.unlabeled_count, + response_times.head_ref_deleted_count, + response_times.comment_count, + master_merged_counts.lines_added, + master_merged_counts.lines_removed, + all_commit_counts.commit_count, + master_merged_counts.file_count + FROM augur_data.repo, + augur_data.repo_groups, + ((((augur_data.pull_requests + LEFT JOIN ( SELECT pull_requests_1.pull_request_id, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'assigned'::text)) AS assigned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'review_requested'::text)) AS review_requested_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'labeled'::text)) AS labeled_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'unlabeled'::text)) AS unlabeled_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'subscribed'::text)) AS subscribed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'mentioned'::text)) AS mentioned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'referenced'::text)) AS referenced_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'closed'::text)) AS closed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'head_ref_force_pushed'::text)) AS head_ref_force_pushed_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'head_ref_deleted'::text)) AS head_ref_deleted_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'milestoned'::text)) AS milestoned_count, + count(*) FILTER (WHERE ((pull_request_events.action)::text = 'merged'::text)) AS merged_count, + min(message.msg_timestamp) AS first_response_time, + count(DISTINCT message.msg_timestamp) AS comment_count, + max(message.msg_timestamp) AS last_response_time, + ((max(message.msg_timestamp) - min(message.msg_timestamp)) / (count(DISTINCT message.msg_timestamp))::double precision) AS average_time_between_responses + FROM augur_data.pull_request_events, + augur_data.pull_requests pull_requests_1, + augur_data.repo repo_1, + augur_data.pull_request_message_ref, + augur_data.message + WHERE ((repo_1.repo_id = pull_requests_1.repo_id) AND (pull_requests_1.pull_request_id = pull_request_events.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_message_ref.pull_request_id) AND (pull_request_message_ref.msg_id = message.msg_id)) + GROUP BY pull_requests_1.pull_request_id) response_times ON ((pull_requests.pull_request_id = response_times.pull_request_id))) + LEFT JOIN ( SELECT pull_request_commits.pull_request_id, + count(DISTINCT pull_request_commits.pr_cmt_sha) AS commit_count + FROM augur_data.pull_request_commits, + augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE ((pull_requests_1.pull_request_id = pull_request_commits.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND ((pull_request_commits.pr_cmt_sha)::text <> (pull_requests_1.pr_merge_commit_sha)::text) AND ((pull_request_commits.pr_cmt_sha)::text <> (pull_request_meta.pr_sha)::text)) + GROUP BY pull_request_commits.pull_request_id) all_commit_counts ON ((pull_requests.pull_request_id = all_commit_counts.pull_request_id))) + LEFT JOIN ( SELECT max(pull_request_meta.pr_repo_meta_id) AS max, + pull_request_meta.pull_request_id, + pull_request_meta.pr_head_or_base, + pull_request_meta.pr_src_meta_label + FROM augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE ((pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND ((pull_request_meta.pr_head_or_base)::text = 'base'::text)) + GROUP BY pull_request_meta.pull_request_id, pull_request_meta.pr_head_or_base, pull_request_meta.pr_src_meta_label) base_labels ON ((base_labels.pull_request_id = all_commit_counts.pull_request_id))) + LEFT JOIN ( SELECT sum(commits.cmt_added) AS lines_added, + sum(commits.cmt_removed) AS lines_removed, + pull_request_commits.pull_request_id, + count(DISTINCT commits.cmt_filename) AS file_count + FROM augur_data.pull_request_commits, + augur_data.commits, + augur_data.pull_requests pull_requests_1, + augur_data.pull_request_meta + WHERE (((commits.cmt_commit_hash)::text = (pull_request_commits.pr_cmt_sha)::text) AND (pull_requests_1.pull_request_id = pull_request_commits.pull_request_id) AND (pull_requests_1.pull_request_id = pull_request_meta.pull_request_id) AND (commits.repo_id = pull_requests_1.repo_id) AND ((commits.cmt_commit_hash)::text <> (pull_requests_1.pr_merge_commit_sha)::text) AND ((commits.cmt_commit_hash)::text <> (pull_request_meta.pr_sha)::text)) + GROUP BY pull_request_commits.pull_request_id) master_merged_counts ON ((base_labels.pull_request_id = master_merged_counts.pull_request_id))) + WHERE ((repo.repo_group_id = repo_groups.repo_group_id) AND (repo.repo_id = pull_requests.repo_id)) + ORDER BY response_times.merged_count DESC + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_pr_response_times OWNER TO augur; + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq +CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -2377,219 +2624,843 @@ CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq CACHE 1; -ALTER TABLE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; -- --- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_repo ( - pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, - pr_repo_meta_id bigint, - pr_repo_head_or_base character varying, - pr_src_repo_id bigint, - pr_src_node_id character varying, - pr_repo_name character varying, - pr_repo_full_name character varying, - pr_repo_private_bool boolean, +CREATE TABLE augur_data.repo_labor ( + repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_clone_date timestamp(0) without time zone, + rl_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + total_lines integer, + code_lines integer, + comment_lines integer, + blank_lines integer, + code_complexity integer, + repo_url character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - pr_cntrb_id uuid + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.pull_request_repo OWNER TO augur; +ALTER TABLE augur_data.repo_labor OWNER TO augur; -- --- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; +COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; -- --- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; +COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; -- --- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: explorer_repo_languages; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; +CREATE MATERIALIZED VIEW augur_data.explorer_repo_languages AS + SELECT e.repo_id, + repo.repo_git, + repo.repo_name, + e.programming_language, + e.code_lines, + e.files + FROM augur_data.repo, + ( SELECT d.repo_id, + d.programming_language, + sum(d.code_lines) AS code_lines, + (count(*))::integer AS files + FROM ( SELECT repo_labor.repo_id, + repo_labor.programming_language, + repo_labor.code_lines + FROM augur_data.repo_labor, + ( SELECT repo_labor_1.repo_id, + max(repo_labor_1.data_collection_date) AS last_collected + FROM augur_data.repo_labor repo_labor_1 + GROUP BY repo_labor_1.repo_id) recent + WHERE ((repo_labor.repo_id = recent.repo_id) AND (repo_labor.data_collection_date > (recent.last_collected - ((5)::double precision * '00:01:00'::interval))))) d + GROUP BY d.repo_id, d.programming_language) e + WHERE (repo.repo_id = e.repo_id) + ORDER BY e.repo_id + WITH NO DATA; -ALTER TABLE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; +ALTER MATERIALIZED VIEW augur_data.explorer_repo_languages OWNER TO augur; -- --- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: user_groups; Type: TABLE; Schema: augur_operations; Owner: augur -- -CREATE TABLE augur_data.pull_request_review_message_ref ( - pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, - pr_review_id bigint NOT NULL, - repo_id bigint, - msg_id bigint NOT NULL, - pr_review_msg_url character varying, - pr_review_src_id bigint, - pr_review_msg_src_id bigint, - pr_review_msg_node_id character varying, - pr_review_msg_diff_hunk character varying, - pr_review_msg_path character varying, - pr_review_msg_position bigint, - pr_review_msg_original_position bigint, - pr_review_msg_commit_id character varying, - pr_review_msg_original_commit_id character varying, - pr_review_msg_updated_at timestamp(6) without time zone, - pr_review_msg_html_url character varying, - pr_url character varying, - pr_review_msg_author_association character varying, - pr_review_msg_start_line bigint, - pr_review_msg_original_start_line bigint, - pr_review_msg_start_side character varying, - pr_review_msg_line bigint, - pr_review_msg_original_line bigint, - pr_review_msg_side character varying, +CREATE TABLE augur_operations.user_groups ( + group_id bigint NOT NULL, + user_id integer NOT NULL, + name character varying NOT NULL, + favorited boolean DEFAULT false NOT NULL +); + + +ALTER TABLE augur_operations.user_groups OWNER TO augur; + +-- +-- Name: user_repos; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.user_repos ( + repo_id bigint NOT NULL, + group_id bigint NOT NULL +); + + +ALTER TABLE augur_operations.user_repos OWNER TO augur; + +-- +-- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.users ( + user_id integer NOT NULL, + login_name character varying NOT NULL, + login_hashword character varying NOT NULL, + email character varying NOT NULL, + text_phone character varying, + first_name character varying NOT NULL, + last_name character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + admin boolean NOT NULL, + email_verified boolean DEFAULT false NOT NULL +); + + +ALTER TABLE augur_operations.users OWNER TO augur; + +-- +-- Name: explorer_user_repos; Type: MATERIALIZED VIEW; Schema: augur_data; Owner: augur +-- + +CREATE MATERIALIZED VIEW augur_data.explorer_user_repos AS + SELECT a.login_name, + a.user_id, + b.group_id, + c.repo_id + FROM augur_operations.users a, + augur_operations.user_groups b, + augur_operations.user_repos c + WHERE ((a.user_id = b.user_id) AND (b.group_id = c.group_id)) + ORDER BY a.user_id + WITH NO DATA; + + +ALTER MATERIALIZED VIEW augur_data.explorer_user_repos OWNER TO augur; + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; + +-- +-- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_assignees ( + issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + issue_assignee_src_id bigint, + issue_assignee_src_node character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_assignees OWNER TO augur; + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; + +-- +-- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_labels ( + issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + label_text character varying, + label_description character varying, + label_color character varying, + label_src_id bigint, + label_src_node_id character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_labels OWNER TO augur; + +-- +-- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.libraries_library_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.libraries_library_id_seq OWNER TO augur; + +-- +-- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.libraries ( + library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, + repo_id bigint, + platform character varying, + name character varying, + created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + library_description character varying(2000) DEFAULT NULL::character varying, + keywords character varying, + library_homepage character varying(1000) DEFAULT NULL::character varying, + license character varying, + version_count integer, + latest_release_timestamp character varying, + latest_release_number character varying, + package_manager_id character varying, + dependency_count integer, + dependent_library_count integer, + primary_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.libraries OWNER TO augur; + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; + +-- +-- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_dependencies ( + lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, + library_id bigint, + manifest_platform character varying, + manifest_filepath character varying(1000) DEFAULT NULL::character varying, + manifest_kind character varying, + repo_id_branch character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_dependencies OWNER TO augur; + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_version_library_version_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.library_version_library_version_id_seq OWNER TO augur; + +-- +-- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_version ( + library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, + library_id bigint, + library_platform character varying, + version_number character varying, + version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_version OWNER TO augur; + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_models ( + model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, + model_name character varying, + model_description character varying, + look_back_days bigint, + training_days bigint, + batch_size bigint, + metric character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_results ( + result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_category character varying, + model_id bigint, + metric character varying, + contamination_factor double precision, + mean_absolute_error double precision, + remarks character varying, + metric_field character varying, + mean_absolute_actual_value double precision, + mean_absolute_prediction_value double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; + +-- +-- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis OWNER TO augur; + +-- +-- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; + +-- +-- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment OWNER TO augur; + +-- +-- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; + +-- +-- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.platform_pltfrm_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.platform_pltfrm_id_seq OWNER TO augur; + +-- +-- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.platform ( + pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, + pltfrm_name character varying, + pltfrm_version character varying, + pltfrm_release_date date, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone ); -ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; +ALTER TABLE augur_data.platform OWNER TO augur; -- --- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; -- --- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_reviewers ( - pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, +CREATE TABLE augur_data.pull_request_analysis ( + pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, pull_request_id bigint, - pr_source_id bigint, - repo_id bigint, - pr_reviewer_src_id bigint, + merge_probability numeric(256,250), + mechanism character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL ); -ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; +ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; -- --- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; +COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; -- --- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; +COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; -- --- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq - START WITH 1 +COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq + START WITH 25430 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; -- --- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_reviews ( - pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, - pull_request_id bigint NOT NULL, +CREATE TABLE augur_data.pull_request_assignees ( + pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, repo_id bigint, - pr_review_author_association character varying, - pr_review_state character varying, - pr_review_body character varying, - pr_review_submitted_at timestamp(6) without time zone, - pr_review_src_id bigint, - pr_review_node_id character varying, - pr_review_html_url character varying, - pr_review_pull_request_url character varying, - pr_review_commit_id character varying, - platform_id bigint DEFAULT 25150, + pr_assignee_src_id bigint, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - cntrb_id uuid NOT NULL + contrib_id uuid ); -ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; +ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; -- --- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq + START WITH 25150 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; -- --- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_request_teams ( - pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, +CREATE TABLE augur_data.pull_request_files ( + pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, pull_request_id bigint, - pr_src_team_id bigint, - pr_src_team_node character varying, - pr_src_team_url character varying, - pr_team_name character varying, - pr_team_slug character varying, - pr_team_description character varying, - pr_team_privacy character varying, - pr_team_permission character varying, - pr_team_src_members_url character varying, - pr_team_src_repositories_url character varying, - pr_team_parent_id bigint, + repo_id bigint, + pr_file_additions bigint, + pr_file_deletions bigint, + pr_file_path character varying, tool_source character varying, tool_version character varying, data_source character varying, @@ -2597,13 +3468,24 @@ CREATE TABLE augur_data.pull_request_teams ( ); -ALTER TABLE augur_data.pull_request_teams OWNER TO augur; +ALTER TABLE augur_data.pull_request_files OWNER TO augur; -- --- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq +COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq START WITH 25430 INCREMENT BY 1 NO MINVALUE @@ -2611,114 +3493,171 @@ CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq CACHE 1; -ALTER TABLE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; -- --- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.pull_requests ( - pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, - repo_id bigint DEFAULT 0, - pr_url character varying, +CREATE TABLE augur_data.pull_request_labels ( + pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, pr_src_id bigint, pr_src_node_id character varying, - pr_html_url character varying, - pr_diff_url character varying, - pr_patch_url character varying, - pr_issue_url character varying, - pr_augur_issue_id bigint, - pr_src_number bigint, - pr_src_state character varying, - pr_src_locked boolean, - pr_src_title character varying, - pr_body text, - pr_created_at timestamp(0) without time zone, - pr_updated_at timestamp(0) without time zone, - pr_closed_at timestamp(0) without time zone, - pr_merged_at timestamp(0) without time zone, - pr_merge_commit_sha character varying, - pr_teams bigint, - pr_milestone character varying, - pr_commits_url character varying, - pr_review_comments_url character varying, - pr_review_comment_url character varying, - pr_comments_url character varying, - pr_statuses_url character varying, - pr_meta_head_id character varying, - pr_meta_base_id character varying, - pr_src_issue_url character varying, - pr_src_comments_url character varying, - pr_src_review_comments_url character varying, - pr_src_commits_url character varying, - pr_src_statuses_url character varying, - pr_src_author_association character varying, + pr_src_url character varying, + pr_src_description character varying, + pr_src_color character varying, + pr_src_default_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_labels OWNER TO augur; + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; + +-- +-- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_repo ( + pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, + pr_repo_meta_id bigint, + pr_repo_head_or_base character varying, + pr_src_repo_id bigint, + pr_src_node_id character varying, + pr_repo_name character varying, + pr_repo_full_name character varying, + pr_repo_private_bool boolean, tool_source character varying, tool_version character varying, data_source character varying, data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - pr_augur_contributor_id uuid + pr_cntrb_id uuid ); -ALTER TABLE augur_data.pull_requests OWNER TO augur; +ALTER TABLE augur_data.pull_request_repo OWNER TO augur; -- --- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; +COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; -- --- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; +COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; -- --- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; +CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; + -- --- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; +CREATE TABLE augur_data.pull_request_reviewers ( + pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_source_id bigint, + repo_id bigint, + pr_reviewer_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); +ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; + -- --- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; -- --- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; -- --- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; +CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +ALTER SEQUENCE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; -- --- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; +CREATE TABLE augur_data.pull_request_teams ( + pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_src_team_id bigint, + pr_src_team_node character varying, + pr_src_team_url character varying, + pr_team_name character varying, + pr_team_slug character varying, + pr_team_description character varying, + pr_team_privacy character varying, + pr_team_permission character varying, + pr_team_src_members_url character varying, + pr_team_src_repositories_url character varying, + pr_team_parent_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); +ALTER TABLE augur_data.pull_request_teams OWNER TO augur; + -- -- Name: releases_release_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -2731,14 +3670,14 @@ CREATE SEQUENCE augur_data.releases_release_id_seq CACHE 1; -ALTER TABLE augur_data.releases_release_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.releases_release_id_seq OWNER TO augur; -- -- Name: releases; Type: TABLE; Schema: augur_data; Owner: augur -- CREATE TABLE augur_data.releases ( - release_id character(64) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, + release_id character(256) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, repo_id bigint NOT NULL, release_name character varying, release_description character varying, @@ -2761,104 +3700,74 @@ CREATE TABLE augur_data.releases ( ALTER TABLE augur_data.releases OWNER TO augur; -- --- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.repo_repo_id_seq - START WITH 25430 +CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq + START WITH 25012 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.repo_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; -- --- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.repo ( - repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, - repo_group_id bigint NOT NULL, - repo_git character varying NOT NULL, - repo_path character varying DEFAULT 'NULL'::character varying, - repo_name character varying DEFAULT 'NULL'::character varying, - repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - repo_status character varying DEFAULT 'New'::character varying NOT NULL, - repo_type character varying DEFAULT ''::character varying, - url character varying, - owner_id integer, - description character varying, - primary_language character varying, - created_at character varying, - forked_from character varying, - updated_at timestamp(0) without time zone, - repo_archived_date_collected timestamp(0) with time zone, - repo_archived integer, +CREATE TABLE augur_data.repo_badging ( + badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, + repo_id bigint, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + data jsonb ); -ALTER TABLE augur_data.repo OWNER TO augur; - --- --- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; - +ALTER TABLE augur_data.repo_badging OWNER TO augur; -- --- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur -- -COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; +COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API +https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur +'; -- --- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- Name: repo_clones_data_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- -CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq - START WITH 25012 +CREATE SEQUENCE augur_data.repo_clones_data_id_seq + START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; -ALTER TABLE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_clones_data_id_seq OWNER TO augur; -- --- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur +-- Name: repo_clones_data; Type: TABLE; Schema: augur_data; Owner: augur -- -CREATE TABLE augur_data.repo_badging ( - badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, - repo_id bigint, - created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - data jsonb +CREATE TABLE augur_data.repo_clones_data ( + repo_clone_data_id bigint DEFAULT nextval('augur_data.repo_clones_data_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + unique_clones bigint, + count_clones bigint, + clone_data_timestamp timestamp(6) without time zone ); -ALTER TABLE augur_data.repo_badging OWNER TO augur; - --- --- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API -https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur -'; - +ALTER TABLE augur_data.repo_clones_data OWNER TO augur; -- -- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur @@ -2872,7 +3781,7 @@ CREATE SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq CACHE 1; -ALTER TABLE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; -- -- Name: repo_cluster_messages; Type: TABLE; Schema: augur_data; Owner: augur @@ -2904,7 +3813,7 @@ CREATE SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq CACHE 1; -ALTER TABLE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; -- -- Name: repo_dependencies; Type: TABLE; Schema: augur_data; Owner: augur @@ -2972,7 +3881,7 @@ CREATE SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq CACHE 1; -ALTER TABLE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; -- -- Name: repo_deps_libyear; Type: TABLE; Schema: augur_data; Owner: augur @@ -3011,7 +3920,7 @@ CREATE SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 CACHE 1; -ALTER TABLE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; -- -- Name: repo_deps_scorecard; Type: TABLE; Schema: augur_data; Owner: augur @@ -3021,12 +3930,12 @@ CREATE TABLE augur_data.repo_deps_scorecard ( repo_deps_scorecard_id bigint DEFAULT nextval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1'::regclass) NOT NULL, repo_id bigint, name character varying, - status character varying, score character varying, tool_source character varying, tool_version character varying, data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + scorecard_check_details jsonb ); @@ -3044,7 +3953,7 @@ CREATE SEQUENCE augur_data.repo_group_insights_rgi_id_seq CACHE 1; -ALTER TABLE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; -- -- Name: repo_group_insights; Type: TABLE; Schema: augur_data; Owner: augur @@ -3082,48 +3991,6 @@ Worker Design Notes: The idea is that the "insight worker" will scan through a b COMMENT ON COLUMN augur_data.repo_group_insights.rgi_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; --- --- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; - --- --- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.repo_groups ( - repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, - rg_name character varying NOT NULL, - rg_description character varying DEFAULT 'NULL'::character varying, - rg_website character varying(128) DEFAULT 'NULL'::character varying, - rg_recache smallint DEFAULT 1, - rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, - rg_type character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.repo_groups OWNER TO augur; - --- --- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; - - -- -- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -3136,7 +4003,7 @@ CREATE SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq CACHE 1; -ALTER TABLE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; -- -- Name: repo_groups_list_serve; Type: TABLE; Schema: augur_data; Owner: augur @@ -3170,7 +4037,7 @@ CREATE SEQUENCE augur_data.repo_info_repo_info_id_seq CACHE 1; -ALTER TABLE augur_data.repo_info_repo_info_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_info_repo_info_id_seq OWNER TO augur; -- -- Name: repo_info; Type: TABLE; Schema: augur_data; Owner: augur @@ -3229,7 +4096,7 @@ CREATE SEQUENCE augur_data.repo_insights_ri_id_seq CACHE 1; -ALTER TABLE augur_data.repo_insights_ri_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_insights_ri_id_seq OWNER TO augur; -- -- Name: repo_insights; Type: TABLE; Schema: augur_data; Owner: augur @@ -3282,7 +4149,7 @@ CREATE SEQUENCE augur_data.repo_insights_records_ri_id_seq CACHE 1; -ALTER TABLE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; -- -- Name: repo_insights_records; Type: TABLE; Schema: augur_data; Owner: augur @@ -3390,61 +4257,6 @@ COMMENT ON COLUMN augur_data.repo_insights_records.data_source IS 'Standard Augu COMMENT ON COLUMN augur_data.repo_insights_records.data_collection_date IS 'Standard Augur Metadata'; --- --- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur --- - -CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq - START WITH 25430 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; - --- --- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur --- - -CREATE TABLE augur_data.repo_labor ( - repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, - repo_id bigint, - repo_clone_date timestamp(0) without time zone, - rl_analysis_date timestamp(0) without time zone, - programming_language character varying, - file_path character varying, - file_name character varying, - total_lines integer, - code_lines integer, - comment_lines integer, - blank_lines integer, - code_complexity integer, - repo_url character varying, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone -); - - -ALTER TABLE augur_data.repo_labor OWNER TO augur; - --- --- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; - - --- --- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; - - -- -- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur -- @@ -3457,7 +4269,7 @@ CREATE SEQUENCE augur_data.repo_meta_rmeta_id_seq CACHE 1; -ALTER TABLE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; -- -- Name: repo_meta; Type: TABLE; Schema: augur_data; Owner: augur @@ -3496,7 +4308,7 @@ CREATE SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq CACHE 1; -ALTER TABLE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; -- -- Name: repo_sbom_scans; Type: TABLE; Schema: augur_data; Owner: augur @@ -3523,7 +4335,7 @@ CREATE SEQUENCE augur_data.repo_stats_rstat_id_seq CACHE 1; -ALTER TABLE augur_data.repo_stats_rstat_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_stats_rstat_id_seq OWNER TO augur; -- -- Name: repo_stats; Type: TABLE; Schema: augur_data; Owner: augur @@ -3562,7 +4374,7 @@ CREATE SEQUENCE augur_data.repo_test_coverage_repo_id_seq CACHE 1; -ALTER TABLE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; -- -- Name: repo_test_coverage; Type: TABLE; Schema: augur_data; Owner: augur @@ -3601,7 +4413,7 @@ CREATE SEQUENCE augur_data.repo_topic_repo_topic_id_seq CACHE 1; -ALTER TABLE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; -- -- Name: repo_topic; Type: TABLE; Schema: augur_data; Owner: augur @@ -3660,7 +4472,7 @@ CREATE SEQUENCE augur_data.topic_words_topic_words_id_seq CACHE 1; -ALTER TABLE augur_data.topic_words_topic_words_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.topic_words_topic_words_id_seq OWNER TO augur; -- -- Name: topic_words; Type: TABLE; Schema: augur_data; Owner: augur @@ -3711,7 +4523,7 @@ CREATE SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq CACHE 1; -ALTER TABLE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; -- -- Name: unresolved_commit_emails; Type: TABLE; Schema: augur_data; Owner: augur @@ -3742,7 +4554,7 @@ CREATE SEQUENCE augur_data.utility_log_id_seq1 CACHE 1; -ALTER TABLE augur_data.utility_log_id_seq1 OWNER TO augur; +ALTER SEQUENCE augur_data.utility_log_id_seq1 OWNER TO augur; -- -- Name: utility_log; Type: TABLE; Schema: augur_data; Owner: augur @@ -3770,7 +4582,7 @@ CREATE SEQUENCE augur_data.utility_log_id_seq CACHE 1; -ALTER TABLE augur_data.utility_log_id_seq OWNER TO augur; +ALTER SEQUENCE augur_data.utility_log_id_seq OWNER TO augur; -- -- Name: working_commits; Type: TABLE; Schema: augur_data; Owner: augur @@ -3796,7 +4608,7 @@ CREATE SEQUENCE augur_operations.affiliations_corp_id_seq CACHE 1; -ALTER TABLE augur_operations.affiliations_corp_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.affiliations_corp_id_seq OWNER TO augur; -- -- Name: all; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3830,7 +4642,7 @@ CREATE SEQUENCE augur_operations.augur_settings_id_seq CACHE 1; -ALTER TABLE augur_operations.augur_settings_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.augur_settings_id_seq OWNER TO augur; -- -- Name: augur_settings; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3853,6 +4665,58 @@ ALTER TABLE augur_operations.augur_settings OWNER TO augur; COMMENT ON TABLE augur_operations.augur_settings IS 'Augur settings include the schema version, and the Augur API Key as of 10/25/2020. Future augur settings may be stored in this table, which has the basic structure of a name-value pair. '; +-- +-- Name: client_applications; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.client_applications ( + id character varying NOT NULL, + api_key character varying NOT NULL, + user_id integer NOT NULL, + name character varying NOT NULL, + redirect_url character varying NOT NULL +); + + +ALTER TABLE augur_operations.client_applications OWNER TO augur; + +-- +-- Name: collection_status; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.collection_status ( + repo_id bigint NOT NULL, + core_data_last_collected timestamp without time zone, + core_status character varying DEFAULT 'Pending'::character varying NOT NULL, + core_task_id character varying, + secondary_data_last_collected timestamp without time zone, + secondary_status character varying DEFAULT 'Pending'::character varying NOT NULL, + secondary_task_id character varying, + event_last_collected timestamp without time zone, + facade_status character varying DEFAULT 'Pending'::character varying NOT NULL, + facade_data_last_collected timestamp without time zone, + facade_task_id character varying, + core_weight bigint, + facade_weight bigint, + secondary_weight bigint, + issue_pr_sum bigint, + commit_sum bigint, + ml_status character varying DEFAULT 'Pending'::character varying NOT NULL, + ml_data_last_collected timestamp without time zone, + ml_task_id character varying, + ml_weight bigint, + CONSTRAINT core_data_last_collected_check CHECK (((NOT ((core_data_last_collected IS NULL) AND ((core_status)::text = 'Success'::text))) AND (NOT ((core_data_last_collected IS NOT NULL) AND ((core_status)::text = 'Pending'::text))))), + CONSTRAINT core_secondary_dependency_check CHECK ((NOT (((core_status)::text = 'Pending'::text) AND ((secondary_status)::text = 'Collecting'::text)))), + CONSTRAINT core_task_id_check CHECK (((NOT ((core_task_id IS NOT NULL) AND ((core_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying])::text[])))) AND (NOT ((core_task_id IS NULL) AND ((core_status)::text = 'Collecting'::text))))), + CONSTRAINT facade_data_last_collected_check CHECK (((NOT ((facade_data_last_collected IS NULL) AND ((facade_status)::text = 'Success'::text))) AND (NOT ((facade_data_last_collected IS NOT NULL) AND ((facade_status)::text = ANY ((ARRAY['Pending'::character varying, 'Initializing'::character varying, 'Update'::character varying])::text[])))))), + CONSTRAINT facade_task_id_check CHECK (((NOT ((facade_task_id IS NOT NULL) AND ((facade_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying, 'Failed Clone'::character varying, 'Initializing'::character varying])::text[])))) AND (NOT ((facade_task_id IS NULL) AND ((facade_status)::text = 'Collecting'::text))))), + CONSTRAINT secondary_data_last_collected_check CHECK (((NOT ((secondary_data_last_collected IS NULL) AND ((secondary_status)::text = 'Success'::text))) AND (NOT ((secondary_data_last_collected IS NOT NULL) AND ((secondary_status)::text = 'Pending'::text))))), + CONSTRAINT secondary_task_id_check CHECK (((NOT ((secondary_task_id IS NOT NULL) AND ((secondary_status)::text = ANY ((ARRAY['Pending'::character varying, 'Success'::character varying, 'Error'::character varying])::text[])))) AND (NOT ((secondary_task_id IS NULL) AND ((secondary_status)::text = 'Collecting'::text))))) +); + + +ALTER TABLE augur_operations.collection_status OWNER TO augur; + -- -- Name: config; Type: TABLE; Schema: augur_operations; Owner: augur -- @@ -3881,7 +4745,7 @@ CREATE SEQUENCE augur_operations.config_id_seq CACHE 1; -ALTER TABLE augur_operations.config_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.config_id_seq OWNER TO augur; -- -- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur @@ -3902,7 +4766,19 @@ CREATE SEQUENCE augur_operations.gh_worker_history_history_id_seq CACHE 1; -ALTER TABLE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; + +-- +-- Name: refresh_tokens; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.refresh_tokens ( + id character varying NOT NULL, + user_session_token character varying NOT NULL +); + + +ALTER TABLE augur_operations.refresh_tokens OWNER TO augur; -- -- Name: repos_fetch_log; Type: TABLE; Schema: augur_operations; Owner: augur @@ -3915,36 +4791,95 @@ CREATE TABLE augur_operations.repos_fetch_log ( ); -ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; +ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; + +-- +-- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: subscription_types; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.subscription_types ( + id bigint NOT NULL, + name character varying NOT NULL +); + + +ALTER TABLE augur_operations.subscription_types OWNER TO augur; + +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.subscription_types_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_operations.subscription_types_id_seq OWNER TO augur; + +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.subscription_types_id_seq OWNED BY augur_operations.subscription_types.id; + + +-- +-- Name: subscriptions; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.subscriptions ( + application_id character varying NOT NULL, + type_id bigint NOT NULL +); + + +ALTER TABLE augur_operations.subscriptions OWNER TO augur; + +-- +-- Name: user_groups_group_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.user_groups_group_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE augur_operations.user_groups_group_id_seq OWNER TO augur; -- --- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- Name: user_groups_group_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur -- -COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; +ALTER SEQUENCE augur_operations.user_groups_group_id_seq OWNED BY augur_operations.user_groups.group_id; -- --- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- Name: user_session_tokens; Type: TABLE; Schema: augur_operations; Owner: augur -- -CREATE TABLE augur_operations.users ( +CREATE TABLE augur_operations.user_session_tokens ( + token character varying NOT NULL, user_id integer NOT NULL, - login_name character varying NOT NULL, - login_hashword character varying NOT NULL, - email character varying NOT NULL, - text_phone character varying, - first_name character varying NOT NULL, - last_name character varying NOT NULL, - tool_source character varying, - tool_version character varying, - data_source character varying, - data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, - admin boolean NOT NULL + created_at bigint, + expiration bigint, + application_id character varying ); -ALTER TABLE augur_operations.users OWNER TO augur; +ALTER TABLE augur_operations.user_session_tokens OWNER TO augur; -- -- Name: users_user_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur @@ -3959,7 +4894,7 @@ CREATE SEQUENCE augur_operations.users_user_id_seq CACHE 1; -ALTER TABLE augur_operations.users_user_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.users_user_id_seq OWNER TO augur; -- -- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur @@ -4031,7 +4966,7 @@ CREATE SEQUENCE augur_operations.worker_oauth_oauth_id_seq CACHE 1; -ALTER TABLE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; +ALTER SEQUENCE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; -- -- Name: worker_oauth; Type: TABLE; Schema: augur_operations; Owner: augur @@ -4109,6 +5044,17 @@ CREATE TABLE public.alembic_version ( ALTER TABLE public.alembic_version OWNER TO augur; +-- +-- Name: test; Type: TABLE; Schema: public; Owner: augur +-- + +CREATE TABLE public.test ( + test character varying(255) +); + + +ALTER TABLE public.test OWNER TO augur; + -- -- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur -- @@ -4121,7 +5067,7 @@ CREATE SEQUENCE spdx.annotation_types_annotation_type_id_seq CACHE 1; -ALTER TABLE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; -- -- Name: annotation_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4147,7 +5093,7 @@ CREATE SEQUENCE spdx.annotations_annotation_id_seq CACHE 1; -ALTER TABLE spdx.annotations_annotation_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.annotations_annotation_id_seq OWNER TO augur; -- -- Name: annotations; Type: TABLE; Schema: spdx; Owner: augur @@ -4178,7 +5124,7 @@ CREATE SEQUENCE spdx.augur_repo_map_map_id_seq CACHE 1; -ALTER TABLE spdx.augur_repo_map_map_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.augur_repo_map_map_id_seq OWNER TO augur; -- -- Name: augur_repo_map; Type: TABLE; Schema: spdx; Owner: augur @@ -4207,7 +5153,7 @@ CREATE SEQUENCE spdx.creator_types_creator_type_id_seq CACHE 1; -ALTER TABLE spdx.creator_types_creator_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.creator_types_creator_type_id_seq OWNER TO augur; -- -- Name: creator_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4233,7 +5179,7 @@ CREATE SEQUENCE spdx.creators_creator_id_seq CACHE 1; -ALTER TABLE spdx.creators_creator_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.creators_creator_id_seq OWNER TO augur; -- -- Name: creators; Type: TABLE; Schema: spdx; Owner: augur @@ -4261,7 +5207,7 @@ CREATE SEQUENCE spdx.document_namespaces_document_namespace_id_seq CACHE 1; -ALTER TABLE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; -- -- Name: document_namespaces; Type: TABLE; Schema: spdx; Owner: augur @@ -4287,7 +5233,7 @@ CREATE SEQUENCE spdx.documents_document_id_seq CACHE 1; -ALTER TABLE spdx.documents_document_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.documents_document_id_seq OWNER TO augur; -- -- Name: documents; Type: TABLE; Schema: spdx; Owner: augur @@ -4321,7 +5267,7 @@ CREATE SEQUENCE spdx.documents_creators_document_creator_id_seq CACHE 1; -ALTER TABLE spdx.documents_creators_document_creator_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.documents_creators_document_creator_id_seq OWNER TO augur; -- -- Name: documents_creators; Type: TABLE; Schema: spdx; Owner: augur @@ -4348,7 +5294,7 @@ CREATE SEQUENCE spdx.external_refs_external_ref_id_seq CACHE 1; -ALTER TABLE spdx.external_refs_external_ref_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.external_refs_external_ref_id_seq OWNER TO augur; -- -- Name: external_refs; Type: TABLE; Schema: spdx; Owner: augur @@ -4377,7 +5323,7 @@ CREATE SEQUENCE spdx.file_contributors_file_contributor_id_seq CACHE 1; -ALTER TABLE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; -- -- Name: file_contributors; Type: TABLE; Schema: spdx; Owner: augur @@ -4416,7 +5362,7 @@ CREATE SEQUENCE spdx.file_types_file_type_id_seq CACHE 1; -ALTER TABLE spdx.file_types_file_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.file_types_file_type_id_seq OWNER TO augur; -- -- Name: files_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur @@ -4430,7 +5376,7 @@ CREATE SEQUENCE spdx.files_file_id_seq CACHE 1; -ALTER TABLE spdx.files_file_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_file_id_seq OWNER TO augur; -- -- Name: files; Type: TABLE; Schema: spdx; Owner: augur @@ -4461,7 +5407,7 @@ CREATE SEQUENCE spdx.files_licenses_file_license_id_seq CACHE 1; -ALTER TABLE spdx.files_licenses_file_license_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_licenses_file_license_id_seq OWNER TO augur; -- -- Name: files_licenses; Type: TABLE; Schema: spdx; Owner: augur @@ -4489,7 +5435,7 @@ CREATE SEQUENCE spdx.files_scans_file_scan_id_seq CACHE 1; -ALTER TABLE spdx.files_scans_file_scan_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.files_scans_file_scan_id_seq OWNER TO augur; -- -- Name: files_scans; Type: TABLE; Schema: spdx; Owner: augur @@ -4516,7 +5462,7 @@ CREATE SEQUENCE spdx.identifiers_identifier_id_seq CACHE 1; -ALTER TABLE spdx.identifiers_identifier_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.identifiers_identifier_id_seq OWNER TO augur; -- -- Name: identifiers; Type: TABLE; Schema: spdx; Owner: augur @@ -4547,7 +5493,7 @@ CREATE SEQUENCE spdx.licenses_license_id_seq CACHE 1; -ALTER TABLE spdx.licenses_license_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.licenses_license_id_seq OWNER TO augur; -- -- Name: licenses; Type: TABLE; Schema: spdx; Owner: augur @@ -4577,7 +5523,7 @@ CREATE SEQUENCE spdx.packages_package_id_seq CACHE 1; -ALTER TABLE spdx.packages_package_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_package_id_seq OWNER TO augur; -- -- Name: packages; Type: TABLE; Schema: spdx; Owner: augur @@ -4622,7 +5568,7 @@ CREATE SEQUENCE spdx.packages_files_package_file_id_seq CACHE 1; -ALTER TABLE spdx.packages_files_package_file_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_files_package_file_id_seq OWNER TO augur; -- -- Name: packages_files; Type: TABLE; Schema: spdx; Owner: augur @@ -4652,7 +5598,7 @@ CREATE SEQUENCE spdx.packages_scans_package_scan_id_seq CACHE 1; -ALTER TABLE spdx.packages_scans_package_scan_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.packages_scans_package_scan_id_seq OWNER TO augur; -- -- Name: packages_scans; Type: TABLE; Schema: spdx; Owner: augur @@ -4679,7 +5625,7 @@ CREATE SEQUENCE spdx.projects_package_id_seq CACHE 1; -ALTER TABLE spdx.projects_package_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.projects_package_id_seq OWNER TO augur; -- -- Name: projects; Type: TABLE; Schema: spdx; Owner: augur @@ -4707,7 +5653,7 @@ CREATE SEQUENCE spdx.relationship_types_relationship_type_id_seq CACHE 1; -ALTER TABLE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; -- -- Name: relationship_types; Type: TABLE; Schema: spdx; Owner: augur @@ -4733,7 +5679,7 @@ CREATE SEQUENCE spdx.relationships_relationship_id_seq CACHE 1; -ALTER TABLE spdx.relationships_relationship_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.relationships_relationship_id_seq OWNER TO augur; -- -- Name: relationships; Type: TABLE; Schema: spdx; Owner: augur @@ -4774,7 +5720,7 @@ CREATE SEQUENCE spdx.scanners_scanner_id_seq CACHE 1; -ALTER TABLE spdx.scanners_scanner_id_seq OWNER TO augur; +ALTER SEQUENCE spdx.scanners_scanner_id_seq OWNER TO augur; -- -- Name: scanners; Type: TABLE; Schema: spdx; Owner: augur @@ -4795,6 +5741,13 @@ ALTER TABLE spdx.scanners OWNER TO augur; ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextval('augur_data.chaoss_user_chaoss_id_seq'::regclass); +-- +-- Name: dei_badging id; Type: DEFAULT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging ALTER COLUMN id SET DEFAULT nextval('augur_data.dei_badging_id_seq'::regclass); + + -- -- Name: config id; Type: DEFAULT; Schema: augur_operations; Owner: augur -- @@ -4802,6 +5755,20 @@ ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextv ALTER TABLE ONLY augur_operations.config ALTER COLUMN id SET DEFAULT nextval('augur_operations.config_id_seq'::regclass); +-- +-- Name: subscription_types id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types ALTER COLUMN id SET DEFAULT nextval('augur_operations.subscription_types_id_seq'::regclass); + + +-- +-- Name: user_groups group_id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_groups ALTER COLUMN group_id SET DEFAULT nextval('augur_operations.user_groups_group_id_seq'::regclass); + + -- -- Name: users user_id; Type: DEFAULT; Schema: augur_operations; Owner: augur -- @@ -5491,6 +6458,14 @@ COPY augur_data.contributors_aliases (cntrb_alias_id, canonical_email, alias_ema \. +-- +-- Data for Name: dei_badging; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dei_badging (id, badging_id, level, repo_id) FROM stdin; +\. + + -- -- Data for Name: discourse_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur -- @@ -5810,14 +6785,14 @@ COPY augur_data.releases (release_id, repo_id, release_name, release_description -- Data for Name: repo; Type: TABLE DATA; Schema: augur_data; Owner: augur -- -COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_status, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; -25452 10 https://github.com/chaoss/whitepaper \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 -24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 -24442 10 https://github.com/operate-first/blueprint \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 -25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2020-04-17 21:40:39 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 -1 1 https://github.com/chaoss/augur \N \N 2021-08-10 14:28:44 New \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 -25430 10 https://github.com/SociallyCompute/update-test \N \N 2021-10-07 08:50:13 New \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N -25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +25452 10 https://github.com/chaoss/whitepaper \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +24442 10 https://github.com/operate-first/blueprint \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 +1 1 https://github.com/chaoss/augur \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 +25430 10 https://github.com/SociallyCompute/update-test \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N +25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2024-08-05 12:20:22 \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 \. @@ -5829,6 +6804,14 @@ COPY augur_data.repo_badging (badge_collection_id, repo_id, created_at, tool_sou \. +-- +-- Data for Name: repo_clones_data; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_clones_data (repo_clone_data_id, repo_id, unique_clones, count_clones, clone_data_timestamp) FROM stdin; +\. + + -- -- Data for Name: repo_cluster_messages; Type: TABLE DATA; Schema: augur_data; Owner: augur -- @@ -5857,7 +6840,7 @@ COPY augur_data.repo_deps_libyear (repo_deps_libyear_id, repo_id, name, requirem -- Data for Name: repo_deps_scorecard; Type: TABLE DATA; Schema: augur_data; Owner: augur -- -COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, status, score, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, score, tool_source, tool_version, data_source, data_collection_date, scorecard_check_details) FROM stdin; \. @@ -5876,6 +6859,7 @@ COPY augur_data.repo_group_insights (rgi_id, repo_group_id, rgi_metric, rgi_valu COPY augur_data.repo_groups (repo_group_id, rg_name, rg_description, rg_website, rg_recache, rg_last_modified, rg_type, tool_source, tool_version, data_source, data_collection_date) FROM stdin; 1 Default Repo Group The default repo group created by the schema generation script 0 2019-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 10 Default Repo Group The default repo group created by the schema generation script 0 2021-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +25430 Frontend Repos DO NOT DELETE OR FRONTEND REPOS WILL BREAK 0 2023-02-17 15:00:00 \N \N \N \N \N \. @@ -6045,46 +7029,35 @@ COPY augur_operations.augur_settings (id, setting, value, last_modified) FROM st \. +-- +-- Data for Name: client_applications; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.client_applications (id, api_key, user_id, name, redirect_url) FROM stdin; +\. + + +-- +-- Data for Name: collection_status; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.collection_status (repo_id, core_data_last_collected, core_status, core_task_id, secondary_data_last_collected, secondary_status, secondary_task_id, event_last_collected, facade_status, facade_data_last_collected, facade_task_id, core_weight, facade_weight, secondary_weight, issue_pr_sum, commit_sum, ml_status, ml_data_last_collected, ml_task_id, ml_weight) FROM stdin; +\. + + -- -- Data for Name: config; Type: TABLE DATA; Schema: augur_operations; Owner: augur -- COPY augur_operations.config (id, section_name, setting_name, value, type) FROM stdin; -1 Augur developer 0 int -2 Augur version 1 int -5 Facade check_updates 1 int -6 Facade clone_repos 1 int -7 Facade create_xlsx_summary_files 1 int -8 Facade delete_marked_repos 0 int -9 Facade fix_affiliations 1 int -10 Facade force_analysis 1 int -11 Facade force_invalidate_caches 1 int -12 Facade force_updates 1 int -13 Facade limited_run 0 int -14 Facade multithreaded 1 int -15 Facade nuke_stored_affiliations 0 int -16 Facade pull_repos 1 int -17 Facade rebuild_caches 1 int -18 Facade run_analysis 1 int -20 Server cache_expire 3600 str -21 Server host 0.0.0.0 str -22 Server port 5000 int -23 Server workers 6 int -24 Server timeout 6000 int -25 Server ssl false bool -26 Server ssl_cert_file \N \N -27 Server ssl_key_file \N \N -29 Logging log_level INFO str -30 Logging verbose 0 int -31 Logging quiet 0 int -32 Logging debug 0 int -33 Celery concurrency 12 int -34 Redis cache_group 0 int -35 Redis connection_string redis://localhost:6379/ str -19 Facade repo_directory /facade str -28 Logging logs_directory /logs str -3 Keys github_api_key 0 str -4 Keys gitlab_api_key 0 str +\. + + +-- +-- Data for Name: refresh_tokens; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.refresh_tokens (id, user_session_token) FROM stdin; \. @@ -6096,11 +7069,54 @@ COPY augur_operations.repos_fetch_log (repos_id, status, date) FROM stdin; \. +-- +-- Data for Name: subscription_types; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.subscription_types (id, name) FROM stdin; +\. + + +-- +-- Data for Name: subscriptions; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.subscriptions (application_id, type_id) FROM stdin; +\. + + +-- +-- Data for Name: user_groups; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_groups (group_id, user_id, name, favorited) FROM stdin; +1 1 default f +\. + + +-- +-- Data for Name: user_repos; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_repos (repo_id, group_id) FROM stdin; +1 1 +\. + + +-- +-- Data for Name: user_session_tokens; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.user_session_tokens (token, user_id, created_at, expiration, application_id) FROM stdin; +\. + + -- -- Data for Name: users; Type: TABLE DATA; Schema: augur_operations; Owner: augur -- -COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin) FROM stdin; +COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin, email_verified) FROM stdin; +1 cli_user pbkdf2:sha256:260000$oDmAfipU8Ef8TAau$835fce1fc3290b57b5e02ec83aef4613cc06664e6e7535bb6d267dc44563d5d5 cli_user \N cli_user cli_user Schema Generaation \N Schema Generation 2022-10-02 21:49:13 f f \. @@ -6269,7 +7285,15 @@ COPY augur_operations.working_commits (repos_id, working_commit) FROM stdin; -- COPY public.alembic_version (version_num) FROM stdin; -11 +28 +\. + + +-- +-- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: augur +-- + +COPY public.test (test) FROM stdin; \. @@ -6918,6 +7942,13 @@ SELECT pg_catalog.setval('augur_data.contributors_cntrb_id_seq', 25430, false); SELECT pg_catalog.setval('augur_data.contributors_history_cntrb_history_id_seq', 25430, false); +-- +-- Name: dei_badging_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.dei_badging_id_seq', 1, false); + + -- -- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- @@ -7156,6 +8187,13 @@ SELECT pg_catalog.setval('augur_data.releases_release_id_seq', 1, false); SELECT pg_catalog.setval('augur_data.repo_badging_badge_collection_id_seq', 25012, false); +-- +-- Name: repo_clones_data_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_clones_data_id_seq', 1, false); + + -- -- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- @@ -7202,7 +8240,7 @@ SELECT pg_catalog.setval('augur_data.repo_groups_list_serve_rgls_id_seq', 25430, -- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- -SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, false); +SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, true); -- @@ -7244,7 +8282,7 @@ SELECT pg_catalog.setval('augur_data.repo_meta_rmeta_id_seq', 25430, false); -- Name: repo_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur -- -SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25430, false); +SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25480, false); -- @@ -7321,7 +8359,7 @@ SELECT pg_catalog.setval('augur_operations.augur_settings_id_seq', 1, false); -- Name: config_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur -- -SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); +SELECT pg_catalog.setval('augur_operations.config_id_seq', 50, true); -- @@ -7331,11 +8369,25 @@ SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); SELECT pg_catalog.setval('augur_operations.gh_worker_history_history_id_seq', 15000, false); +-- +-- Name: subscription_types_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.subscription_types_id_seq', 1, false); + + +-- +-- Name: user_groups_group_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.user_groups_group_id_seq', 2, false); + + -- -- Name: users_user_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur -- -SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 1, false); +SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 2, false); -- @@ -7506,14 +8558,6 @@ SELECT pg_catalog.setval('spdx.relationships_relationship_id_seq', 1, false); SELECT pg_catalog.setval('spdx.scanners_scanner_id_seq', 1, false); --- --- Name: contributors GH-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.contributors - ADD CONSTRAINT "GH-UNIQUE-C" UNIQUE (gh_login) DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: contributors GL-UNIQUE-B; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7530,14 +8574,6 @@ ALTER TABLE ONLY augur_data.contributors ADD CONSTRAINT "GL-UNIQUE-C" UNIQUE (gl_username) DEFERRABLE INITIALLY DEFERRED; --- --- Name: contributors GL-cntrb-LOGIN-UNIQUE; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.contributors - ADD CONSTRAINT "GL-cntrb-LOGIN-UNIQUE" UNIQUE (cntrb_login); - - -- -- Name: pull_request_assignees assigniees-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7642,6 +8678,38 @@ ALTER TABLE ONLY augur_data.contributors_aliases ADD CONSTRAINT contributors_aliases_pkey PRIMARY KEY (cntrb_alias_id); +-- +-- Name: dei_badging dei_badging_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging + ADD CONSTRAINT dei_badging_pkey PRIMARY KEY (id, repo_id); + + +-- +-- Name: repo_dependencies deps-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT "deps-insert-unique" UNIQUE (repo_id, dep_name, data_collection_date); + + +-- +-- Name: repo_deps_libyear deps-libyear-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT "deps-libyear-insert-unique" UNIQUE (repo_id, name, data_collection_date); + + +-- +-- Name: repo_deps_scorecard deps-scorecard-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT "deps-scorecard-insert-unique" UNIQUE (repo_id, name); + + -- -- Name: discourse_insights discourse_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -7775,7 +8843,7 @@ ALTER TABLE ONLY augur_data.lstm_anomaly_results -- ALTER TABLE ONLY augur_data.message - ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id); + ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id, pltfrm_id); -- @@ -7850,6 +8918,14 @@ ALTER TABLE ONLY augur_data.pull_request_review_message_ref ADD CONSTRAINT pr_review_msg_ref_id PRIMARY KEY (pr_review_msg_ref_id); +-- +-- Name: pull_request_reviews pr_review_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pr_review_unique UNIQUE (pr_review_src_id); + + -- -- Name: pull_request_files prfiles_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8002,6 +9078,14 @@ ALTER TABLE ONLY augur_data.repo_badging ADD CONSTRAINT repo_badging_pkey PRIMARY KEY (badge_collection_id); +-- +-- Name: repo_clones_data repo_clones_data_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_clones_data + ADD CONSTRAINT repo_clones_data_pkey PRIMARY KEY (repo_clone_data_id); + + -- -- Name: repo_cluster_messages repo_cluster_messages_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8159,7 +9243,7 @@ ALTER TABLE ONLY augur_data.repo_groups_list_serve -- ALTER TABLE ONLY augur_data.repo_labor - ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name) DEFERRABLE INITIALLY DEFERRED; + ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name); -- @@ -8170,21 +9254,6 @@ ALTER TABLE ONLY augur_data.settings ADD CONSTRAINT settings_pkey PRIMARY KEY (id); --- --- Name: pull_request_reviews sourcepr-review-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.pull_request_reviews - ADD CONSTRAINT "sourcepr-review-id" UNIQUE (pr_review_src_id, tool_source); - - --- --- Name: CONSTRAINT "sourcepr-review-id" ON pull_request_reviews; Type: COMMENT; Schema: augur_data; Owner: augur --- - -COMMENT ON CONSTRAINT "sourcepr-review-id" ON augur_data.pull_request_reviews IS 'Natural Key from Source, plus tool source to account for different platforms like GitHub and gitlab. '; - - -- -- Name: platform theplat; Type: CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -8319,6 +9388,22 @@ ALTER TABLE ONLY augur_operations.augur_settings ADD CONSTRAINT augur_settings_pkey PRIMARY KEY (id); +-- +-- Name: client_applications client_applications_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.client_applications + ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id); + + +-- +-- Name: collection_status collection_status_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.collection_status + ADD CONSTRAINT collection_status_pkey PRIMARY KEY (repo_id); + + -- -- Name: config config_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- @@ -8344,43 +9429,115 @@ ALTER TABLE ONLY augur_operations.worker_job -- --- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: refresh_tokens refresh_token_user_session_token_id_unique; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_token_user_session_token_id_unique UNIQUE (user_session_token); + + +-- +-- Name: refresh_tokens refresh_tokens_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_tokens_pkey PRIMARY KEY (id); + + +-- +-- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_settings_facade + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: subscription_types subscription_type_title_unique; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types + ADD CONSTRAINT subscription_type_title_unique UNIQUE (name); + + +-- +-- Name: subscription_types subscription_types_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscription_types + ADD CONSTRAINT subscription_types_pkey PRIMARY KEY (id); + + +-- +-- Name: subscriptions subscriptions_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_pkey PRIMARY KEY (application_id, type_id); + + +-- +-- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); + + +-- +-- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-email" UNIQUE (email); + + +-- +-- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); + + +-- +-- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.worker_settings_facade - ADD CONSTRAINT settings_pkey PRIMARY KEY (id); +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); -- --- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_groups user_groups_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.config - ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_pkey PRIMARY KEY (group_id); -- --- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_groups user_groups_user_id_name_key; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-email" UNIQUE (email); +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_user_id_name_key UNIQUE (user_id, name); -- --- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_repos user_repos_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_pkey PRIMARY KEY (group_id, repo_id); -- --- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- Name: user_session_tokens user_session_tokens_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur -- -ALTER TABLE ONLY augur_operations.users - ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_tokens_pkey PRIMARY KEY (token); -- @@ -8750,6 +9907,34 @@ ALTER TABLE ONLY spdx.scanners CREATE INDEX "REPO_DEP" ON augur_data.library_dependencies USING btree (library_id); +-- +-- Name: api_get_all_repo_prs_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repo_prs_repo_id_idx ON augur_data.api_get_all_repo_prs USING btree (repo_id); + + +-- +-- Name: api_get_all_repos_commits_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repos_commits_repo_id_idx ON augur_data.api_get_all_repos_commits USING btree (repo_id); + + +-- +-- Name: api_get_all_repos_issues_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX api_get_all_repos_issues_repo_id_idx ON augur_data.api_get_all_repos_issues USING btree (repo_id); + + +-- +-- Name: augur_new_contributors_cntrb_id_created_at_repo_id_repo_nam_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX augur_new_contributors_cntrb_id_created_at_repo_id_repo_nam_idx ON augur_data.augur_new_contributors USING btree (cntrb_id, created_at, repo_id, repo_name, login, rank); + + -- -- Name: author_affiliation; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -8883,6 +10068,76 @@ CREATE INDEX contributors_idx_cntrb_email3 ON augur_data.contributors USING btre CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); +-- +-- Name: explorer_commits_and_committers__repo_id_cmt_committer_date_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_commits_and_committers__repo_id_cmt_committer_date_idx ON augur_data.explorer_commits_and_committers_daily_count USING btree (repo_id, cmt_committer_date); + + +-- +-- Name: explorer_contributor_actions_cntrb_id_created_at_repo_id_ac_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_contributor_actions_cntrb_id_created_at_repo_id_ac_idx ON augur_data.explorer_contributor_actions USING btree (cntrb_id, created_at, repo_id, action, repo_name, login, rank); + + +-- +-- Name: explorer_entry_list_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_entry_list_repo_id_idx ON augur_data.explorer_entry_list USING btree (repo_id); + + +-- +-- Name: explorer_issue_assignments_issue_id_id_node_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_issue_assignments_issue_id_id_node_id_idx ON augur_data.explorer_issue_assignments USING btree (issue_id, id, node_id); + + +-- +-- Name: explorer_new_contributors_cntrb_id_created_at_month_year_re_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_new_contributors_cntrb_id_created_at_month_year_re_idx ON augur_data.explorer_new_contributors USING btree (cntrb_id, created_at, month, year, repo_id, full_name, repo_name, login, rank); + + +-- +-- Name: explorer_pr_assignments_pull_request_id_id_node_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_assignments_pull_request_id_id_node_id_idx ON augur_data.explorer_pr_assignments USING btree (pull_request_id, id, node_id); + + +-- +-- Name: explorer_pr_response_pull_request_id_id_cntrb_id_msg_cntrb__idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_response_pull_request_id_id_cntrb_id_msg_cntrb__idx ON augur_data.explorer_pr_response USING btree (pull_request_id, id, cntrb_id, msg_cntrb_id, msg_timestamp); + + +-- +-- Name: explorer_pr_response_times_repo_id_pr_src_id_pr_src_meta_la_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_pr_response_times_repo_id_pr_src_id_pr_src_meta_la_idx ON augur_data.explorer_pr_response_times USING btree (repo_id, pr_src_id, pr_src_meta_label); + + +-- +-- Name: explorer_repo_languages_repo_id_programming_language_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_repo_languages_repo_id_programming_language_idx ON augur_data.explorer_repo_languages USING btree (repo_id, programming_language); + + +-- +-- Name: explorer_user_repos_login_name_user_id_group_id_repo_id_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX explorer_user_repos_login_name_user_id_group_id_repo_id_idx ON augur_data.explorer_user_repos USING btree (login_name, user_id, group_id, repo_id); + + -- -- Name: forked; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -8890,6 +10145,13 @@ CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); CREATE INDEX forked ON augur_data.repo USING btree (forked_from); +-- +-- Name: gh_login; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX gh_login ON augur_data.contributors USING btree (gh_login NULLS FIRST); + + -- -- Name: id_node; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9016,6 +10278,13 @@ CREATE INDEX "pr-cntrb-idx-repo" ON augur_data.pull_request_repo USING btree (pr CREATE INDEX "pr-reviewers-cntrb-idx1" ON augur_data.pull_request_reviewers USING btree (cntrb_id); +-- +-- Name: pr_ID_prs_table; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_ID_prs_table" ON augur_data.pull_requests USING btree (pull_request_id); + + -- -- Name: pr_anal_idx; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9037,6 +10306,20 @@ CREATE INDEX pr_events_ibfk_1 ON augur_data.pull_request_events USING btree (pul CREATE INDEX pr_events_ibfk_2 ON augur_data.pull_request_events USING btree (cntrb_id); +-- +-- Name: pr_id_pr_files; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_id_pr_files ON augur_data.pull_request_files USING btree (pull_request_id); + + +-- +-- Name: pr_id_pr_reviews; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_id_pr_reviews ON augur_data.pull_request_reviews USING btree (pull_request_id); + + -- -- Name: pr_meta-cntrbid-idx; Type: INDEX; Schema: augur_data; Owner: augur -- @@ -9317,6 +10600,14 @@ CREATE INDEX "type,projects_id" ON augur_data.unknown_cache USING btree (type, r CREATE INDEX "repos_id,statusops" ON augur_operations.repos_fetch_log USING btree (repos_id, status); +-- +-- Name: commits cmt_ght_author_cntrb_id_fk; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT cmt_ght_author_cntrb_id_fk FOREIGN KEY (cmt_ght_author_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: contributor_repo contributor_repo_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -9373,22 +10664,6 @@ ALTER TABLE ONLY augur_data.commit_parents ADD CONSTRAINT fk_commit_parents_commits_2 FOREIGN KEY (parent_id) REFERENCES augur_data.commits(cmt_id); --- --- Name: commits fk_commits_contributors_3; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.commits - ADD CONSTRAINT fk_commits_contributors_3 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - - --- --- Name: commits fk_commits_contributors_4; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur --- - -ALTER TABLE ONLY augur_data.commits - ADD CONSTRAINT fk_commits_contributors_4 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - - -- -- Name: commits fk_commits_repo_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -10012,6 +11287,14 @@ ALTER TABLE ONLY augur_data.pull_requests ADD CONSTRAINT pull_requests_pr_augur_contributor_id_fkey FOREIGN KEY (pr_augur_contributor_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; +-- +-- Name: repo_clones_data repo_clones_data_repo_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_clones_data + ADD CONSTRAINT repo_clones_data_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + -- -- Name: repo_dependencies repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur -- @@ -10052,6 +11335,94 @@ ALTER TABLE ONLY augur_data.repo_sbom_scans ADD CONSTRAINT repo_linker_sbom FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; +-- +-- Name: dei_badging user_repo_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.dei_badging + ADD CONSTRAINT user_repo_user_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: client_applications client_application_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.client_applications + ADD CONSTRAINT client_application_user_id_fkey FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + +-- +-- Name: collection_status collection_status_repo_id_fk; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.collection_status + ADD CONSTRAINT collection_status_repo_id_fk FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: refresh_tokens refresh_token_session_token_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.refresh_tokens + ADD CONSTRAINT refresh_token_session_token_id_fkey FOREIGN KEY (user_session_token) REFERENCES augur_operations.user_session_tokens(token); + + +-- +-- Name: subscriptions subscriptions_application_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_application_id_fkey FOREIGN KEY (application_id) REFERENCES augur_operations.client_applications(id); + + +-- +-- Name: subscriptions subscriptions_type_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.subscriptions + ADD CONSTRAINT subscriptions_type_id_fkey FOREIGN KEY (type_id) REFERENCES augur_operations.subscription_types(id); + + +-- +-- Name: user_groups user_groups_user_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_groups + ADD CONSTRAINT user_groups_user_id_fkey FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + +-- +-- Name: user_repos user_repos_group_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_group_id_fkey FOREIGN KEY (group_id) REFERENCES augur_operations.user_groups(group_id); + + +-- +-- Name: user_repos user_repos_repo_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_repos + ADD CONSTRAINT user_repos_repo_id_fkey FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: user_session_tokens user_session_token_application_id_fkey; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_token_application_id_fkey FOREIGN KEY (application_id) REFERENCES augur_operations.client_applications(id); + + +-- +-- Name: user_session_tokens user_session_token_user_fk; Type: FK CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.user_session_tokens + ADD CONSTRAINT user_session_token_user_fk FOREIGN KEY (user_id) REFERENCES augur_operations.users(user_id); + + -- -- Name: annotations annotations_annotation_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur -- @@ -10324,6 +11695,104 @@ ALTER TABLE ONLY spdx.relationships ADD CONSTRAINT relationships_right_identifier_id_fkey FOREIGN KEY (right_identifier_id) REFERENCES spdx.identifiers(identifier_id); +-- +-- Name: api_get_all_repo_prs; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repo_prs; + + +-- +-- Name: api_get_all_repos_commits; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_commits; + + +-- +-- Name: api_get_all_repos_issues; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.api_get_all_repos_issues; + + +-- +-- Name: augur_new_contributors; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.augur_new_contributors; + + +-- +-- Name: explorer_commits_and_committers_daily_count; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_commits_and_committers_daily_count; + + +-- +-- Name: explorer_contributor_actions; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_contributor_actions; + + +-- +-- Name: explorer_entry_list; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_entry_list; + + +-- +-- Name: explorer_issue_assignments; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_issue_assignments; + + +-- +-- Name: explorer_new_contributors; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_new_contributors; + + +-- +-- Name: explorer_pr_assignments; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_assignments; + + +-- +-- Name: explorer_pr_response; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_response; + + +-- +-- Name: explorer_pr_response_times; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_pr_response_times; + + +-- +-- Name: explorer_repo_languages; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_repo_languages; + + +-- +-- Name: explorer_user_repos; Type: MATERIALIZED VIEW DATA; Schema: augur_data; Owner: augur +-- + +REFRESH MATERIALIZED VIEW augur_data.explorer_user_repos; + + -- -- PostgreSQL database dump complete -- diff --git a/docker/database/augur-retired-sql.schema b/docker/database/augur-retired-sql.schema new file mode 100644 index 0000000000..ac3872a1d5 --- /dev/null +++ b/docker/database/augur-retired-sql.schema @@ -0,0 +1,10330 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) +-- Dumped by pg_dump version 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Name: augur_data; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA augur_data; + + +ALTER SCHEMA augur_data OWNER TO augur; + +-- +-- Name: augur_operations; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA augur_operations; + + +ALTER SCHEMA augur_operations OWNER TO augur; + +-- +-- Name: spdx; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA spdx; + + +ALTER SCHEMA spdx OWNER TO augur; + +-- +-- Name: toss_specific; Type: SCHEMA; Schema: -; Owner: augur +-- + +CREATE SCHEMA toss_specific; + + +ALTER SCHEMA toss_specific OWNER TO augur; + +-- +-- Name: refresh_aggregates(); Type: PROCEDURE; Schema: augur_data; Owner: augur +-- + +CREATE PROCEDURE augur_data.refresh_aggregates() + LANGUAGE plpgsql + AS $$ + begin + perform pg_advisory_lock(124); + execute 'REFRESH MATERIALIZED VIEW "augur_data"."issue_reporter_created_at"'; + perform pg_advisory_unlock(124); + end; +$$; + + +ALTER PROCEDURE augur_data.refresh_aggregates() OWNER TO augur; + +-- +-- Name: create_constraint_if_not_exists(text, text, text); Type: FUNCTION; Schema: public; Owner: augur +-- + +CREATE FUNCTION public.create_constraint_if_not_exists(t_name text, c_name text, constraint_sql text) RETURNS void + LANGUAGE plpgsql + AS $$ + BEGIN + -- Look for our constraint + IF NOT EXISTS (SELECT constraint_name + FROM information_schema.constraint_column_usage + WHERE constraint_name = c_name) THEN + EXECUTE 'ALTER TABLE ' || t_name || ' ADD CONSTRAINT ' || c_name || ' ' || constraint_sql; + END IF; + END; +$$; + + +ALTER FUNCTION public.create_constraint_if_not_exists(t_name text, c_name text, constraint_sql text) OWNER TO augur; + +-- +-- Name: pc_chartoint(character varying); Type: FUNCTION; Schema: public; Owner: augur +-- + +CREATE FUNCTION public.pc_chartoint(chartoconvert character varying) RETURNS integer + LANGUAGE sql IMMUTABLE STRICT + AS $_$ +SELECT CASE WHEN trim($1) SIMILAR TO '[0-9]+' + THEN CAST(trim($1) AS integer) + ELSE NULL END; + +$_$; + + +ALTER FUNCTION public.pc_chartoint(chartoconvert character varying) OWNER TO augur; + +-- +-- Name: refresh_aggregates(); Type: PROCEDURE; Schema: public; Owner: augur +-- + +CREATE PROCEDURE public.refresh_aggregates() + LANGUAGE plpgsql + AS $$ + begin + perform pg_advisory_lock(124); + execute 'REFRESH MATERIALIZED VIEW "augur_data"."issue_reporter_created_at"'; + perform pg_advisory_unlock(124); + end; +$$; + + +ALTER PROCEDURE public.refresh_aggregates() OWNER TO augur; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: analysis_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.analysis_log ( + repos_id integer NOT NULL, + status character varying NOT NULL, + date_attempted timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.analysis_log OWNER TO augur; + +-- +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data."augur_data.repo_insights_ri_id_seq" + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data."augur_data.repo_insights_ri_id_seq" OWNER TO augur; + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.chaoss_metric_status_cms_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.chaoss_metric_status_cms_id_seq OWNER TO augur; + +-- +-- Name: chaoss_metric_status; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.chaoss_metric_status ( + cms_id bigint DEFAULT nextval('augur_data.chaoss_metric_status_cms_id_seq'::regclass) NOT NULL, + cm_group character varying, + cm_source character varying, + cm_type character varying, + cm_backend_status character varying, + cm_frontend_status character varying, + cm_defined boolean, + cm_api_endpoint_repo character varying, + cm_api_endpoint_rg character varying, + cm_name character varying, + cm_working_group character varying, + cm_info json, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cm_working_group_focus_area character varying +); + + +ALTER TABLE augur_data.chaoss_metric_status OWNER TO augur; + +-- +-- Name: TABLE chaoss_metric_status; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.chaoss_metric_status IS 'This table used to track CHAOSS Metric implementations in Augur, but due to the constantly changing location of that information, it is for the moment not actively populated. '; + + +-- +-- Name: chaoss_user; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.chaoss_user ( + chaoss_id bigint NOT NULL, + chaoss_login_name character varying, + chaoss_login_hashword character varying, + chaoss_email character varying, + chaoss_text_phone character varying, + chaoss_first_name character varying, + chaoss_last_name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT now() +); + + +ALTER TABLE augur_data.chaoss_user OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.chaoss_user_chaoss_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.chaoss_user_chaoss_id_seq OWNER TO augur; + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_data; Owner: augur +-- + +ALTER SEQUENCE augur_data.chaoss_user_chaoss_id_seq OWNED BY augur_data.chaoss_user.chaoss_id; + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_comment_ref_cmt_comment_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commit_comment_ref_cmt_comment_id_seq OWNER TO augur; + +-- +-- Name: commit_comment_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commit_comment_ref ( + cmt_comment_id bigint DEFAULT nextval('augur_data.commit_comment_ref_cmt_comment_id_seq'::regclass) NOT NULL, + cmt_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + user_id bigint NOT NULL, + body text, + line bigint, + "position" bigint, + commit_comment_src_node_id character varying, + cmt_comment_src_id bigint NOT NULL, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.commit_comment_ref OWNER TO augur; + +-- +-- Name: COLUMN commit_comment_ref.commit_comment_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.commit_comment_ref.commit_comment_src_node_id IS 'For data provenance, we store the source node ID if it exists. '; + + +-- +-- Name: COLUMN commit_comment_ref.cmt_comment_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.commit_comment_ref.cmt_comment_src_id IS 'For data provenance, we store the source ID if it exists. '; + + +-- +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commit_parents_parent_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commit_parents_parent_id_seq OWNER TO augur; + +-- +-- Name: commit_parents; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commit_parents ( + cmt_id bigint NOT NULL, + parent_id bigint DEFAULT nextval('augur_data.commit_parents_parent_id_seq'::regclass) NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.commit_parents OWNER TO augur; + +-- +-- Name: commits_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.commits_cmt_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.commits_cmt_id_seq OWNER TO augur; + +-- +-- Name: commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.commits ( + cmt_id bigint DEFAULT nextval('augur_data.commits_cmt_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + cmt_commit_hash character varying(80) NOT NULL, + cmt_author_name character varying NOT NULL, + cmt_author_raw_email character varying NOT NULL, + cmt_author_email character varying NOT NULL, + cmt_author_date character varying(10) NOT NULL, + cmt_author_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_committer_name character varying NOT NULL, + cmt_committer_raw_email character varying NOT NULL, + cmt_committer_email character varying NOT NULL, + cmt_committer_date character varying NOT NULL, + cmt_committer_affiliation character varying DEFAULT 'NULL'::character varying, + cmt_added integer NOT NULL, + cmt_removed integer NOT NULL, + cmt_whitespace integer NOT NULL, + cmt_filename character varying NOT NULL, + cmt_date_attempted timestamp(0) without time zone NOT NULL, + cmt_ght_committer_id integer, + cmt_ght_committed_at timestamp(0) without time zone, + cmt_committer_timestamp timestamp(0) with time zone, + cmt_author_timestamp timestamp(0) with time zone, + cmt_author_platform_username character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cmt_ght_author_id uuid +); + + +ALTER TABLE augur_data.commits OWNER TO augur; + +-- +-- Name: TABLE commits; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.commits IS 'Commits. +Each row represents changes to one FILE within a single commit. So you will encounter multiple rows per commit hash in many cases. '; + + +-- +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributor_affiliations_ca_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributor_affiliations_ca_id_seq OWNER TO augur; + +-- +-- Name: contributor_affiliations; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributor_affiliations ( + ca_id bigint DEFAULT nextval('augur_data.contributor_affiliations_ca_id_seq'::regclass) NOT NULL, + ca_domain character varying(64) NOT NULL, + ca_start_date date DEFAULT '1970-01-01'::date, + ca_last_used timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + ca_affiliation character varying, + ca_active smallint DEFAULT 1, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.contributor_affiliations OWNER TO augur; + +-- +-- Name: TABLE contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributor_affiliations IS 'This table exists outside of relations with other tables. The purpose is to provide a dynamic, owner maintained (and augur augmented) list of affiliations. This table is processed in affiliation information in the DM_ tables generated when Augur is finished counting commits using the Facade Worker. '; + + +-- +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributor_repo_cntrb_repo_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributor_repo_cntrb_repo_id_seq OWNER TO augur; + +-- +-- Name: contributor_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributor_repo ( + cntrb_repo_id bigint DEFAULT nextval('augur_data.contributor_repo_cntrb_repo_id_seq'::regclass) NOT NULL, + repo_git character varying NOT NULL, + repo_name character varying NOT NULL, + gh_repo_id bigint NOT NULL, + cntrb_category character varying, + event_id bigint, + created_at timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributor_repo OWNER TO augur; + +-- +-- Name: TABLE contributor_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributor_repo IS 'Developed in Partnership with Andrew Brain. +From: [ + { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "repos_url": "https://api.github.com/users/octocat/repos", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "type": "User", + "site_admin": false + } +] +'; + + +-- +-- Name: COLUMN contributor_repo.repo_git; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributor_repo.repo_git IS 'Similar to cntrb_id, we need this data for the table to have meaningful data. '; + + +-- +-- Name: COLUMN contributor_repo.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributor_repo.cntrb_id IS 'This is not null because what is the point without the contributor in this table? '; + + +-- +-- Name: contributors; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributors ( + cntrb_login character varying, + cntrb_email character varying, + cntrb_full_name character varying, + cntrb_company character varying, + cntrb_created_at timestamp(0) without time zone, + cntrb_type character varying, + cntrb_fake smallint DEFAULT 0, + cntrb_deleted smallint DEFAULT 0, + cntrb_long numeric(11,8) DEFAULT NULL::numeric, + cntrb_lat numeric(10,8) DEFAULT NULL::numeric, + cntrb_country_code character(3) DEFAULT NULL::bpchar, + cntrb_state character varying, + cntrb_city character varying, + cntrb_location character varying, + cntrb_canonical character varying, + cntrb_last_used timestamp(0) with time zone DEFAULT NULL::timestamp with time zone, + gh_user_id bigint, + gh_login character varying, + gh_url character varying, + gh_html_url character varying, + gh_node_id character varying, + gh_avatar_url character varying, + gh_gravatar_id character varying, + gh_followers_url character varying, + gh_following_url character varying, + gh_gists_url character varying, + gh_starred_url character varying, + gh_subscriptions_url character varying, + gh_organizations_url character varying, + gh_repos_url character varying, + gh_events_url character varying, + gh_received_events_url character varying, + gh_type character varying, + gh_site_admin character varying, + gl_web_url character varying, + gl_avatar_url character varying, + gl_state character varying, + gl_username character varying, + gl_full_name character varying, + gl_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributors OWNER TO augur; + +-- +-- Name: TABLE contributors; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributors IS 'For GitHub, this should be repeated from gh_login. for other systems, it should be that systems login. +Github now allows a user to change their login name, but their user id remains the same in this case. So, the natural key is the combination of id and login, but there should never be repeated logins. '; + + +-- +-- Name: COLUMN contributors.cntrb_login; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_login IS 'Will be a double population with the same value as gh_login for github, but the local value for other systems. '; + + +-- +-- Name: COLUMN contributors.cntrb_email; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_email IS 'This needs to be here for matching contributor ids, which are augur, to the commit information. '; + + +-- +-- Name: COLUMN contributors.cntrb_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.cntrb_type IS 'Present in another models. It is not currently used in Augur. '; + + +-- +-- Name: COLUMN contributors.gh_login; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gh_login IS 'populated with the github user name for github originated data. '; + + +-- +-- Name: COLUMN contributors.gl_web_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_web_url IS '“web_url” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_avatar_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_avatar_url IS '“avatar_url” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_state; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_state IS '“state” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_username; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_username IS '“username” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_full_name; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_full_name IS '“name” value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: COLUMN contributors.gl_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.contributors.gl_id IS '"id" value from these API calls to GitLab, all for the same user + +https://gitlab.com/api/v4/users?username=computationalmystic +https://gitlab.com/api/v4/users?search=s@goggins.com +https://gitlab.com/api/v4/users?search=outdoors@acm.org + +[ + { + "id": 5481034, + "name": "sean goggins", + "username": "computationalmystic", + "state": "active", + "avatar_url": "https://secure.gravatar.com/avatar/fb1fb43953a6059df2fe8d94b21d575c?s=80&d=identicon", + "web_url": "https://gitlab.com/computationalmystic" + } +]'; + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_alias_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_aliases_cntrb_alias_id_seq OWNER TO augur; + +-- +-- Name: contributors_aliases; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.contributors_aliases ( + cntrb_alias_id bigint DEFAULT nextval('augur_data.contributors_aliases_cntrb_alias_id_seq'::regclass) NOT NULL, + canonical_email character varying NOT NULL, + alias_email character varying NOT NULL, + cntrb_active smallint DEFAULT 1 NOT NULL, + cntrb_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.contributors_aliases OWNER TO augur; + +-- +-- Name: TABLE contributors_aliases; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.contributors_aliases IS 'Every open source user may have more than one email used to make contributions over time. Augur selects the first email it encounters for a user as its “canonical_email”. + +The canonical_email is also added to the contributors_aliases table, with the canonical_email and alias_email being identical. Using this strategy, an email search will only need to join the alias table for basic email information, and can then more easily map the canonical email from each alias row to the same, more detailed information in the contributors table for a user. '; + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_aliases_cntrb_a_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_aliases_cntrb_a_id_seq OWNER TO augur; + +-- +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_cntrb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_cntrb_id_seq OWNER TO augur; + +-- +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.contributors_history_cntrb_history_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.contributors_history_cntrb_history_id_seq OWNER TO augur; + +-- +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq1 OWNER TO augur; + +-- +-- Name: discourse_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.discourse_insights ( + msg_discourse_id bigint DEFAULT nextval('augur_data.discourse_insights_msg_discourse_id_seq1'::regclass) NOT NULL, + msg_id bigint, + discourse_act character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.discourse_insights OWNER TO augur; + +-- +-- Name: TABLE discourse_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.discourse_insights IS 'This table is populated by the “Discourse_Analysis_Worker”. It examines sequential discourse, using computational linguistic methods, to draw statistical inferences regarding the discourse in a particular comment thread. '; + + +-- +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.discourse_insights_msg_discourse_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.discourse_insights_msg_discourse_id_seq OWNER TO augur; + +-- +-- Name: dm_repo_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_annual ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_annual OWNER TO augur; + +-- +-- Name: dm_repo_group_annual; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_annual ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_annual OWNER TO augur; + +-- +-- Name: dm_repo_group_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_monthly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_monthly OWNER TO augur; + +-- +-- Name: dm_repo_group_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_group_weekly ( + repo_group_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_group_weekly OWNER TO augur; + +-- +-- Name: dm_repo_monthly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_monthly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + month smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_monthly OWNER TO augur; + +-- +-- Name: dm_repo_weekly; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.dm_repo_weekly ( + repo_id bigint NOT NULL, + email character varying NOT NULL, + affiliation character varying DEFAULT 'NULL'::character varying, + week smallint NOT NULL, + year smallint NOT NULL, + added bigint NOT NULL, + removed bigint NOT NULL, + whitespace bigint NOT NULL, + files bigint NOT NULL, + patches bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.dm_repo_weekly OWNER TO augur; + +-- +-- Name: exclude; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.exclude ( + id integer NOT NULL, + projects_id integer NOT NULL, + email character varying DEFAULT 'NULL'::character varying, + domain character varying DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_data.exclude OWNER TO augur; + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_assignees_issue_assignee_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_assignees_issue_assignee_id_seq OWNER TO augur; + +-- +-- Name: issue_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_assignees ( + issue_assignee_id bigint DEFAULT nextval('augur_data.issue_assignees_issue_assignee_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + issue_assignee_src_id bigint, + issue_assignee_src_node character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_assignees OWNER TO augur; + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: COLUMN issue_assignees.issue_assignee_src_node; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_assignees.issue_assignee_src_node IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API in the issue_assignees embedded JSON object. We may discover it is an ID for the person themselves; but my hypothesis is that its not.'; + + +-- +-- Name: issue_events_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_events_event_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_events_event_id_seq OWNER TO augur; + +-- +-- Name: issue_events; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_events ( + event_id bigint DEFAULT nextval('augur_data.issue_events_event_id_seq'::regclass) NOT NULL, + issue_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + node_id character varying, + node_url character varying, + platform_id bigint NOT NULL, + issue_event_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issue_events OWNER TO augur; + +-- +-- Name: COLUMN issue_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + + +-- +-- Name: COLUMN issue_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_labels_issue_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_labels_issue_label_id_seq OWNER TO augur; + +-- +-- Name: issue_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_labels ( + issue_label_id bigint DEFAULT nextval('augur_data.issue_labels_issue_label_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + label_text character varying, + label_description character varying, + label_color character varying, + label_src_id bigint, + label_src_node_id character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_labels OWNER TO augur; + +-- +-- Name: COLUMN issue_labels.label_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_labels.label_src_id IS 'This character based identifier (node) comes from the source. In the case of GitHub, it is the id that is the second field returned from the issue events API JSON subsection for issues.'; + + +-- +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_message_ref_issue_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_message_ref_issue_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: issue_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issue_message_ref ( + issue_msg_ref_id bigint DEFAULT nextval('augur_data.issue_message_ref_issue_msg_ref_id_seq'::regclass) NOT NULL, + issue_id bigint, + repo_id bigint, + msg_id bigint, + issue_msg_ref_src_node_id character varying, + issue_msg_ref_src_comment_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.issue_message_ref OWNER TO augur; + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_node_id IS 'This character based identifier comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: COLUMN issue_message_ref.issue_msg_ref_src_comment_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issue_message_ref.issue_msg_ref_src_comment_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue comments API'; + + +-- +-- Name: issue_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.issue_seq + START WITH 31000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.issue_seq OWNER TO augur; + +-- +-- Name: issues; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.issues ( + issue_id bigint DEFAULT nextval('augur_data.issue_seq'::regclass) NOT NULL, + repo_id bigint, + pull_request bigint, + pull_request_id bigint, + created_at timestamp(0) without time zone, + issue_title character varying, + issue_body character varying, + comment_count bigint, + updated_at timestamp(0) without time zone, + closed_at timestamp(0) without time zone, + due_on timestamp(0) without time zone, + repository_url character varying, + issue_url character varying, + labels_url character varying, + comments_url character varying, + events_url character varying, + html_url character varying, + issue_state character varying, + issue_node_id character varying, + gh_issue_number bigint, + gh_issue_id bigint, + gh_user_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + reporter_id uuid, + cntrb_id uuid +); + + +ALTER TABLE augur_data.issues OWNER TO augur; + +-- +-- Name: COLUMN issues.reporter_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issues.reporter_id IS 'The ID of the person who opened the issue. '; + + +-- +-- Name: COLUMN issues.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.issues.cntrb_id IS 'The ID of the person who closed the issue. '; + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.libraries_library_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.libraries_library_id_seq OWNER TO augur; + +-- +-- Name: libraries; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.libraries ( + library_id bigint DEFAULT nextval('augur_data.libraries_library_id_seq'::regclass) NOT NULL, + repo_id bigint, + platform character varying, + name character varying, + created_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + updated_timestamp timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + library_description character varying(2000) DEFAULT NULL::character varying, + keywords character varying, + library_homepage character varying(1000) DEFAULT NULL::character varying, + license character varying, + version_count integer, + latest_release_timestamp character varying, + latest_release_number character varying, + package_manager_id character varying, + dependency_count integer, + dependent_library_count integer, + primary_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.libraries OWNER TO augur; + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_dependencies_lib_dependency_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.library_dependencies_lib_dependency_id_seq OWNER TO augur; + +-- +-- Name: library_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_dependencies ( + lib_dependency_id bigint DEFAULT nextval('augur_data.library_dependencies_lib_dependency_id_seq'::regclass) NOT NULL, + library_id bigint, + manifest_platform character varying, + manifest_filepath character varying(1000) DEFAULT NULL::character varying, + manifest_kind character varying, + repo_id_branch character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_dependencies OWNER TO augur; + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.library_version_library_version_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.library_version_library_version_id_seq OWNER TO augur; + +-- +-- Name: library_version; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.library_version ( + library_version_id bigint DEFAULT nextval('augur_data.library_version_library_version_id_seq'::regclass) NOT NULL, + library_id bigint, + library_platform character varying, + version_number character varying, + version_release_date timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.library_version OWNER TO augur; + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_models_model_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.lstm_anomaly_models_model_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_models; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_models ( + model_id bigint DEFAULT nextval('augur_data.lstm_anomaly_models_model_id_seq'::regclass) NOT NULL, + model_name character varying, + model_description character varying, + look_back_days bigint, + training_days bigint, + batch_size bigint, + metric character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_models OWNER TO augur; + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.lstm_anomaly_results_result_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.lstm_anomaly_results_result_id_seq OWNER TO augur; + +-- +-- Name: lstm_anomaly_results; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.lstm_anomaly_results ( + result_id bigint DEFAULT nextval('augur_data.lstm_anomaly_results_result_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_category character varying, + model_id bigint, + metric character varying, + contamination_factor double precision, + mean_absolute_error double precision, + remarks character varying, + metric_field character varying, + mean_absolute_actual_value double precision, + mean_absolute_prediction_value double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.lstm_anomaly_results OWNER TO augur; + +-- +-- Name: COLUMN lstm_anomaly_results.metric_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.lstm_anomaly_results.metric_field IS 'This is a listing of all of the endpoint fields included in the generation of the metric. Sometimes there is one, sometimes there is more than one. This will list them all. '; + + +-- +-- Name: message_msg_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_msg_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_msg_id_seq OWNER TO augur; + +-- +-- Name: message; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message ( + msg_id bigint DEFAULT nextval('augur_data.message_msg_id_seq'::regclass) NOT NULL, + rgls_id bigint, + platform_msg_id bigint, + platform_node_id character varying, + repo_id bigint, + msg_text character varying, + msg_timestamp timestamp(0) without time zone, + msg_sender_email character varying, + msg_header character varying, + pltfrm_id bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.message OWNER TO augur; + +-- +-- Name: COLUMN message.cntrb_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message.cntrb_id IS 'Not populated for mailing lists. Populated for GitHub issues. '; + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_analysis_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_analysis_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis OWNER TO augur; + +-- +-- Name: COLUMN message_analysis.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_analysis.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_analysis.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_analysis.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_analysis.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_analysis_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_analysis_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_analysis_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_analysis_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_analysis_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_analysis_summary OWNER TO augur; + +-- +-- Name: TABLE message_analysis_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_analysis_summary IS 'In a relationally perfect world, we would have a table called “message_analysis_run” the incremented the “worker_run_id” for both message_analysis and message_analysis_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_analysis_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_analysis_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_analysis_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_analysis_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_msg_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_sentiment_msg_analysis_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment ( + msg_analysis_id bigint DEFAULT nextval('augur_data.message_sentiment_msg_analysis_id_seq'::regclass) NOT NULL, + msg_id bigint, + worker_run_id bigint, + sentiment_score double precision, + reconstruction_error double precision, + novelty_flag boolean, + feedback_flag boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment OWNER TO augur; + +-- +-- Name: COLUMN message_sentiment.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.worker_run_id IS 'This column is used to indicate analyses run by a worker during the same execution period, and is useful for grouping, and time series analysis. '; + + +-- +-- Name: COLUMN message_sentiment.sentiment_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.sentiment_score IS 'A sentiment analysis score. Zero is neutral, negative numbers are negative sentiment, and positive numbers are positive sentiment. '; + + +-- +-- Name: COLUMN message_sentiment.reconstruction_error; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.reconstruction_error IS 'Each message is converted to a 250 dimensin doc2vec vector, so the reconstruction error is the difference between what the predicted vector and the actual vector.'; + + +-- +-- Name: COLUMN message_sentiment.novelty_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.novelty_flag IS 'This is an analysis of the degree to which the message is novel when compared to other messages in a repository. For example when bots are producing numerous identical messages, the novelty score is low. It would also be a low novelty score when several people are making the same coment. '; + + +-- +-- Name: COLUMN message_sentiment.feedback_flag; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment.feedback_flag IS 'This exists to provide the user with an opportunity provide feedback on the resulting the sentiment scores. '; + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.message_sentiment_summary_msg_summary_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.message_sentiment_summary_msg_summary_id_seq OWNER TO augur; + +-- +-- Name: message_sentiment_summary; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.message_sentiment_summary ( + msg_summary_id bigint DEFAULT nextval('augur_data.message_sentiment_summary_msg_summary_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker_run_id bigint, + positive_ratio double precision, + negative_ratio double precision, + novel_count bigint, + period timestamp(0) without time zone, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.message_sentiment_summary OWNER TO augur; + +-- +-- Name: TABLE message_sentiment_summary; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.message_sentiment_summary IS 'In a relationally perfect world, we would have a table called “message_sentiment_run” the incremented the “worker_run_id” for both message_sentiment and message_sentiment_summary. For now, we decided this was overkill. '; + + +-- +-- Name: COLUMN message_sentiment_summary.worker_run_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.worker_run_id IS 'This value should reflect the worker_run_id for the messages summarized in the table. There is not a relation between these two tables for that purpose because its not *really*, relationaly a concept unless we create a third table for "worker_run_id", which we determined was unnecessarily complex. '; + + +-- +-- Name: COLUMN message_sentiment_summary.novel_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.novel_count IS 'The number of messages identified as novel during the analyzed period'; + + +-- +-- Name: COLUMN message_sentiment_summary.period; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.message_sentiment_summary.period IS 'The whole timeline is divided into periods based on the definition of time period for analysis, which is user specified. Timestamp of the first period to look at, until the end of messages at the data of execution. '; + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.platform_pltfrm_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.platform_pltfrm_id_seq OWNER TO augur; + +-- +-- Name: platform; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.platform ( + pltfrm_id bigint DEFAULT nextval('augur_data.platform_pltfrm_id_seq'::regclass) NOT NULL, + pltfrm_name character varying, + pltfrm_version character varying, + pltfrm_release_date date, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.platform OWNER TO augur; + +-- +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_analysis_pull_request_analysis_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_analysis_pull_request_analysis_id_seq OWNER TO augur; + +-- +-- Name: pull_request_analysis; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_analysis ( + pull_request_analysis_id bigint DEFAULT nextval('augur_data.pull_request_analysis_pull_request_analysis_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + merge_probability numeric(256,250), + mechanism character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.pull_request_analysis OWNER TO augur; + +-- +-- Name: COLUMN pull_request_analysis.pull_request_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.pull_request_id IS 'It would be better if the pull request worker is run first to fetch the latest PRs before analyzing'; + + +-- +-- Name: COLUMN pull_request_analysis.merge_probability; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.merge_probability IS 'Indicates the probability of the PR being merged'; + + +-- +-- Name: COLUMN pull_request_analysis.mechanism; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_analysis.mechanism IS 'the ML model used for prediction (It is XGBoost Classifier at present)'; + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_assignees_pr_assignee_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_assignees_pr_assignee_map_id_seq OWNER TO augur; + +-- +-- Name: pull_request_assignees; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_assignees ( + pr_assignee_map_id bigint DEFAULT nextval('augur_data.pull_request_assignees_pr_assignee_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_assignee_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + contrib_id uuid +); + + +ALTER TABLE augur_data.pull_request_assignees OWNER TO augur; + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_commits_pr_cmt_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_commits_pr_cmt_id_seq OWNER TO augur; + +-- +-- Name: pull_request_commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_commits ( + pr_cmt_id bigint DEFAULT nextval('augur_data.pull_request_commits_pr_cmt_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_cmt_sha character varying, + pr_cmt_node_id character varying, + pr_cmt_message character varying, + pr_cmt_comments_url character varying, + pr_cmt_timestamp timestamp(0) without time zone, + pr_cmt_author_email character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_cmt_author_cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_commits OWNER TO augur; + +-- +-- Name: TABLE pull_request_commits; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_commits IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: COLUMN pull_request_commits.pr_cmt_sha; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_commits.pr_cmt_sha IS 'This is the commit SHA for a pull request commit. If the PR is not to the master branch of the main repository (or, in rare cases, from it), then you will NOT find a corresponding commit SHA in the commit table. (see table comment for further explanation). '; + + +-- +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_events_pr_event_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_events_pr_event_id_seq OWNER TO augur; + +-- +-- Name: pull_request_events; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_events ( + pr_event_id bigint DEFAULT nextval('augur_data.pull_request_events_pr_event_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + action character varying NOT NULL, + action_commit_hash character varying, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + issue_event_src_id bigint, + node_id character varying, + node_url character varying, + platform_id bigint DEFAULT 25150 NOT NULL, + pr_platform_event_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_events OWNER TO augur; + +-- +-- Name: COLUMN pull_request_events.issue_event_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.issue_event_src_id IS 'This ID comes from the source. In the case of GitHub, it is the id that is the first field returned from the issue events API'; + + +-- +-- Name: COLUMN pull_request_events.node_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_events.node_id IS 'This should be renamed to issue_event_src_node_id, as its the varchar identifier in GitHub and likely common in other sources as well. However, since it was created before we came to this naming standard and workers are built around it, we have it simply named as node_id. Anywhere you see node_id in the schema, it comes from GitHubs terminology.'; + + +-- +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_files_pr_file_id_seq + START WITH 25150 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_files_pr_file_id_seq OWNER TO augur; + +-- +-- Name: pull_request_files; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_files ( + pr_file_id bigint DEFAULT nextval('augur_data.pull_request_files_pr_file_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_file_additions bigint, + pr_file_deletions bigint, + pr_file_path character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_files OWNER TO augur; + +-- +-- Name: TABLE pull_request_files; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_files IS 'Pull request commits are an enumeration of each commit associated with a pull request. +Not all pull requests are from a branch or fork into master. +The commits table intends to count only commits that end up in the master branch (i.e., part of the deployed code base for a project). +Therefore, there will be commit “SHA”’s in this table that are no associated with a commit SHA in the commits table. +In cases where the PR is to the master branch of a project, you will find a match. In cases where the PR does not involve the master branch, you will not find a corresponding commit SHA in the commits table. This is expected. '; + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_labels_pr_label_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_labels_pr_label_id_seq OWNER TO augur; + +-- +-- Name: pull_request_labels; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_labels ( + pr_label_id bigint DEFAULT nextval('augur_data.pull_request_labels_pr_label_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_src_id bigint, + pr_src_node_id character varying, + pr_src_url character varying, + pr_src_description character varying, + pr_src_color character varying, + pr_src_default_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_labels OWNER TO augur; + +-- +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_message_ref_pr_msg_ref_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_message_ref_pr_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_message_ref ( + pr_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + msg_id bigint, + pr_message_ref_src_comment_id bigint, + pr_message_ref_src_node_id character varying, + pr_issue_url character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_message_ref OWNER TO augur; + +-- +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_meta_pr_repo_meta_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_meta_pr_repo_meta_id_seq OWNER TO augur; + +-- +-- Name: pull_request_meta; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_meta ( + pr_repo_meta_id bigint DEFAULT nextval('augur_data.pull_request_meta_pr_repo_meta_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + repo_id bigint, + pr_head_or_base character varying, + pr_src_meta_label character varying, + pr_src_meta_ref character varying, + pr_sha character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_meta OWNER TO augur; + +-- +-- Name: TABLE pull_request_meta; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_meta IS 'Pull requests contain referencing metadata. There are a few columns that are discrete. There are also head and base designations for the repo on each side of the pull request. Similar functions exist in GitLab, though the language here is based on GitHub. The JSON Being adapted to as of the development of this schema is here: "base": { "label": "chaoss:dev", "ref": "dev", "sha": "dc6c6f3947f7dc84ecba3d8bda641ef786e7027d", "user": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, "repo": { "id": 78134122, "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", "name": "augur", "full_name": "chaoss/augur", "private": false, "owner": { "login": "chaoss", "id": 29740296, "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", "gravatar_id": "", "url": "https://api.github.com/users/chaoss", "html_url": "https://github.com/chaoss", "followers_url": "https://api.github.com/users/chaoss/followers", "following_url": "https://api.github.com/users/chaoss/following{/other_user}", "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", "organizations_url": "https://api.github.com/users/chaoss/orgs", "repos_url": "https://api.github.com/users/chaoss/repos", "events_url": "https://api.github.com/users/chaoss/events{/privacy}", "received_events_url": "https://api.github.com/users/chaoss/received_events", "type": "Organization", "site_admin": false }, '; + + +-- +-- Name: COLUMN pull_request_meta.pr_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_meta.pr_head_or_base IS 'Each pull request should have one and only one head record; and one and only one base record. '; + + +-- +-- Name: COLUMN pull_request_meta.pr_src_meta_label; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_meta.pr_src_meta_label IS 'This is a representation of the repo:branch information in the pull request. Head is issueing the pull request and base is taking the pull request. For example: (We do not store all of this) + + "head": { + "label": "chaoss:pull-request-worker", + "ref": "pull-request-worker", + "sha": "6b380c3d6d625616f79d702612ebab6d204614f2", + "user": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 78134122, + "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", + "name": "augur", + "full_name": "chaoss/augur", + "private": false, + "owner": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/chaoss/augur", + "description": "Python library and web service for Open Source Software Health and Sustainability metrics & data collection.", + "fork": false, + "url": "https://api.github.com/repos/chaoss/augur", + "forks_url": "https://api.github.com/repos/chaoss/augur/forks", + "keys_url": "https://api.github.com/repos/chaoss/augur/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/chaoss/augur/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/chaoss/augur/teams", + "hooks_url": "https://api.github.com/repos/chaoss/augur/hooks", + "issue_events_url": "https://api.github.com/repos/chaoss/augur/issues/events{/number}", + "events_url": "https://api.github.com/repos/chaoss/augur/events", + "assignees_url": "https://api.github.com/repos/chaoss/augur/assignees{/user}", + "branches_url": "https://api.github.com/repos/chaoss/augur/branches{/branch}", + "tags_url": "https://api.github.com/repos/chaoss/augur/tags", + "blobs_url": "https://api.github.com/repos/chaoss/augur/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/chaoss/augur/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/chaoss/augur/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/chaoss/augur/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/chaoss/augur/statuses/{sha}", + "languages_url": "https://api.github.com/repos/chaoss/augur/languages", + "stargazers_url": "https://api.github.com/repos/chaoss/augur/stargazers", + "contributors_url": "https://api.github.com/repos/chaoss/augur/contributors", + "subscribers_url": "https://api.github.com/repos/chaoss/augur/subscribers", + "subscription_url": "https://api.github.com/repos/chaoss/augur/subscription", + "commits_url": "https://api.github.com/repos/chaoss/augur/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/chaoss/augur/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/chaoss/augur/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/chaoss/augur/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/chaoss/augur/contents/{+path}", + "compare_url": "https://api.github.com/repos/chaoss/augur/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/chaoss/augur/merges", + "archive_url": "https://api.github.com/repos/chaoss/augur/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/chaoss/augur/downloads", + "issues_url": "https://api.github.com/repos/chaoss/augur/issues{/number}", + "pulls_url": "https://api.github.com/repos/chaoss/augur/pulls{/number}", + "milestones_url": "https://api.github.com/repos/chaoss/augur/milestones{/number}", + "notifications_url": "https://api.github.com/repos/chaoss/augur/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/chaoss/augur/labels{/name}", + "releases_url": "https://api.github.com/repos/chaoss/augur/releases{/id}", + "deployments_url": "https://api.github.com/repos/chaoss/augur/deployments", + "created_at": "2017-01-05T17:34:54Z", + "updated_at": "2019-11-15T00:56:12Z", + "pushed_at": "2019-12-02T06:27:26Z", + "git_url": "git://github.com/chaoss/augur.git", + "ssh_url": "git@github.com:chaoss/augur.git", + "clone_url": "https://github.com/chaoss/augur.git", + "svn_url": "https://github.com/chaoss/augur", + "homepage": "http://augur.osshealth.io/", + "size": 82004, + "stargazers_count": 153, + "watchers_count": 153, + "language": "Python", + "has_issues": true, + "has_projects": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": true, + "forks_count": 205, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 14, + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "forks": 205, + "open_issues": 14, + "watchers": 153, + "default_branch": "master" + } + }, + "base": { + "label": "chaoss:dev", + "ref": "dev", + "sha": "bfd2d34b51659613dd842cf83c3873f7699c2a0e", + "user": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 78134122, + "node_id": "MDEwOlJlcG9zaXRvcnk3ODEzNDEyMg==", + "name": "augur", + "full_name": "chaoss/augur", + "private": false, + "owner": { + "login": "chaoss", + "id": 29740296, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjI5NzQwMjk2", + "avatar_url": "https://avatars2.githubusercontent.com/u/29740296?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chaoss", + "html_url": "https://github.com/chaoss", + "followers_url": "https://api.github.com/users/chaoss/followers", + "following_url": "https://api.github.com/users/chaoss/following{/other_user}", + "gists_url": "https://api.github.com/users/chaoss/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chaoss/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chaoss/subscriptions", + "organizations_url": "https://api.github.com/users/chaoss/orgs", + "repos_url": "https://api.github.com/users/chaoss/repos", + "events_url": "https://api.github.com/users/chaoss/events{/privacy}", + "received_events_url": "https://api.github.com/users/chaoss/received_events", + "type": "Organization", + "site_admin": false + }, +'; + + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_repo_pr_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_repo_pr_repo_id_seq OWNER TO augur; + +-- +-- Name: pull_request_repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_repo ( + pr_repo_id bigint DEFAULT nextval('augur_data.pull_request_repo_pr_repo_id_seq'::regclass) NOT NULL, + pr_repo_meta_id bigint, + pr_repo_head_or_base character varying, + pr_src_repo_id bigint, + pr_src_node_id character varying, + pr_repo_name character varying, + pr_repo_full_name character varying, + pr_repo_private_bool boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_repo OWNER TO augur; + +-- +-- Name: TABLE pull_request_repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.pull_request_repo IS 'This table is for storing information about forks that exist as part of a pull request. Generally we do not want to track these like ordinary repositories. '; + + +-- +-- Name: COLUMN pull_request_repo.pr_repo_head_or_base; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_repo.pr_repo_head_or_base IS 'For ease of validation checking, we should determine if the repository referenced is the head or base of the pull request. Each pull request should have one and only one of these, which is not enforcable easily in the database.'; + + +-- +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq OWNER TO augur; + +-- +-- Name: pull_request_review_message_ref; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_review_message_ref ( + pr_review_msg_ref_id bigint DEFAULT nextval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq'::regclass) NOT NULL, + pr_review_id bigint NOT NULL, + repo_id bigint, + msg_id bigint NOT NULL, + pr_review_msg_url character varying, + pr_review_src_id bigint, + pr_review_msg_src_id bigint, + pr_review_msg_node_id character varying, + pr_review_msg_diff_hunk character varying, + pr_review_msg_path character varying, + pr_review_msg_position bigint, + pr_review_msg_original_position bigint, + pr_review_msg_commit_id character varying, + pr_review_msg_original_commit_id character varying, + pr_review_msg_updated_at timestamp(6) without time zone, + pr_review_msg_html_url character varying, + pr_url character varying, + pr_review_msg_author_association character varying, + pr_review_msg_start_line bigint, + pr_review_msg_original_start_line bigint, + pr_review_msg_start_side character varying, + pr_review_msg_line bigint, + pr_review_msg_original_line bigint, + pr_review_msg_side character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_review_message_ref OWNER TO augur; + +-- +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_reviewers_pr_reviewer_map_id_seq OWNER TO augur; + +-- +-- Name: pull_request_reviewers; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_reviewers ( + pr_reviewer_map_id bigint DEFAULT nextval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_source_id bigint, + repo_id bigint, + pr_reviewer_src_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid +); + + +ALTER TABLE augur_data.pull_request_reviewers OWNER TO augur; + +-- +-- Name: COLUMN pull_request_reviewers.pr_source_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_source_id IS 'The platform ID for the pull/merge request. Used as part of the natural key, along with pr_reviewer_src_id in this table. '; + + +-- +-- Name: COLUMN pull_request_reviewers.pr_reviewer_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_request_reviewers.pr_reviewer_src_id IS 'The platform ID for the pull/merge request reviewer. Used as part of the natural key, along with pr_source_id in this table. '; + + +-- +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_reviews_pr_review_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_reviews_pr_review_id_seq OWNER TO augur; + +-- +-- Name: pull_request_reviews; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_reviews ( + pr_review_id bigint DEFAULT nextval('augur_data.pull_request_reviews_pr_review_id_seq'::regclass) NOT NULL, + pull_request_id bigint NOT NULL, + repo_id bigint, + pr_review_author_association character varying, + pr_review_state character varying, + pr_review_body character varying, + pr_review_submitted_at timestamp(6) without time zone, + pr_review_src_id bigint, + pr_review_node_id character varying, + pr_review_html_url character varying, + pr_review_pull_request_url character varying, + pr_review_commit_id character varying, + platform_id bigint DEFAULT 25150, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + cntrb_id uuid NOT NULL +); + + +ALTER TABLE augur_data.pull_request_reviews OWNER TO augur; + +-- +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_request_teams_pr_team_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_request_teams_pr_team_id_seq OWNER TO augur; + +-- +-- Name: pull_request_teams; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_request_teams ( + pr_team_id bigint DEFAULT nextval('augur_data.pull_request_teams_pr_team_id_seq'::regclass) NOT NULL, + pull_request_id bigint, + pr_src_team_id bigint, + pr_src_team_node character varying, + pr_src_team_url character varying, + pr_team_name character varying, + pr_team_slug character varying, + pr_team_description character varying, + pr_team_privacy character varying, + pr_team_permission character varying, + pr_team_src_members_url character varying, + pr_team_src_repositories_url character varying, + pr_team_parent_id bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.pull_request_teams OWNER TO augur; + +-- +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.pull_requests_pull_request_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.pull_requests_pull_request_id_seq OWNER TO augur; + +-- +-- Name: pull_requests; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.pull_requests ( + pull_request_id bigint DEFAULT nextval('augur_data.pull_requests_pull_request_id_seq'::regclass) NOT NULL, + repo_id bigint DEFAULT 0, + pr_url character varying, + pr_src_id bigint, + pr_src_node_id character varying, + pr_html_url character varying, + pr_diff_url character varying, + pr_patch_url character varying, + pr_issue_url character varying, + pr_augur_issue_id bigint, + pr_src_number bigint, + pr_src_state character varying, + pr_src_locked boolean, + pr_src_title character varying, + pr_body text, + pr_created_at timestamp(0) without time zone, + pr_updated_at timestamp(0) without time zone, + pr_closed_at timestamp(0) without time zone, + pr_merged_at timestamp(0) without time zone, + pr_merge_commit_sha character varying, + pr_teams bigint, + pr_milestone character varying, + pr_commits_url character varying, + pr_review_comments_url character varying, + pr_review_comment_url character varying, + pr_comments_url character varying, + pr_statuses_url character varying, + pr_meta_head_id character varying, + pr_meta_base_id character varying, + pr_src_issue_url character varying, + pr_src_comments_url character varying, + pr_src_review_comments_url character varying, + pr_src_commits_url character varying, + pr_src_statuses_url character varying, + pr_src_author_association character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + pr_augur_contributor_id uuid +); + + +ALTER TABLE augur_data.pull_requests OWNER TO augur; + +-- +-- Name: COLUMN pull_requests.pr_src_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_src_id IS 'The pr_src_id is unique across all of github.'; + + +-- +-- Name: COLUMN pull_requests.pr_augur_issue_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_issue_id IS 'This is to link to the augur stored related issue'; + + +-- +-- Name: COLUMN pull_requests.pr_src_number; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_src_number IS 'The pr_src_number is unique within a repository.'; + + +-- +-- Name: COLUMN pull_requests.pr_teams; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_teams IS 'One to many with pull request teams. '; + + +-- +-- Name: COLUMN pull_requests.pr_review_comment_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_review_comment_url IS 'This is a field with limited utility. It does expose how to access a specific comment if needed with parameters. If the source changes URL structure, it may be useful'; + + +-- +-- Name: COLUMN pull_requests.pr_meta_head_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_head_id IS 'The metadata for the head repo that links to the pull_request_meta table. '; + + +-- +-- Name: COLUMN pull_requests.pr_meta_base_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_meta_base_id IS 'The metadata for the base repo that links to the pull_request_meta table. '; + + +-- +-- Name: COLUMN pull_requests.pr_augur_contributor_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.pull_requests.pr_augur_contributor_id IS 'This is to link to the augur contributor record. '; + + +-- +-- Name: releases_release_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.releases_release_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.releases_release_id_seq OWNER TO augur; + +-- +-- Name: releases; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.releases ( + release_id character(64) DEFAULT nextval('augur_data.releases_release_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + release_name character varying, + release_description character varying, + release_author character varying, + release_created_at timestamp(6) without time zone, + release_published_at timestamp(6) without time zone, + release_updated_at timestamp(6) without time zone, + release_is_draft boolean, + release_is_prerelease boolean, + release_tag_name character varying, + release_url character varying, + tag_only boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.releases OWNER TO augur; + +-- +-- Name: repo_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_repo_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_repo_id_seq OWNER TO augur; + +-- +-- Name: repo; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo ( + repo_id bigint DEFAULT nextval('augur_data.repo_repo_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + repo_git character varying NOT NULL, + repo_path character varying DEFAULT 'NULL'::character varying, + repo_name character varying DEFAULT 'NULL'::character varying, + repo_added timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + repo_status character varying DEFAULT 'New'::character varying NOT NULL, + repo_type character varying DEFAULT ''::character varying, + url character varying, + owner_id integer, + description character varying, + primary_language character varying, + created_at character varying, + forked_from character varying, + updated_at timestamp(0) without time zone, + repo_archived_date_collected timestamp(0) with time zone, + repo_archived integer, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo OWNER TO augur; + +-- +-- Name: TABLE repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo IS 'This table is a combination of the columns in Facade’s repo table and GHTorrent’s projects table. '; + + +-- +-- Name: COLUMN repo.repo_type; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo.repo_type IS 'This field is intended to indicate if the repository is the "main instance" of a repository in cases where implementations choose to add the same repository to more than one repository group. In cases where the repository group is of rg_type Github Organization then this repo_type should be "primary". In other cases the repo_type should probably be "user created". We made this a varchar in order to hold open the possibility that there are additional repo_types we have not thought about. '; + + +-- +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_badging_badge_collection_id_seq + START WITH 25012 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_badging_badge_collection_id_seq OWNER TO augur; + +-- +-- Name: repo_badging; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_badging ( + badge_collection_id bigint DEFAULT nextval('augur_data.repo_badging_badge_collection_id_seq'::regclass) NOT NULL, + repo_id bigint, + created_at timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + data jsonb +); + + +ALTER TABLE augur_data.repo_badging OWNER TO augur; + +-- +-- Name: TABLE repo_badging; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_badging IS 'This will be collected from the LF’s Badging API +https://bestpractices.coreinfrastructure.org/projects.json?pq=https%3A%2F%2Fgithub.com%2Fchaoss%2Faugur +'; + + +-- +-- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_cluster_messages_msg_cluster_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_cluster_messages_msg_cluster_id_seq OWNER TO augur; + +-- +-- Name: repo_cluster_messages; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_cluster_messages ( + msg_cluster_id bigint DEFAULT nextval('augur_data.repo_cluster_messages_msg_cluster_id_seq'::regclass) NOT NULL, + repo_id bigint, + cluster_content integer, + cluster_mechanism integer, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_cluster_messages OWNER TO augur; + +-- +-- Name: repo_dependencies_repo_dependencies_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_dependencies_repo_dependencies_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_dependencies_repo_dependencies_id_seq OWNER TO augur; + +-- +-- Name: repo_dependencies; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_dependencies ( + repo_dependencies_id bigint DEFAULT nextval('augur_data.repo_dependencies_repo_dependencies_id_seq'::regclass) NOT NULL, + repo_id bigint, + dep_name character varying, + dep_count integer, + dep_language character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_dependencies OWNER TO augur; + +-- +-- Name: TABLE repo_dependencies; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_dependencies IS 'Contains the dependencies for a repo.'; + + +-- +-- Name: COLUMN repo_dependencies.repo_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.repo_id IS 'Forign key for repo id. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_name; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_name IS 'Name of the dependancy found in project. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_count; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_count IS 'Number of times the dependancy was found. '; + + +-- +-- Name: COLUMN repo_dependencies.dep_language; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_dependencies.dep_language IS 'Language of the dependancy. '; + + +-- +-- Name: repo_deps_libyear_repo_deps_libyear_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_deps_libyear_repo_deps_libyear_id_seq OWNER TO augur; + +-- +-- Name: repo_deps_libyear; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_deps_libyear ( + repo_deps_libyear_id bigint DEFAULT nextval('augur_data.repo_deps_libyear_repo_deps_libyear_id_seq'::regclass) NOT NULL, + repo_id bigint, + name character varying, + requirement character varying, + type character varying, + package_manager character varying, + current_verion character varying, + latest_version character varying, + current_release_date character varying, + latest_release_date character varying, + libyear double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_deps_libyear OWNER TO augur; + +-- +-- Name: repo_deps_scorecard_repo_deps_scorecard_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1 OWNER TO augur; + +-- +-- Name: repo_deps_scorecard; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_deps_scorecard ( + repo_deps_scorecard_id bigint DEFAULT nextval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1'::regclass) NOT NULL, + repo_id bigint, + name character varying, + status character varying, + score character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_deps_scorecard OWNER TO augur; + +-- +-- Name: repo_group_insights_rgi_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_group_insights_rgi_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_group_insights_rgi_id_seq OWNER TO augur; + +-- +-- Name: repo_group_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_group_insights ( + rgi_id bigint DEFAULT nextval('augur_data.repo_group_insights_rgi_id_seq'::regclass) NOT NULL, + repo_group_id bigint, + rgi_metric character varying, + rgi_value character varying, + cms_id bigint, + rgi_fresh boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_group_insights OWNER TO augur; + +-- +-- Name: TABLE repo_group_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_group_insights IS 'This table is output from an analytical worker inside of Augur. It runs through the different metrics on a REPOSITORY_GROUP and identifies the five to ten most “interesting” metrics as defined by some kind of delta or other factor. The algorithm is going to evolve. + +Worker Design Notes: The idea is that the "insight worker" will scan through a bunch of active metrics or "synthetic metrics" to list the most important insights. '; + + +-- +-- Name: COLUMN repo_group_insights.rgi_fresh; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_group_insights.rgi_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; + + +-- +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_groups_repo_group_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_groups_repo_group_id_seq OWNER TO augur; + +-- +-- Name: repo_groups; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_groups ( + repo_group_id bigint DEFAULT nextval('augur_data.repo_groups_repo_group_id_seq'::regclass) NOT NULL, + rg_name character varying NOT NULL, + rg_description character varying DEFAULT 'NULL'::character varying, + rg_website character varying(128) DEFAULT 'NULL'::character varying, + rg_recache smallint DEFAULT 1, + rg_last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + rg_type character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_groups OWNER TO augur; + +-- +-- Name: TABLE repo_groups; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_groups IS 'rg_type is intended to be either a GitHub Organization or a User Created Repo Group. '; + + +-- +-- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_groups_list_serve_rgls_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_groups_list_serve_rgls_id_seq OWNER TO augur; + +-- +-- Name: repo_groups_list_serve; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_groups_list_serve ( + rgls_id bigint DEFAULT nextval('augur_data.repo_groups_list_serve_rgls_id_seq'::regclass) NOT NULL, + repo_group_id bigint NOT NULL, + rgls_name character varying, + rgls_description character varying(3000), + rgls_sponsor character varying, + rgls_email character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_groups_list_serve OWNER TO augur; + +-- +-- Name: repo_info_repo_info_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_info_repo_info_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_info_repo_info_id_seq OWNER TO augur; + +-- +-- Name: repo_info; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_info ( + repo_info_id bigint DEFAULT nextval('augur_data.repo_info_repo_info_id_seq'::regclass) NOT NULL, + repo_id bigint NOT NULL, + last_updated timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + issues_enabled character varying, + open_issues integer, + pull_requests_enabled character varying, + wiki_enabled character varying, + pages_enabled character varying, + fork_count integer, + default_branch character varying, + watchers_count integer, + "UUID" integer, + license character varying, + stars_count integer, + committers_count integer, + issue_contributors_count character varying, + changelog_file character varying, + contributing_file character varying, + license_file character varying, + code_of_conduct_file character varying, + security_issue_file character varying, + security_audit_file character varying, + status character varying, + keywords character varying, + commit_count bigint, + issues_count bigint, + issues_closed bigint, + pull_request_count bigint, + pull_requests_open bigint, + pull_requests_closed bigint, + pull_requests_merged bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_info OWNER TO augur; + +-- +-- Name: repo_insights_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_insights_ri_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_insights_ri_id_seq OWNER TO augur; + +-- +-- Name: repo_insights; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_insights ( + ri_id bigint DEFAULT nextval('augur_data.repo_insights_ri_id_seq'::regclass) NOT NULL, + repo_id bigint, + ri_metric character varying, + ri_value character varying, + ri_date timestamp(0) without time zone, + ri_fresh boolean, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + ri_score numeric, + ri_field character varying, + ri_detection_method character varying +); + + +ALTER TABLE augur_data.repo_insights OWNER TO augur; + +-- +-- Name: TABLE repo_insights; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_insights IS 'This table is output from an analytical worker inside of Augur. It runs through the different metrics on a repository and identifies the five to ten most “interesting” metrics as defined by some kind of delta or other factor. The algorithm is going to evolve. + +Worker Design Notes: The idea is that the "insight worker" will scan through a bunch of active metrics or "synthetic metrics" to list the most important insights. '; + + +-- +-- Name: COLUMN repo_insights.ri_fresh; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights.ri_fresh IS 'false if the date is before the statistic that triggered the insight, true if after. This allows us to automatically display only "fresh insights" and avoid displaying "stale insights". The insight worker will populate this table. '; + + +-- +-- Name: repo_insights_records_ri_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_insights_records_ri_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_insights_records_ri_id_seq OWNER TO augur; + +-- +-- Name: repo_insights_records; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_insights_records ( + ri_id bigint DEFAULT nextval('augur_data.repo_insights_records_ri_id_seq'::regclass) NOT NULL, + repo_id bigint, + ri_metric character varying, + ri_field character varying, + ri_value character varying, + ri_date timestamp(6) without time zone, + ri_score double precision, + ri_detection_method character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(6) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_insights_records OWNER TO augur; + +-- +-- Name: COLUMN repo_insights_records.ri_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_id IS 'Primary key. '; + + +-- +-- Name: COLUMN repo_insights_records.repo_id; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.repo_id IS 'Refers to repo table primary key. Will have a foreign key'; + + +-- +-- Name: COLUMN repo_insights_records.ri_metric; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_metric IS 'The metric endpoint'; + + +-- +-- Name: COLUMN repo_insights_records.ri_field; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_field IS 'The field in the metric endpoint'; + + +-- +-- Name: COLUMN repo_insights_records.ri_value; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_value IS 'The value of the endpoint in ri_field'; + + +-- +-- Name: COLUMN repo_insights_records.ri_date; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_date IS 'The date the insight is for; in other words, some anomaly occurred on this date. '; + + +-- +-- Name: COLUMN repo_insights_records.ri_score; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_score IS 'A Score, derived from the algorithm used. '; + + +-- +-- Name: COLUMN repo_insights_records.ri_detection_method; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.ri_detection_method IS 'A confidence interval or other expression of the type of threshold and the value of a threshold met in order for it to be "an insight". Example. "95% confidence interval". '; + + +-- +-- Name: COLUMN repo_insights_records.tool_source; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.tool_source IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.tool_version; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.tool_version IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.data_source; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.data_source IS 'Standard Augur Metadata'; + + +-- +-- Name: COLUMN repo_insights_records.data_collection_date; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_insights_records.data_collection_date IS 'Standard Augur Metadata'; + + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_labor_repo_labor_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_labor_repo_labor_id_seq OWNER TO augur; + +-- +-- Name: repo_labor; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_labor ( + repo_labor_id bigint DEFAULT nextval('augur_data.repo_labor_repo_labor_id_seq'::regclass) NOT NULL, + repo_id bigint, + repo_clone_date timestamp(0) without time zone, + rl_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + total_lines integer, + code_lines integer, + comment_lines integer, + blank_lines integer, + code_complexity integer, + repo_url character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_labor OWNER TO augur; + +-- +-- Name: TABLE repo_labor; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_labor IS 'repo_labor is a derivative of tables used to store scc code and complexity counting statistics that are inputs to labor analysis, which are components of CHAOSS value metric calculations. '; + + +-- +-- Name: COLUMN repo_labor.repo_url; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON COLUMN augur_data.repo_labor.repo_url IS 'This is a convenience column to simplify analysis against external datasets'; + + +-- +-- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_meta_rmeta_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_meta_rmeta_id_seq OWNER TO augur; + +-- +-- Name: repo_meta; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_meta ( + repo_id bigint NOT NULL, + rmeta_id bigint DEFAULT nextval('augur_data.repo_meta_rmeta_id_seq'::regclass) NOT NULL, + rmeta_name character varying, + rmeta_value character varying DEFAULT 0, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_meta OWNER TO augur; + +-- +-- Name: TABLE repo_meta; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_meta IS 'Project Languages'; + + +-- +-- Name: repo_sbom_scans_rsb_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_sbom_scans_rsb_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_sbom_scans_rsb_id_seq OWNER TO augur; + +-- +-- Name: repo_sbom_scans; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_sbom_scans ( + rsb_id bigint DEFAULT nextval('augur_data.repo_sbom_scans_rsb_id_seq'::regclass) NOT NULL, + repo_id bigint, + sbom_scan json +); + + +ALTER TABLE augur_data.repo_sbom_scans OWNER TO augur; + +-- +-- Name: repo_stats_rstat_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_stats_rstat_id_seq + START WITH 25430 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_stats_rstat_id_seq OWNER TO augur; + +-- +-- Name: repo_stats; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_stats ( + repo_id bigint NOT NULL, + rstat_id bigint DEFAULT nextval('augur_data.repo_stats_rstat_id_seq'::regclass) NOT NULL, + rstat_name character varying(400), + rstat_value bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone +); + + +ALTER TABLE augur_data.repo_stats OWNER TO augur; + +-- +-- Name: TABLE repo_stats; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON TABLE augur_data.repo_stats IS 'Project Watchers'; + + +-- +-- Name: repo_test_coverage_repo_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_test_coverage_repo_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_test_coverage_repo_id_seq OWNER TO augur; + +-- +-- Name: repo_test_coverage; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_test_coverage ( + repo_id bigint DEFAULT nextval('augur_data.repo_test_coverage_repo_id_seq'::regclass) NOT NULL, + repo_clone_date timestamp(0) without time zone, + rtc_analysis_date timestamp(0) without time zone, + programming_language character varying, + file_path character varying, + file_name character varying, + testing_tool character varying, + file_statement_count bigint, + file_subroutine_count bigint, + file_statements_tested bigint, + file_subroutines_tested bigint, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_test_coverage OWNER TO augur; + +-- +-- Name: repo_topic_repo_topic_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.repo_topic_repo_topic_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.repo_topic_repo_topic_id_seq OWNER TO augur; + +-- +-- Name: repo_topic; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repo_topic ( + repo_topic_id bigint DEFAULT nextval('augur_data.repo_topic_repo_topic_id_seq'::regclass) NOT NULL, + repo_id bigint, + topic_id integer, + topic_prob double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.repo_topic OWNER TO augur; + +-- +-- Name: repos_fetch_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.repos_fetch_log ( + repos_id integer NOT NULL, + status character varying(128) NOT NULL, + date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.repos_fetch_log OWNER TO augur; + +-- +-- Name: settings; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.settings ( + id integer NOT NULL, + setting character varying(32) NOT NULL, + value character varying NOT NULL, + last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.settings OWNER TO augur; + +-- +-- Name: topic_words_topic_words_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.topic_words_topic_words_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.topic_words_topic_words_id_seq OWNER TO augur; + +-- +-- Name: topic_words; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.topic_words ( + topic_words_id bigint DEFAULT nextval('augur_data.topic_words_topic_words_id_seq'::regclass) NOT NULL, + topic_id bigint, + word character varying, + word_prob double precision, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.topic_words OWNER TO augur; + +-- +-- Name: unknown_cache; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.unknown_cache ( + type character varying(10) NOT NULL, + repo_group_id integer NOT NULL, + email character varying(128) NOT NULL, + domain character varying(128) DEFAULT 'NULL'::character varying, + added bigint NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.unknown_cache OWNER TO augur; + +-- +-- Name: unresolved_commit_emails_email_unresolved_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.unresolved_commit_emails_email_unresolved_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.unresolved_commit_emails_email_unresolved_id_seq OWNER TO augur; + +-- +-- Name: unresolved_commit_emails; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.unresolved_commit_emails ( + email_unresolved_id bigint DEFAULT nextval('augur_data.unresolved_commit_emails_email_unresolved_id_seq'::regclass) NOT NULL, + email character varying NOT NULL, + name character varying, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP +); + + +ALTER TABLE augur_data.unresolved_commit_emails OWNER TO augur; + +-- +-- Name: utility_log_id_seq1; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.utility_log_id_seq1 + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.utility_log_id_seq1 OWNER TO augur; + +-- +-- Name: utility_log; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.utility_log ( + id bigint DEFAULT nextval('augur_data.utility_log_id_seq1'::regclass) NOT NULL, + level character varying(8) NOT NULL, + status character varying NOT NULL, + attempted timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_data.utility_log OWNER TO augur; + +-- +-- Name: utility_log_id_seq; Type: SEQUENCE; Schema: augur_data; Owner: augur +-- + +CREATE SEQUENCE augur_data.utility_log_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_data.utility_log_id_seq OWNER TO augur; + +-- +-- Name: working_commits; Type: TABLE; Schema: augur_data; Owner: augur +-- + +CREATE TABLE augur_data.working_commits ( + repos_id integer NOT NULL, + working_commit character varying(40) DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_data.working_commits OWNER TO augur; + +-- +-- Name: affiliations_corp_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.affiliations_corp_id_seq + START WITH 620000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.affiliations_corp_id_seq OWNER TO augur; + +-- +-- Name: all; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations."all" ( + "Name" character varying, + "Bytes" character varying, + "Lines" character varying, + "Code" character varying, + "Comment" character varying, + "Blank" character varying, + "Complexity" character varying, + "Count" character varying, + "WeightedComplexity" character varying, + "Files" character varying +); + + +ALTER TABLE augur_operations."all" OWNER TO augur; + +-- +-- Name: augur_settings_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.augur_settings_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.augur_settings_id_seq OWNER TO augur; + +-- +-- Name: augur_settings; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.augur_settings ( + id bigint DEFAULT nextval('augur_operations.augur_settings_id_seq'::regclass) NOT NULL, + setting character varying, + value character varying, + last_modified timestamp(0) without time zone DEFAULT CURRENT_DATE +); + + +ALTER TABLE augur_operations.augur_settings OWNER TO augur; + +-- +-- Name: TABLE augur_settings; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.augur_settings IS 'Augur settings include the schema version, and the Augur API Key as of 10/25/2020. Future augur settings may be stored in this table, which has the basic structure of a name-value pair. '; + + +-- +-- Name: config; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.config ( + id smallint NOT NULL, + section_name character varying NOT NULL, + setting_name character varying NOT NULL, + value character varying, + type character varying +); + + +ALTER TABLE augur_operations.config OWNER TO augur; + +-- +-- Name: config_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.config_id_seq + AS smallint + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.config_id_seq OWNER TO augur; + +-- +-- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.config_id_seq OWNED BY augur_operations.config.id; + + +-- +-- Name: gh_worker_history_history_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.gh_worker_history_history_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.gh_worker_history_history_id_seq OWNER TO augur; + +-- +-- Name: repos_fetch_log; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.repos_fetch_log ( + repos_id integer NOT NULL, + status character varying(128) NOT NULL, + date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_operations.repos_fetch_log OWNER TO augur; + +-- +-- Name: TABLE repos_fetch_log; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.repos_fetch_log IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: users; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.users ( + user_id integer NOT NULL, + login_name character varying NOT NULL, + login_hashword character varying NOT NULL, + email character varying NOT NULL, + text_phone character varying, + first_name character varying NOT NULL, + last_name character varying NOT NULL, + tool_source character varying, + tool_version character varying, + data_source character varying, + data_collection_date timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP, + admin boolean NOT NULL +); + + +ALTER TABLE augur_operations.users OWNER TO augur; + +-- +-- Name: users_user_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.users_user_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.users_user_id_seq OWNER TO augur; + +-- +-- Name: users_user_id_seq; Type: SEQUENCE OWNED BY; Schema: augur_operations; Owner: augur +-- + +ALTER SEQUENCE augur_operations.users_user_id_seq OWNED BY augur_operations.users.user_id; + + +-- +-- Name: worker_history; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_history ( + history_id bigint DEFAULT nextval('augur_operations.gh_worker_history_history_id_seq'::regclass) NOT NULL, + repo_id bigint, + worker character varying(255) NOT NULL, + job_model character varying(255) NOT NULL, + oauth_id integer, + "timestamp" timestamp(0) without time zone NOT NULL, + status character varying(7) NOT NULL, + total_results integer +); + + +ALTER TABLE augur_operations.worker_history OWNER TO augur; + +-- +-- Name: TABLE worker_history; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_history IS 'This table stores the complete history of job execution, including success and failure. It is useful for troubleshooting. '; + + +-- +-- Name: worker_job; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_job ( + job_model character varying(255) NOT NULL, + state integer DEFAULT 0 NOT NULL, + zombie_head integer, + since_id_str character varying(255) DEFAULT '0'::character varying NOT NULL, + description character varying(255) DEFAULT 'None'::character varying, + last_count integer, + last_run timestamp(0) without time zone DEFAULT NULL::timestamp without time zone, + analysis_state integer DEFAULT 0, + oauth_id integer NOT NULL +); + + +ALTER TABLE augur_operations.worker_job OWNER TO augur; + +-- +-- Name: TABLE worker_job; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_job IS 'This table stores the jobs workers collect data for. A job is found in the code, and in the augur.config.json under the construct of a “model”. '; + + +-- +-- Name: worker_oauth_oauth_id_seq; Type: SEQUENCE; Schema: augur_operations; Owner: augur +-- + +CREATE SEQUENCE augur_operations.worker_oauth_oauth_id_seq + START WITH 1000 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE augur_operations.worker_oauth_oauth_id_seq OWNER TO augur; + +-- +-- Name: worker_oauth; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_oauth ( + oauth_id bigint DEFAULT nextval('augur_operations.worker_oauth_oauth_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL, + consumer_key character varying(255) NOT NULL, + consumer_secret character varying(255) NOT NULL, + access_token character varying(255) NOT NULL, + access_token_secret character varying(255) NOT NULL, + repo_directory character varying, + platform character varying DEFAULT 'github'::character varying +); + + +ALTER TABLE augur_operations.worker_oauth OWNER TO augur; + +-- +-- Name: TABLE worker_oauth; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_oauth IS 'This table stores credentials for retrieving data from platform API’s. Entries in this table must comply with the terms of service for each platform. '; + + +-- +-- Name: worker_settings_facade; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.worker_settings_facade ( + id integer NOT NULL, + setting character varying(32) NOT NULL, + value character varying NOT NULL, + last_modified timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE augur_operations.worker_settings_facade OWNER TO augur; + +-- +-- Name: TABLE worker_settings_facade; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.worker_settings_facade IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: working_commits; Type: TABLE; Schema: augur_operations; Owner: augur +-- + +CREATE TABLE augur_operations.working_commits ( + repos_id integer NOT NULL, + working_commit character varying(40) DEFAULT 'NULL'::character varying +); + + +ALTER TABLE augur_operations.working_commits OWNER TO augur; + +-- +-- Name: TABLE working_commits; Type: COMMENT; Schema: augur_operations; Owner: augur +-- + +COMMENT ON TABLE augur_operations.working_commits IS 'For future use when we move all working tables to the augur_operations schema. '; + + +-- +-- Name: alembic_version; Type: TABLE; Schema: public; Owner: augur +-- + +CREATE TABLE public.alembic_version ( + version_num character varying(32) NOT NULL +); + + +ALTER TABLE public.alembic_version OWNER TO augur; + +-- +-- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.annotation_types_annotation_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.annotation_types_annotation_type_id_seq OWNER TO augur; + +-- +-- Name: annotation_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.annotation_types ( + annotation_type_id integer DEFAULT nextval('spdx.annotation_types_annotation_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.annotation_types OWNER TO augur; + +-- +-- Name: annotations_annotation_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.annotations_annotation_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.annotations_annotation_id_seq OWNER TO augur; + +-- +-- Name: annotations; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.annotations ( + annotation_id integer DEFAULT nextval('spdx.annotations_annotation_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + annotation_type_id integer NOT NULL, + identifier_id integer NOT NULL, + creator_id integer NOT NULL, + created_ts timestamp(6) with time zone, + comment text NOT NULL +); + + +ALTER TABLE spdx.annotations OWNER TO augur; + +-- +-- Name: augur_repo_map_map_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.augur_repo_map_map_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.augur_repo_map_map_id_seq OWNER TO augur; + +-- +-- Name: augur_repo_map; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.augur_repo_map ( + map_id integer DEFAULT nextval('spdx.augur_repo_map_map_id_seq'::regclass) NOT NULL, + dosocs_pkg_id integer, + dosocs_pkg_name text, + repo_id integer, + repo_path text +); + + +ALTER TABLE spdx.augur_repo_map OWNER TO augur; + +-- +-- Name: creator_types_creator_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.creator_types_creator_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.creator_types_creator_type_id_seq OWNER TO augur; + +-- +-- Name: creator_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.creator_types ( + creator_type_id integer DEFAULT nextval('spdx.creator_types_creator_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.creator_types OWNER TO augur; + +-- +-- Name: creators_creator_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.creators_creator_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.creators_creator_id_seq OWNER TO augur; + +-- +-- Name: creators; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.creators ( + creator_id integer DEFAULT nextval('spdx.creators_creator_id_seq'::regclass) NOT NULL, + creator_type_id integer NOT NULL, + name character varying(255) NOT NULL, + email character varying(255) NOT NULL +); + + +ALTER TABLE spdx.creators OWNER TO augur; + +-- +-- Name: document_namespaces_document_namespace_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.document_namespaces_document_namespace_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.document_namespaces_document_namespace_id_seq OWNER TO augur; + +-- +-- Name: document_namespaces; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.document_namespaces ( + document_namespace_id integer DEFAULT nextval('spdx.document_namespaces_document_namespace_id_seq'::regclass) NOT NULL, + uri character varying(500) NOT NULL +); + + +ALTER TABLE spdx.document_namespaces OWNER TO augur; + +-- +-- Name: documents_document_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.documents_document_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.documents_document_id_seq OWNER TO augur; + +-- +-- Name: documents; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.documents ( + document_id integer DEFAULT nextval('spdx.documents_document_id_seq'::regclass) NOT NULL, + document_namespace_id integer NOT NULL, + data_license_id integer NOT NULL, + spdx_version character varying(255) NOT NULL, + name character varying(255) NOT NULL, + license_list_version character varying(255) NOT NULL, + created_ts timestamp(6) with time zone NOT NULL, + creator_comment text NOT NULL, + document_comment text NOT NULL, + package_id integer NOT NULL +); + + +ALTER TABLE spdx.documents OWNER TO augur; + +-- +-- Name: documents_creators_document_creator_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.documents_creators_document_creator_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.documents_creators_document_creator_id_seq OWNER TO augur; + +-- +-- Name: documents_creators; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.documents_creators ( + document_creator_id integer DEFAULT nextval('spdx.documents_creators_document_creator_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + creator_id integer NOT NULL +); + + +ALTER TABLE spdx.documents_creators OWNER TO augur; + +-- +-- Name: external_refs_external_ref_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.external_refs_external_ref_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.external_refs_external_ref_id_seq OWNER TO augur; + +-- +-- Name: external_refs; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.external_refs ( + external_ref_id integer DEFAULT nextval('spdx.external_refs_external_ref_id_seq'::regclass) NOT NULL, + document_id integer NOT NULL, + document_namespace_id integer NOT NULL, + id_string character varying(255) NOT NULL, + sha256 character varying(64) NOT NULL +); + + +ALTER TABLE spdx.external_refs OWNER TO augur; + +-- +-- Name: file_contributors_file_contributor_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.file_contributors_file_contributor_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.file_contributors_file_contributor_id_seq OWNER TO augur; + +-- +-- Name: file_contributors; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.file_contributors ( + file_contributor_id integer DEFAULT nextval('spdx.file_contributors_file_contributor_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + contributor text NOT NULL +); + + +ALTER TABLE spdx.file_contributors OWNER TO augur; + +-- +-- Name: file_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.file_types ( + file_type_id integer, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.file_types OWNER TO augur; + +-- +-- Name: file_types_file_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.file_types_file_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.file_types_file_type_id_seq OWNER TO augur; + +-- +-- Name: files_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_file_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_file_id_seq OWNER TO augur; + +-- +-- Name: files; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files ( + file_id integer DEFAULT nextval('spdx.files_file_id_seq'::regclass) NOT NULL, + file_type_id integer, + sha256 character varying(64) NOT NULL, + copyright_text text, + package_id integer, + comment text NOT NULL, + notice text NOT NULL +); + + +ALTER TABLE spdx.files OWNER TO augur; + +-- +-- Name: files_licenses_file_license_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_licenses_file_license_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_licenses_file_license_id_seq OWNER TO augur; + +-- +-- Name: files_licenses; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files_licenses ( + file_license_id integer DEFAULT nextval('spdx.files_licenses_file_license_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + license_id integer NOT NULL, + extracted_text text NOT NULL +); + + +ALTER TABLE spdx.files_licenses OWNER TO augur; + +-- +-- Name: files_scans_file_scan_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.files_scans_file_scan_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.files_scans_file_scan_id_seq OWNER TO augur; + +-- +-- Name: files_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.files_scans ( + file_scan_id integer DEFAULT nextval('spdx.files_scans_file_scan_id_seq'::regclass) NOT NULL, + file_id integer NOT NULL, + scanner_id integer NOT NULL +); + + +ALTER TABLE spdx.files_scans OWNER TO augur; + +-- +-- Name: identifiers_identifier_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.identifiers_identifier_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.identifiers_identifier_id_seq OWNER TO augur; + +-- +-- Name: identifiers; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.identifiers ( + identifier_id integer DEFAULT nextval('spdx.identifiers_identifier_id_seq'::regclass) NOT NULL, + document_namespace_id integer NOT NULL, + id_string character varying(255) NOT NULL, + document_id integer, + package_id integer, + package_file_id integer, + CONSTRAINT ck_identifier_exactly_one CHECK ((((((document_id IS NOT NULL))::integer + ((package_id IS NOT NULL))::integer) + ((package_file_id IS NOT NULL))::integer) = 1)) +); + + +ALTER TABLE spdx.identifiers OWNER TO augur; + +-- +-- Name: licenses_license_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.licenses_license_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.licenses_license_id_seq OWNER TO augur; + +-- +-- Name: licenses; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.licenses ( + license_id integer DEFAULT nextval('spdx.licenses_license_id_seq'::regclass) NOT NULL, + name character varying(255), + short_name character varying(255) NOT NULL, + cross_reference text NOT NULL, + comment text NOT NULL, + is_spdx_official boolean NOT NULL +); + + +ALTER TABLE spdx.licenses OWNER TO augur; + +-- +-- Name: packages_package_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_package_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_package_id_seq OWNER TO augur; + +-- +-- Name: packages; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages ( + package_id integer DEFAULT nextval('spdx.packages_package_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL, + version character varying(255) NOT NULL, + file_name text NOT NULL, + supplier_id integer, + originator_id integer, + download_location text, + verification_code character varying(64) NOT NULL, + ver_code_excluded_file_id integer, + sha256 character varying(64), + home_page text, + source_info text NOT NULL, + concluded_license_id integer, + declared_license_id integer, + license_comment text NOT NULL, + copyright_text text, + summary text NOT NULL, + description text NOT NULL, + comment text NOT NULL, + dosocs2_dir_code character varying(64), + CONSTRAINT uc_sha256_ds2_dir_code_exactly_one CHECK (((((sha256 IS NOT NULL))::integer + ((dosocs2_dir_code IS NOT NULL))::integer) = 1)) +); + + +ALTER TABLE spdx.packages OWNER TO augur; + +-- +-- Name: packages_files_package_file_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_files_package_file_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_files_package_file_id_seq OWNER TO augur; + +-- +-- Name: packages_files; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages_files ( + package_file_id integer DEFAULT nextval('spdx.packages_files_package_file_id_seq'::regclass) NOT NULL, + package_id integer NOT NULL, + file_id integer NOT NULL, + concluded_license_id integer, + license_comment text NOT NULL, + file_name text NOT NULL +); + + +ALTER TABLE spdx.packages_files OWNER TO augur; + +-- +-- Name: packages_scans_package_scan_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.packages_scans_package_scan_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.packages_scans_package_scan_id_seq OWNER TO augur; + +-- +-- Name: packages_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.packages_scans ( + package_scan_id integer DEFAULT nextval('spdx.packages_scans_package_scan_id_seq'::regclass) NOT NULL, + package_id integer NOT NULL, + scanner_id integer NOT NULL +); + + +ALTER TABLE spdx.packages_scans OWNER TO augur; + +-- +-- Name: projects_package_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.projects_package_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.projects_package_id_seq OWNER TO augur; + +-- +-- Name: projects; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.projects ( + package_id integer DEFAULT nextval('spdx.projects_package_id_seq'::regclass) NOT NULL, + name text NOT NULL, + homepage text NOT NULL, + uri text NOT NULL +); + + +ALTER TABLE spdx.projects OWNER TO augur; + +-- +-- Name: relationship_types_relationship_type_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.relationship_types_relationship_type_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.relationship_types_relationship_type_id_seq OWNER TO augur; + +-- +-- Name: relationship_types; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.relationship_types ( + relationship_type_id integer DEFAULT nextval('spdx.relationship_types_relationship_type_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.relationship_types OWNER TO augur; + +-- +-- Name: relationships_relationship_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.relationships_relationship_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.relationships_relationship_id_seq OWNER TO augur; + +-- +-- Name: relationships; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.relationships ( + relationship_id integer DEFAULT nextval('spdx.relationships_relationship_id_seq'::regclass) NOT NULL, + left_identifier_id integer NOT NULL, + right_identifier_id integer NOT NULL, + relationship_type_id integer NOT NULL, + relationship_comment text NOT NULL +); + + +ALTER TABLE spdx.relationships OWNER TO augur; + +-- +-- Name: sbom_scans; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.sbom_scans ( + repo_id integer, + sbom_scan json +); + + +ALTER TABLE spdx.sbom_scans OWNER TO augur; + +-- +-- Name: scanners_scanner_id_seq; Type: SEQUENCE; Schema: spdx; Owner: augur +-- + +CREATE SEQUENCE spdx.scanners_scanner_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + MAXVALUE 2147483647 + CACHE 1; + + +ALTER TABLE spdx.scanners_scanner_id_seq OWNER TO augur; + +-- +-- Name: scanners; Type: TABLE; Schema: spdx; Owner: augur +-- + +CREATE TABLE spdx.scanners ( + scanner_id integer DEFAULT nextval('spdx.scanners_scanner_id_seq'::regclass) NOT NULL, + name character varying(255) NOT NULL +); + + +ALTER TABLE spdx.scanners OWNER TO augur; + +-- +-- Name: chaoss_user chaoss_id; Type: DEFAULT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user ALTER COLUMN chaoss_id SET DEFAULT nextval('augur_data.chaoss_user_chaoss_id_seq'::regclass); + + +-- +-- Name: config id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config ALTER COLUMN id SET DEFAULT nextval('augur_operations.config_id_seq'::regclass); + + +-- +-- Name: users user_id; Type: DEFAULT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users ALTER COLUMN user_id SET DEFAULT nextval('augur_operations.users_user_id_seq'::regclass); + + +-- +-- Data for Name: analysis_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.analysis_log (repos_id, status, date_attempted) FROM stdin; +\. + + +-- +-- Data for Name: chaoss_metric_status; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.chaoss_metric_status (cms_id, cm_group, cm_source, cm_type, cm_backend_status, cm_frontend_status, cm_defined, cm_api_endpoint_repo, cm_api_endpoint_rg, cm_name, cm_working_group, cm_info, tool_source, tool_version, data_source, data_collection_date, cm_working_group_focus_area) FROM stdin; +2 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/issues \N Open Issues growth-maturity-decline "open-issues" Insight Worker 0.0.1 githubapi 2019-06-20 22:41:41 \N +3 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues \N Open Issues growth-maturity-decline "open-issues" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:42:15 \N +4 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/issues/closed \N Closed Issues growth-maturity-decline "closed-issues" Insight Worker 0.0.1 githubapi 2019-06-20 22:45:53 \N +5 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues/closed \N Closed Issues growth-maturity-decline "closed-issues" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:26 \N +6 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issues/response_time \N First Response To Issue Duration growth-maturity-decline "first-response-to-issue-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:27 \N +7 growth-maturity-decline githubapi timeseries implemented unimplemented t /api/unstable///timeseries/githubapi/commits \N Code Commits growth-maturity-decline "code-commits" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:29 \N +8 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/commits \N Code Commits growth-maturity-decline "code-commits" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:30 \N +9 growth-maturity-decline githubapi metric implemented unimplemented t /api/unstable///lines_changed \N Lines Of Code Changed growth-maturity-decline "lines-of-code-changed" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:32 \N +10 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/maintainer_response_time \N Maintainer Response To Merge Request Duration growth-maturity-decline "maintainer-response-to-merge-request-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:33 \N +11 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/code_review_iteration \N Code Review Iteration growth-maturity-decline "code-review-iteration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:35 \N +12 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/forks \N Forks growth-maturity-decline "forks" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:36 \N +13 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls \N Pull Requests Open growth-maturity-decline "pull-requests-open" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:38 \N +14 growth-maturity-decline ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/closed \N Pull Requests Closed growth-maturity-decline "pull-requests-closed" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:39 \N +15 growth-maturity-decline ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/response_time \N Pull Request Comment Duration growth-maturity-decline "pull-request-comment-duration" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:41 \N +16 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/comments \N Pull Request Comments growth-maturity-decline "pull-request-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:42 \N +17 growth-maturity-decline augur_db metric implemented unimplemented t /api/unstable/repo-groups//repos//contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:44 \N +18 growth-maturity-decline githubapi metric implemented unimplemented t /api/unstable///githubapi/contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 githubapi 2019-06-20 22:49:45 \N +19 growth-maturity-decline ghtorrent metric implemented implemented t /api/unstable///contributors \N Contributors growth-maturity-decline "contributors" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:47 \N +20 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/community_engagement \N Community Engagement growth-maturity-decline "community-engagement" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:48 \N +21 growth-maturity-decline augur_db metric implemented unimplemented t /api/unstable/repo-groups//repos//sub-projects \N Sub Projects growth-maturity-decline "sub-projects" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:50 \N +22 growth-maturity-decline ghtorrent timeseries implemented implemented t /api/unstable///timeseries/contribution_acceptance \N Contribution Acceptance growth-maturity-decline "contribution-acceptance" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:49:51 \N +23 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//code-changes \N Code Changes experimental "code-changes" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:53 \N +24 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//pull-requests-merge-contributor-new \N Pull Requests Merge Contributor New experimental "pull-requests-merge-contributor-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:55 \N +25 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-first-time-opened \N Issues First Time Opened experimental "issues-first-time-opened" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:56 \N +26 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-first-time-closed \N Issues First Time Closed experimental "issues-first-time-closed" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:58 \N +27 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//contributors-new \N Contributors New experimental "contributors-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:49:59 \N +28 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//code-changes-lines \N Code Changes Lines experimental "code-changes-lines" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:01 \N +29 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-new \N Issues New experimental "issues-new" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:02 \N +30 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-closed \N Issues Closed experimental "issues-closed" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:04 \N +31 experimental augur_db metric implemented unimplemented f none \N Issue Duration experimental "issue-duration" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:05 \N +32 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issue-backlog \N Issue Backlog experimental "issue-backlog" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:07 \N +33 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-open-age \N Issues Open Age experimental "issues-open-age" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:08 \N +34 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//issues-closed-resolution-duration \N Issues Closed Resolution Duration experimental "issues-closed-resolution-duration" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:10 \N +35 experimental augur_db metric implemented unimplemented f none \N Lines Changed By Author experimental "lines-changed-by-author" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:11 \N +36 experimental augur_db git implemented unimplemented f /api/unstable/repo-groups \N Repo Groups experimental "repo-groups" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:13 \N +37 experimental augur_db git implemented unimplemented f /api/unstable/repos \N Downloaded Repos experimental "downloaded-repos" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:15 \N +38 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//open-issues-count \N Open Issues Count experimental "closed-issues-count" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:16 \N +39 experimental augur_db metric implemented unimplemented f /api/unstable/repo-groups//repos//closed-issues-count \N Closed Issues Count experimental "closed-issues-count" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:18 \N +40 experimental augur_db git implemented unimplemented f /api/unstable/repos// \N Get Repo experimental "get-repo" Insight Worker 0.0.1 augur_db 2019-06-20 22:50:19 \N +41 experimental downloads timeseries implemented implemented f /api/unstable///timeseries/downloads \N Downloads experimental "downloads" Insight Worker 0.0.1 downloads 2019-06-20 22:50:21 \N +42 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_closed \N Pull Requests Closed experimental "pull_requests_closed" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:22 \N +43 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_merged \N Pull Requests Merged experimental "pull_requests_merged" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:24 \N +44 experimental githubapi metric implemented unimplemented f /api/unstable///githubapi/pull_requests_open \N Pull Requests Open experimental "pull_requests_open" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:25 \N +45 experimental githubapi metric implemented unimplemented t /api/unstable///githubapi/repository_size \N Repository Size experimental "repository-size" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:27 \N +46 experimental githubapi metric implemented implemented t /api/unstable///bus_factor \N Bus Factor experimental "bus-factor" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:28 \N +47 experimental githubapi timeseries implemented implemented f /api/unstable///timeseries/tags/major \N Major Tags experimental "major-tags" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:30 \N +48 experimental githubapi timeseries implemented implemented f /api/unstable///timeseries/tags \N Tags experimental "tags" Insight Worker 0.0.1 githubapi 2019-06-20 22:50:31 \N +49 experimental facade git implemented unimplemented f /api/unstable/git/repos \N Downloaded Repos experimental "downloaded-repos" Insight Worker 0.0.1 facade 2019-06-20 22:50:33 \N +50 experimental facade git implemented implemented f /api/unstable/git/changes_by_author \N Lines Changed By Author experimental "lines-changed-by-author" Insight Worker 0.0.1 facade 2019-06-20 22:50:35 \N +51 experimental facade git implemented unimplemented f /api/unstable/git/lines_changed_by_week \N Lines Changed By Week experimental "lines-changed-by-week" Insight Worker 0.0.1 facade 2019-06-20 22:50:36 \N +52 experimental facade git implemented unimplemented f /api/unstable/git/lines_changed_by_month \N Lines Changed By Month experimental "lines-changed-by-month" Insight Worker 0.0.1 facade 2019-06-20 22:50:38 \N +53 experimental facade git implemented unimplemented f /api/unstable/git/commits_by_week \N Commits By Week experimental "commits-by-week" Insight Worker 0.0.1 facade 2019-06-20 22:50:40 \N +54 experimental facade git implemented implemented f /api/unstable/git/facade_project \N Facade Project experimental "facade-project" Insight Worker 0.0.1 facade 2019-06-20 22:50:41 \N +55 experimental facade metric implemented unimplemented f none \N Annual Commit Count Ranked By New Repo In Repo Group experimental "annual-commit-count-ranked-by-new-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:43 \N +56 experimental facade metric implemented unimplemented f none \N Annual Lines Of Code Count Ranked By New Repo In Repo Group experimental "annual-lines-of-code-count-ranked-by-new-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:44 \N +57 experimental facade metric implemented unimplemented f none \N Annual Commit Count Ranked By Repo In Repo Group experimental "annual-commit-count-ranked-by-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:46 \N +58 experimental facade metric implemented unimplemented f none \N Annual Lines Of Code Count Ranked By Repo In Repo Group experimental "annual-lines-of-code-count-ranked-by-repo-in-repo-group" Insight Worker 0.0.1 facade 2019-06-20 22:50:48 \N +59 experimental facade metric implemented unimplemented f none \N Lines Of Code Commit Counts By Calendar Year Grouped experimental "lines-of-code-commit-counts-by-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:49 \N +60 experimental facade metric implemented unimplemented f none \N Unaffiliated Contributors Lines Of Code Commit Counts By Calendar Year Grouped experimental "unaffiliated-contributors-lines-of-code-commit-counts-by-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:51 \N +61 experimental facade metric implemented unimplemented f none \N Repo Group Lines Of Code Commit Counts Calendar Year Grouped experimental "repo-group-lines-of-code-commit-counts-calendar-year-grouped" Insight Worker 0.0.1 facade 2019-06-20 22:50:52 \N +62 experimental ghtorrent metric implemented implemented f /api/unstable///contributing_github_organizations \N Contributing Github Organizations experimental "contributing-github-organizations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:54 \N +63 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/new_contributing_github_organizations \N New Contributing Github Organizations experimental "new-contributing-github-organizations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:56 \N +64 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/issue_comments \N Issue Comments experimental "issue-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:57 \N +65 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/pulls/made_closed \N Pull Requests Made Closed experimental "pull-requests-made-closed" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:50:59 \N +66 experimental ghtorrent timeseries implemented implemented t /api/unstable///timeseries/watchers \N Watchers experimental "watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:00 \N +67 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/commits100 \N Commits100 experimental "commits100" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:02 \N +68 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/commits/comments \N Commit Comments experimental "commit-comments" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:03 \N +69 experimental ghtorrent metric implemented implemented f /api/unstable///committer_locations \N Committer Locations experimental "committer-locations" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:05 \N +70 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/total_committers \N Total Committers experimental "total-committers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:07 \N +71 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/issues/activity \N Issue Activity experimental "issue-activity" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:08 \N +72 experimental ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/pulls/acceptance_rate \N Pull Request Acceptance Rate experimental "pull-request-acceptance-rate" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:10 \N +73 experimental ghtorrent metric implemented implemented f /api/unstable///community_age \N Community Age experimental "community-age" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:11 \N +74 experimental ghtorrent metric implemented unimplemented f /api/unstable///timeseries/contributions \N Contributions experimental "contributions" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:13 \N +75 experimental ghtorrent metric implemented implemented f /api/unstable///project_age \N Project Age experimental "project-age" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:14 \N +76 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/fakes \N Fakes experimental "fakes" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:16 \N +77 experimental ghtorrent timeseries implemented unimplemented f /api/unstable///timeseries/total_watchers \N Total Watchers experimental "total-watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:18 \N +78 experimental ghtorrent timeseries implemented implemented f /api/unstable///timeseries/new_watchers \N New Watchers experimental "new-watchers" Insight Worker 0.0.1 ghtorrent 2019-06-20 22:51:19 \N +79 experimental librariesio metric implemented implemented f /api/unstable///dependencies \N Dependencies experimental "dependencies" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:21 \N +80 experimental librariesio metric implemented implemented f /api/unstable///dependency_stats \N Dependency Stats experimental "dependency-stats" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:23 \N +81 experimental librariesio metric implemented implemented f /api/unstable///dependents \N Dependents experimental "dependents" Insight Worker 0.0.1 librariesio 2019-06-20 22:51:25 \N +\. + + +-- +-- Data for Name: chaoss_user; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.chaoss_user (chaoss_id, chaoss_login_name, chaoss_login_hashword, chaoss_email, chaoss_text_phone, chaoss_first_name, chaoss_last_name, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commit_comment_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commit_comment_ref (cmt_comment_id, cmt_id, repo_id, msg_id, user_id, body, line, "position", commit_comment_src_node_id, cmt_comment_src_id, created_at, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commit_parents; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commit_parents (cmt_id, parent_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.commits (cmt_id, repo_id, cmt_commit_hash, cmt_author_name, cmt_author_raw_email, cmt_author_email, cmt_author_date, cmt_author_affiliation, cmt_committer_name, cmt_committer_raw_email, cmt_committer_email, cmt_committer_date, cmt_committer_affiliation, cmt_added, cmt_removed, cmt_whitespace, cmt_filename, cmt_date_attempted, cmt_ght_committer_id, cmt_ght_committed_at, cmt_committer_timestamp, cmt_author_timestamp, cmt_author_platform_username, tool_source, tool_version, data_source, data_collection_date, cmt_ght_author_id) FROM stdin; +\. + + +-- +-- Data for Name: contributor_affiliations; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributor_affiliations (ca_id, ca_domain, ca_start_date, ca_last_used, ca_affiliation, ca_active, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 samsung.com 1970-01-01 2018-08-01 18:37:54 Samsung 1 load 1.0 load 1970-01-01 00:00:00 +2 linuxfoundation.org 1970-01-01 2018-08-01 18:37:54 Linux Foundation 1 load 1.0 load 1970-01-01 00:00:00 +3 ibm.com 1970-01-01 2018-08-01 18:37:54 IBM 1 load 1.0 load 1970-01-01 00:00:00 +8 walmart.com 1970-01-01 2018-09-01 06:00:00 Walmart 1 load 1.0 load 1970-01-01 00:00:00 +9 exxonmobil.com 1970-01-01 2018-09-01 06:00:00 Exxon Mobil 1 load 1.0 load 1970-01-01 00:00:00 +10 ge.com 1970-01-01 2018-09-01 06:00:00 General Electric 1 load 1.0 load 1970-01-01 00:00:00 +11 dupont.com 1970-01-01 2018-09-01 06:00:00 DuPont 1 load 1.0 load 1970-01-01 00:00:00 +12 avnet.com 1970-01-01 2018-09-01 06:00:00 Avnet 1 load 1.0 load 1970-01-01 00:00:00 +13 macysinc.com 1970-01-01 2018-09-01 06:00:00 Macys 1 load 1.0 load 1970-01-01 00:00:00 +14 enterpriseproducts.com 1970-01-01 2018-09-01 06:00:00 Enterprise Products Partners 1 load 1.0 load 1970-01-01 00:00:00 +15 travelers.com 1970-01-01 2018-09-01 06:00:00 Travelers Cos. 1 load 1.0 load 1970-01-01 00:00:00 +16 pmi.com 1970-01-01 2018-09-01 06:00:00 Philip Morris International 1 load 1.0 load 1970-01-01 00:00:00 +17 riteaid.com 1970-01-01 2018-09-01 06:00:00 Rite Aid 1 load 1.0 load 1970-01-01 00:00:00 +18 techdata.com 1970-01-01 2018-09-01 06:00:00 Tech Data 1 load 1.0 load 1970-01-01 00:00:00 +25156 pivotal.io 1970-01-01 2020-03-25 00:30:57 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:30:57 +25157 vmware.com 1970-01-01 2020-03-25 00:33:35 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:33:35 +25158 rabbitmq.com 1970-01-01 2020-03-25 00:33:43 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:33:43 +25161 pivotallabs.com 1970-01-01 2020-03-25 00:43:53 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:43:53 +25162 cloudcredo.com 1970-01-01 2020-03-25 00:44:18 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:18 +25163 gopivotal.com 1970-01-01 2020-03-25 00:44:25 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:25 +25164 heptio.com 1970-01-01 2020-03-25 00:44:32 VMware 1 Manual Entry 0.0.0 Gabe 2020-03-25 00:44:32 +19 aboutmcdonalds.com 1970-01-01 2018-09-01 06:00:00 McDonalds 1 load 1.0 load 1970-01-01 00:00:00 +20 qualcomm.com 1970-01-01 2018-09-01 06:00:00 Qualcomm 1 load 1.0 load 1970-01-01 00:00:00 +21 amerisourcebergen.com 1970-01-01 2018-09-01 06:00:00 AmerisourceBergen 1 load 1.0 load 1970-01-01 00:00:00 +22 searsholdings.com 1970-01-01 2018-09-01 06:00:00 Sears Holdings 1 load 1.0 load 1970-01-01 00:00:00 +23 capitalone.com 1970-01-01 2018-09-01 06:00:00 Capital One Financial 1 load 1.0 load 1970-01-01 00:00:00 +24 emc.com 1970-01-01 2018-09-01 06:00:00 EMC 1 load 1.0 load 1970-01-01 00:00:00 +25 usaa.com 1970-01-01 2018-09-01 06:00:00 USAA 1 load 1.0 load 1970-01-01 00:00:00 +26 duke-energy.com 1970-01-01 2018-09-01 06:00:00 Duke Energy 1 load 1.0 load 1970-01-01 00:00:00 +27 twc.com 1970-01-01 2018-09-01 06:00:00 Time Warner Cable 1 load 1.0 load 1970-01-01 00:00:00 +28 halliburton.com 1970-01-01 2018-09-01 06:00:00 Halliburton 1 load 1.0 load 1970-01-01 00:00:00 +29 northropgrumman.com 1970-01-01 2018-09-01 06:00:00 Northrop Grumman 1 load 1.0 load 1970-01-01 00:00:00 +30 arrow.com 1970-01-01 2018-09-01 06:00:00 Arrow Electronics 1 load 1.0 load 1970-01-01 00:00:00 +31 raytheon.com 1970-01-01 2018-09-01 06:00:00 Raytheon 1 load 1.0 load 1970-01-01 00:00:00 +32 verizon.com 1970-01-01 2018-09-01 06:00:00 Verizon 1 load 1.0 load 1970-01-01 00:00:00 +33 plainsallamerican.com 1970-01-01 2018-09-01 06:00:00 Plains GP Holdings 1 load 1.0 load 1970-01-01 00:00:00 +34 usfoods.com 1970-01-01 2018-09-01 06:00:00 US Foods 1 load 1.0 load 1970-01-01 00:00:00 +35 abbvie.com 1970-01-01 2018-09-01 06:00:00 AbbVie 1 load 1.0 load 1970-01-01 00:00:00 +36 centene.com 1970-01-01 2018-09-01 06:00:00 Centene 1 load 1.0 load 1970-01-01 00:00:00 +37 chs.net 1970-01-01 2018-09-01 06:00:00 Community Health Systems 1 load 1.0 load 1970-01-01 00:00:00 +38 arconic.com 1970-01-01 2018-09-01 06:00:00 Arconic 1 load 1.0 load 1970-01-01 00:00:00 +39 internationalpaper.com 1970-01-01 2018-09-01 06:00:00 International Paper 1 load 1.0 load 1970-01-01 00:00:00 +40 emerson.com 1970-01-01 2018-09-01 06:00:00 Emerson Electric 1 load 1.0 load 1970-01-01 00:00:00 +41 up.com 1970-01-01 2018-09-01 06:00:00 Union Pacific 1 load 1.0 load 1970-01-01 00:00:00 +42 amgen.com 1970-01-01 2018-09-01 06:00:00 Amgen 1 load 1.0 load 1970-01-01 00:00:00 +43 chevron.com 1970-01-01 2018-09-01 06:00:00 Chevron 1 load 1.0 load 1970-01-01 00:00:00 +44 usbank.com 1970-01-01 2018-09-01 06:00:00 U.S. Bancorp 1 load 1.0 load 1970-01-01 00:00:00 +45 staples.com 1970-01-01 2018-09-01 06:00:00 Staples 1 load 1.0 load 1970-01-01 00:00:00 +46 danaher.com 1970-01-01 2018-09-01 06:00:00 Danaher 1 load 1.0 load 1970-01-01 00:00:00 +47 whirlpoolcorp.com 1970-01-01 2018-09-01 06:00:00 Whirlpool 1 load 1.0 load 1970-01-01 00:00:00 +48 aflac.com 1970-01-01 2018-09-01 06:00:00 Aflac 1 load 1.0 load 1970-01-01 00:00:00 +49 autonation.com 1970-01-01 2018-09-01 06:00:00 AutoNation 1 load 1.0 load 1970-01-01 00:00:00 +50 progressive.com 1970-01-01 2018-09-01 06:00:00 Progressive 1 load 1.0 load 1970-01-01 00:00:00 +51 abbott.com 1970-01-01 2018-09-01 06:00:00 Abbott Laboratories 1 load 1.0 load 1970-01-01 00:00:00 +52 dollargeneral.com 1970-01-01 2018-09-01 06:00:00 Dollar General 1 load 1.0 load 1970-01-01 00:00:00 +53 tenethealth.com 1970-01-01 2018-09-01 06:00:00 Tenet Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +54 costco.com 1970-01-01 2018-09-01 06:00:00 Costco 1 load 1.0 load 1970-01-01 00:00:00 +55 lilly.com 1970-01-01 2018-09-01 06:00:00 Eli Lilly 1 load 1.0 load 1970-01-01 00:00:00 +56 southwest.com 1970-01-01 2018-09-01 06:00:00 Southwest Airlines 1 load 1.0 load 1970-01-01 00:00:00 +57 penskeautomotive.com 1970-01-01 2018-09-01 06:00:00 Penske Automotive Group 1 load 1.0 load 1970-01-01 00:00:00 +58 manpowergroup.com 1970-01-01 2018-09-01 06:00:00 ManpowerGroup 1 load 1.0 load 1970-01-01 00:00:00 +59 kohlscorporation.com 1970-01-01 2018-09-01 06:00:00 Kohls 1 load 1.0 load 1970-01-01 00:00:00 +60 starbucks.com 1970-01-01 2018-09-01 06:00:00 Starbucks 1 load 1.0 load 1970-01-01 00:00:00 +61 paccar.com 1970-01-01 2018-09-01 06:00:00 Paccar 1 load 1.0 load 1970-01-01 00:00:00 +62 cummins.com 1970-01-01 2018-09-01 06:00:00 Cummins 1 load 1.0 load 1970-01-01 00:00:00 +63 altria.com 1970-01-01 2018-09-01 06:00:00 Altria Group 1 load 1.0 load 1970-01-01 00:00:00 +64 xerox.com 1970-01-01 2018-09-01 06:00:00 Xerox 1 load 1.0 load 1970-01-01 00:00:00 +65 fanniemae.com 1970-01-01 2018-09-01 06:00:00 Fannie Mae 1 load 1.0 load 1970-01-01 00:00:00 +66 kimberly-clark.com 1970-01-01 2018-09-01 06:00:00 Kimberly-Clark 1 load 1.0 load 1970-01-01 00:00:00 +67 thehartford.com 1970-01-01 2018-09-01 06:00:00 Hartford Financial Services Group 1 load 1.0 load 1970-01-01 00:00:00 +68 kraftheinzcompany.com 1970-01-01 2018-09-01 06:00:00 Kraft Heinz 1 load 1.0 load 1970-01-01 00:00:00 +69 lear.com 1970-01-01 2018-09-01 06:00:00 Lear 1 load 1.0 load 1970-01-01 00:00:00 +70 fluor.com 1970-01-01 2018-09-01 06:00:00 Fluor 1 load 1.0 load 1970-01-01 00:00:00 +71 aecom.com 1970-01-01 2018-09-01 06:00:00 AECOM 1 load 1.0 load 1970-01-01 00:00:00 +72 facebook.com 1970-01-01 2018-09-01 06:00:00 Facebook 1 load 1.0 load 1970-01-01 00:00:00 +73 jabil.com 1970-01-01 2018-09-01 06:00:00 Jabil Circuit 1 load 1.0 load 1970-01-01 00:00:00 +74 centurylink.com 1970-01-01 2018-09-01 06:00:00 CenturyLink 1 load 1.0 load 1970-01-01 00:00:00 +75 supervalu.com 1970-01-01 2018-09-01 06:00:00 Supervalu 1 load 1.0 load 1970-01-01 00:00:00 +76 thekrogerco.com 1970-01-01 2018-09-01 06:00:00 Kroger 1 load 1.0 load 1970-01-01 00:00:00 +77 generalmills.com 1970-01-01 2018-09-01 06:00:00 General Mills 1 load 1.0 load 1970-01-01 00:00:00 +78 southerncompany.com 1970-01-01 2018-09-01 06:00:00 Southern 1 load 1.0 load 1970-01-01 00:00:00 +79 nexteraenergy.com 1970-01-01 2018-09-01 06:00:00 NextEra Energy 1 load 1.0 load 1970-01-01 00:00:00 +80 thermofisher.com 1970-01-01 2018-09-01 06:00:00 Thermo Fisher Scientific 1 load 1.0 load 1970-01-01 00:00:00 +81 aep.com 1970-01-01 2018-09-01 06:00:00 American Electric Power 1 load 1.0 load 1970-01-01 00:00:00 +82 pge.com 1970-01-01 2018-09-01 06:00:00 PG&E Corp. 1 load 1.0 load 1970-01-01 00:00:00 +83 nglenergypartners.com 1970-01-01 2018-09-01 06:00:00 NGL Energy Partners 1 load 1.0 load 1970-01-01 00:00:00 +84 bms.com 1970-01-01 2018-09-01 06:00:00 Bristol-Myers Squibb 1 load 1.0 load 1970-01-01 00:00:00 +85 goodyear.com 1970-01-01 2018-09-01 06:00:00 Goodyear Tire & Rubber 1 load 1.0 load 1970-01-01 00:00:00 +86 nucor.com 1970-01-01 2018-09-01 06:00:00 Nucor 1 load 1.0 load 1970-01-01 00:00:00 +87 amazon.com 1970-01-01 2018-09-01 06:00:00 Amazon.com 1 load 1.0 load 1970-01-01 00:00:00 +88 pnc.com 1970-01-01 2018-09-01 06:00:00 PNC Financial Services Group 1 load 1.0 load 1970-01-01 00:00:00 +89 healthnet.com 1970-01-01 2018-09-01 06:00:00 Health Net 1 load 1.0 load 1970-01-01 00:00:00 +90 micron.com 1970-01-01 2018-09-01 06:00:00 Micron Technology 1 load 1.0 load 1970-01-01 00:00:00 +91 colgatepalmolive.com 1970-01-01 2018-09-01 06:00:00 Colgate-Palmolive 1 load 1.0 load 1970-01-01 00:00:00 +92 fcx.com 1970-01-01 2018-09-01 06:00:00 Freeport-McMoRan 1 load 1.0 load 1970-01-01 00:00:00 +93 conagrafoods.com 1970-01-01 2018-09-01 06:00:00 ConAgra Foods 1 load 1.0 load 1970-01-01 00:00:00 +94 gapinc.com 1970-01-01 2018-09-01 06:00:00 Gap 1 load 1.0 load 1970-01-01 00:00:00 +95 bakerhughes.com 1970-01-01 2018-09-01 06:00:00 Baker Hughes 1 load 1.0 load 1970-01-01 00:00:00 +96 bnymellon.com 1970-01-01 2018-09-01 06:00:00 Bank of New York Mellon Corp. 1 load 1.0 load 1970-01-01 00:00:00 +97 dollartree.com 1970-01-01 2018-09-01 06:00:00 Dollar Tree 1 load 1.0 load 1970-01-01 00:00:00 +98 walgreensbootsalliance.com 1970-01-01 2018-09-01 06:00:00 Walgreens 1 load 1.0 load 1970-01-01 00:00:00 +99 wholefoodsmarket.com 1970-01-01 2018-09-01 06:00:00 Whole Foods Market 1 load 1.0 load 1970-01-01 00:00:00 +100 ppg.com 1970-01-01 2018-09-01 06:00:00 PPG Industries 1 load 1.0 load 1970-01-01 00:00:00 +101 genpt.com 1970-01-01 2018-09-01 06:00:00 Genuine Parts 1 load 1.0 load 1970-01-01 00:00:00 +102 ielp.com 1970-01-01 2018-09-01 06:00:00 Icahn Enterprises 1 load 1.0 load 1970-01-01 00:00:00 +103 pfgc.com 1970-01-01 2018-09-01 06:00:00 Performance Food Group 1 load 1.0 load 1970-01-01 00:00:00 +104 omnicomgroup.com 1970-01-01 2018-09-01 06:00:00 Omnicom Group 1 load 1.0 load 1970-01-01 00:00:00 +105 dish.com 1970-01-01 2018-09-01 06:00:00 DISH Network 1 load 1.0 load 1970-01-01 00:00:00 +106 firstenergycorp.com 1970-01-01 2018-09-01 06:00:00 FirstEnergy 1 load 1.0 load 1970-01-01 00:00:00 +107 monsanto.com 1970-01-01 2018-09-01 06:00:00 Monsanto 1 load 1.0 load 1970-01-01 00:00:00 +108 aes.com 1970-01-01 2018-09-01 06:00:00 AES 1 load 1.0 load 1970-01-01 00:00:00 +109 hp.com 1970-01-01 2018-09-01 06:00:00 HP 1 load 1.0 load 1970-01-01 00:00:00 +110 carmax.com 1970-01-01 2018-09-01 06:00:00 CarMax 1 load 1.0 load 1970-01-01 00:00:00 +111 nov.com 1970-01-01 2018-09-01 06:00:00 National Oilwell Varco 1 load 1.0 load 1970-01-01 00:00:00 +112 nrgenergy.com 1970-01-01 2018-09-01 06:00:00 NRG Energy 1 load 1.0 load 1970-01-01 00:00:00 +113 westerndigital.com 1970-01-01 2018-09-01 06:00:00 Western Digital 1 load 1.0 load 1970-01-01 00:00:00 +114 marriott.com 1970-01-01 2018-09-01 06:00:00 Marriott International 1 load 1.0 load 1970-01-01 00:00:00 +115 officedepot.com 1970-01-01 2018-09-01 06:00:00 Office Depot 1 load 1.0 load 1970-01-01 00:00:00 +116 nordstrom.com 1970-01-01 2018-09-01 06:00:00 Nordstrom 1 load 1.0 load 1970-01-01 00:00:00 +117 kindermorgan.com 1970-01-01 2018-09-01 06:00:00 Kinder Morgan 1 load 1.0 load 1970-01-01 00:00:00 +118 aramark.com 1970-01-01 2018-09-01 06:00:00 Aramark 1 load 1.0 load 1970-01-01 00:00:00 +119 davita.com 1970-01-01 2018-09-01 06:00:00 DaVita 1 load 1.0 load 1970-01-01 00:00:00 +120 apple.com 1970-01-01 2018-09-01 06:00:00 Apple 1 load 1.0 load 1970-01-01 00:00:00 +121 cardinal.com 1970-01-01 2018-09-01 06:00:00 Cardinal Health 1 load 1.0 load 1970-01-01 00:00:00 +122 molinahealthcare.com 1970-01-01 2018-09-01 06:00:00 Molina Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +123 wellcare.com 1970-01-01 2018-09-01 06:00:00 WellCare Health Plans 1 load 1.0 load 1970-01-01 00:00:00 +124 cbscorporation.com 1970-01-01 2018-09-01 06:00:00 CBS 1 load 1.0 load 1970-01-01 00:00:00 +125 visa.com 1970-01-01 2018-09-01 06:00:00 Visa 1 load 1.0 load 1970-01-01 00:00:00 +126 lfg.com 1970-01-01 2018-09-01 06:00:00 Lincoln National 1 load 1.0 load 1970-01-01 00:00:00 +127 ecolab.com 1970-01-01 2018-09-01 06:00:00 Ecolab 1 load 1.0 load 1970-01-01 00:00:00 +128 kelloggcompany.com 1970-01-01 2018-09-01 06:00:00 Kellogg 1 load 1.0 load 1970-01-01 00:00:00 +129 chrobinson.com 1970-01-01 2018-09-01 06:00:00 C.H. Robinson Worldwide 1 load 1.0 load 1970-01-01 00:00:00 +130 textron.com 1970-01-01 2018-09-01 06:00:00 Textron 1 load 1.0 load 1970-01-01 00:00:00 +131 loews.com 1970-01-01 2018-09-01 06:00:00 Loews 1 load 1.0 load 1970-01-01 00:00:00 +132 express-scripts.com 1970-01-01 2018-09-01 06:00:00 Express Scripts Holding 1 load 1.0 load 1970-01-01 00:00:00 +133 itw.com 1970-01-01 2018-09-01 06:00:00 Illinois Tool Works 1 load 1.0 load 1970-01-01 00:00:00 +134 synnex.com 1970-01-01 2018-09-01 06:00:00 Synnex 1 load 1.0 load 1970-01-01 00:00:00 +135 viacom.com 1970-01-01 2018-09-01 06:00:00 Viacom 1 load 1.0 load 1970-01-01 00:00:00 +136 hollyfrontier.com 1970-01-01 2018-09-01 06:00:00 HollyFrontier 1 load 1.0 load 1970-01-01 00:00:00 +137 landolakesinc.com 1970-01-01 2018-09-01 06:00:00 Land O Lakes 1 load 1.0 load 1970-01-01 00:00:00 +138 devonenergy.com 1970-01-01 2018-09-01 06:00:00 Devon Energy 1 load 1.0 load 1970-01-01 00:00:00 +139 pbfenergy.com 1970-01-01 2018-09-01 06:00:00 PBF Energy 1 load 1.0 load 1970-01-01 00:00:00 +140 yum.com 1970-01-01 2018-09-01 06:00:00 Yum Brands 1 load 1.0 load 1970-01-01 00:00:00 +141 ti.com 1970-01-01 2018-09-01 06:00:00 Texas Instruments 1 load 1.0 load 1970-01-01 00:00:00 +142 cdw.com 1970-01-01 2018-09-01 06:00:00 CDW 1 load 1.0 load 1970-01-01 00:00:00 +143 jpmorganchase.com 1970-01-01 2018-09-01 06:00:00 J.P. Morgan Chase 1 load 1.0 load 1970-01-01 00:00:00 +144 wm.com 1970-01-01 2018-09-01 06:00:00 Waste Management 1 load 1.0 load 1970-01-01 00:00:00 +145 mmc.com 1970-01-01 2018-09-01 06:00:00 Marsh & McLennan 1 load 1.0 load 1970-01-01 00:00:00 +146 chk.com 1970-01-01 2018-09-01 06:00:00 Chesapeake Energy 1 load 1.0 load 1970-01-01 00:00:00 +147 parker.com 1970-01-01 2018-09-01 06:00:00 Parker-Hannifin 1 load 1.0 load 1970-01-01 00:00:00 +148 oxy.com 1970-01-01 2018-09-01 06:00:00 Occidental Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +149 guardianlife.com 1970-01-01 2018-09-01 06:00:00 Guardian Life Ins. Co. of America 1 load 1.0 load 1970-01-01 00:00:00 +150 farmers.com 1970-01-01 2018-09-01 06:00:00 Farmers Insurance Exchange 1 load 1.0 load 1970-01-01 00:00:00 +151 jcpenney.com 1970-01-01 2018-09-01 06:00:00 J.C. Penney 1 load 1.0 load 1970-01-01 00:00:00 +152 conedison.com 1970-01-01 2018-09-01 06:00:00 Consolidated Edison 1 load 1.0 load 1970-01-01 00:00:00 +153 cognizant.com 1970-01-01 2018-09-01 06:00:00 Cognizant Technology Solutions 1 load 1.0 load 1970-01-01 00:00:00 +154 boeing.com 1970-01-01 2018-09-01 06:00:00 Boeing 1 load 1.0 load 1970-01-01 00:00:00 +155 vfc.com 1970-01-01 2018-09-01 06:00:00 VF 1 load 1.0 load 1970-01-01 00:00:00 +156 ameriprise.com 1970-01-01 2018-09-01 06:00:00 Ameriprise Financial 1 load 1.0 load 1970-01-01 00:00:00 +157 csc.com 1970-01-01 2018-09-01 06:00:00 Computer Sciences 1 load 1.0 load 1970-01-01 00:00:00 +158 lb.com 1970-01-01 2018-09-01 06:00:00 L Brands 1 load 1.0 load 1970-01-01 00:00:00 +159 jacobs.com 1970-01-01 2018-09-01 06:00:00 Jacobs Engineering Group 1 load 1.0 load 1970-01-01 00:00:00 +160 principal.com 1970-01-01 2018-09-01 06:00:00 Principal Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +161 rossstores.com 1970-01-01 2018-09-01 06:00:00 Ross Stores 1 load 1.0 load 1970-01-01 00:00:00 +162 bedbathandbeyond.com 1970-01-01 2018-09-01 06:00:00 Bed Bath & Beyond 1 load 1.0 load 1970-01-01 00:00:00 +163 csx.com 1970-01-01 2018-09-01 06:00:00 CSX 1 load 1.0 load 1970-01-01 00:00:00 +164 toysrusinc.com 1970-01-01 2018-09-01 06:00:00 Toys \\"R\\" Us 1 load 1.0 load 1970-01-01 00:00:00 +165 microsoft.com 1970-01-01 2018-09-01 06:00:00 Microsoft 1 load 1.0 load 1970-01-01 00:00:00 +166 sands.com 1970-01-01 2018-09-01 06:00:00 Las Vegas Sands 1 load 1.0 load 1970-01-01 00:00:00 +167 leucadia.com 1970-01-01 2018-09-01 06:00:00 Leucadia National 1 load 1.0 load 1970-01-01 00:00:00 +168 dom.com 1970-01-01 2018-09-01 06:00:00 Dominion Resources 1 load 1.0 load 1970-01-01 00:00:00 +169 ussteel.com 1970-01-01 2018-09-01 06:00:00 United States Steel 1 load 1.0 load 1970-01-01 00:00:00 +170 l-3com.com 1970-01-01 2018-09-01 06:00:00 L-3 Communications 1 load 1.0 load 1970-01-01 00:00:00 +171 edisoninvestor.com 1970-01-01 2018-09-01 06:00:00 Edison International 1 load 1.0 load 1970-01-01 00:00:00 +172 entergy.com 1970-01-01 2018-09-01 06:00:00 Entergy 1 load 1.0 load 1970-01-01 00:00:00 +173 adp.com 1970-01-01 2018-09-01 06:00:00 ADP 1 load 1.0 load 1970-01-01 00:00:00 +174 firstdata.com 1970-01-01 2018-09-01 06:00:00 First Data 1 load 1.0 load 1970-01-01 00:00:00 +175 blackrock.com 1970-01-01 2018-09-01 06:00:00 BlackRock 1 load 1.0 load 1970-01-01 00:00:00 +176 bankofamerica.com 1970-01-01 2018-09-01 06:00:00 Bank of America Corp. 1 load 1.0 load 1970-01-01 00:00:00 +177 westrock.com 1970-01-01 2018-09-01 06:00:00 WestRock 1 load 1.0 load 1970-01-01 00:00:00 +178 voya.com 1970-01-01 2018-09-01 06:00:00 Voya Financial 1 load 1.0 load 1970-01-01 00:00:00 +179 sherwin.com 1970-01-01 2018-09-01 06:00:00 Sherwin-Williams 1 load 1.0 load 1970-01-01 00:00:00 +180 hiltonworldwide.com 1970-01-01 2018-09-01 06:00:00 Hilton Worldwide Holdings 1 load 1.0 load 1970-01-01 00:00:00 +181 rrdonnelley.com 1970-01-01 2018-09-01 06:00:00 R.R. Donnelley & Sons 1 load 1.0 load 1970-01-01 00:00:00 +182 stanleyblackanddecker.com 1970-01-01 2018-09-01 06:00:00 Stanley Black & Decker 1 load 1.0 load 1970-01-01 00:00:00 +183 xcelenergy.com 1970-01-01 2018-09-01 06:00:00 Xcel Energy 1 load 1.0 load 1970-01-01 00:00:00 +184 corporate.murphyusa.com 1970-01-01 2018-09-01 06:00:00 Murphy USA 1 load 1.0 load 1970-01-01 00:00:00 +185 cbre.com 1970-01-01 2018-09-01 06:00:00 CBRE Group 1 load 1.0 load 1970-01-01 00:00:00 +186 drhorton.com 1970-01-01 2018-09-01 06:00:00 D.R. Horton 1 load 1.0 load 1970-01-01 00:00:00 +187 wellsfargo.com 1970-01-01 2018-09-01 06:00:00 Wells Fargo 1 load 1.0 load 1970-01-01 00:00:00 +188 elcompanies.com 1970-01-01 2018-09-01 06:00:00 Estee Lauder 1 load 1.0 load 1970-01-01 00:00:00 +189 praxair.com 1970-01-01 2018-09-01 06:00:00 Praxair 1 load 1.0 load 1970-01-01 00:00:00 +190 biogen.com 1970-01-01 2018-09-01 06:00:00 Biogen 1 load 1.0 load 1970-01-01 00:00:00 +191 statestreet.com 1970-01-01 2018-09-01 06:00:00 State Street Corp. 1 load 1.0 load 1970-01-01 00:00:00 +192 unum.com 1970-01-01 2018-09-01 06:00:00 Unum Group 1 load 1.0 load 1970-01-01 00:00:00 +193 reynoldsamerican.com 1970-01-01 2018-09-01 06:00:00 Reynolds American 1 load 1.0 load 1970-01-01 00:00:00 +194 group1auto.com 1970-01-01 2018-09-01 06:00:00 Group 1 Automotive 1 load 1.0 load 1970-01-01 00:00:00 +195 henryschein.com 1970-01-01 2018-09-01 06:00:00 Henry Schein 1 load 1.0 load 1970-01-01 00:00:00 +196 hertz.com 1970-01-01 2018-09-01 06:00:00 Hertz Global Holdings 1 load 1.0 load 1970-01-01 00:00:00 +197 nscorp.com 1970-01-01 2018-09-01 06:00:00 Norfolk Southern 1 load 1.0 load 1970-01-01 00:00:00 +198 homedepot.com 1970-01-01 2018-09-01 06:00:00 Home Depot 1 load 1.0 load 1970-01-01 00:00:00 +199 rgare.com 1970-01-01 2018-09-01 06:00:00 Reinsurance Group of America 1 load 1.0 load 1970-01-01 00:00:00 +200 pseg.com 1970-01-01 2018-09-01 06:00:00 Public Service Enterprise Group 1 load 1.0 load 1970-01-01 00:00:00 +201 bbt.com 1970-01-01 2018-09-01 06:00:00 BB&T Corp. 1 load 1.0 load 1970-01-01 00:00:00 +202 dteenergy.com 1970-01-01 2018-09-01 06:00:00 DTE Energy 1 load 1.0 load 1970-01-01 00:00:00 +203 assurant.com 1970-01-01 2018-09-01 06:00:00 Assurant 1 load 1.0 load 1970-01-01 00:00:00 +204 globalp.com 1970-01-01 2018-09-01 06:00:00 Global Partners 1 load 1.0 load 1970-01-01 00:00:00 +205 huntsman.com 1970-01-01 2018-09-01 06:00:00 Huntsman 1 load 1.0 load 1970-01-01 00:00:00 +206 bd.com 1970-01-01 2018-09-01 06:00:00 Becton Dickinson 1 load 1.0 load 1970-01-01 00:00:00 +207 sempra.com 1970-01-01 2018-09-01 06:00:00 Sempra Energy 1 load 1.0 load 1970-01-01 00:00:00 +208 autozone.com 1970-01-01 2018-09-01 06:00:00 AutoZone 1 load 1.0 load 1970-01-01 00:00:00 +209 citigroup.com 1970-01-01 2018-09-01 06:00:00 Citigroup 1 load 1.0 load 1970-01-01 00:00:00 +210 navistar.com 1970-01-01 2018-09-01 06:00:00 Navistar International 1 load 1.0 load 1970-01-01 00:00:00 +211 precast.com 1970-01-01 2018-09-01 06:00:00 Precision Castparts 1 load 1.0 load 1970-01-01 00:00:00 +212 discoverfinancial.com 1970-01-01 2018-09-01 06:00:00 Discover Financial Services 1 load 1.0 load 1970-01-01 00:00:00 +213 libertyinteractive.com 1970-01-01 2018-09-01 06:00:00 Liberty Interactive 1 load 1.0 load 1970-01-01 00:00:00 +214 grainger.com 1970-01-01 2018-09-01 06:00:00 W.W. Grainger 1 load 1.0 load 1970-01-01 00:00:00 +215 baxter.com 1970-01-01 2018-09-01 06:00:00 Baxter International 1 load 1.0 load 1970-01-01 00:00:00 +216 stryker.com 1970-01-01 2018-09-01 06:00:00 Stryker 1 load 1.0 load 1970-01-01 00:00:00 +217 airproducts.com 1970-01-01 2018-09-01 06:00:00 Air Products & Chemicals 1 load 1.0 load 1970-01-01 00:00:00 +218 wnr.com 1970-01-01 2018-09-01 06:00:00 Western Refining 1 load 1.0 load 1970-01-01 00:00:00 +219 uhsinc.com 1970-01-01 2018-09-01 06:00:00 Universal Health Services 1 load 1.0 load 1970-01-01 00:00:00 +220 phillips66.com 1970-01-01 2018-09-01 06:00:00 Phillips 66 1 load 1.0 load 1970-01-01 00:00:00 +221 owens-minor.com 1970-01-01 2018-09-01 06:00:00 Owens & Minor 1 load 1.0 load 1970-01-01 00:00:00 +222 charter.com 1970-01-01 2018-09-01 06:00:00 Charter Communications 1 load 1.0 load 1970-01-01 00:00:00 +223 advanceautoparts.com 1970-01-01 2018-09-01 06:00:00 Advance Auto Parts 1 load 1.0 load 1970-01-01 00:00:00 +224 mastercard.com 1970-01-01 2018-09-01 06:00:00 MasterCard 1 load 1.0 load 1970-01-01 00:00:00 +225 appliedmaterials.com 1970-01-01 2018-09-01 06:00:00 Applied Materials 1 load 1.0 load 1970-01-01 00:00:00 +226 eastman.com 1970-01-01 2018-09-01 06:00:00 Eastman Chemical 1 load 1.0 load 1970-01-01 00:00:00 +227 sonicautomotive.com 1970-01-01 2018-09-01 06:00:00 Sonic Automotive 1 load 1.0 load 1970-01-01 00:00:00 +228 ally.com 1970-01-01 2018-09-01 06:00:00 Ally Financial 1 load 1.0 load 1970-01-01 00:00:00 +229 cstbrands.com 1970-01-01 2018-09-01 06:00:00 CST Brands 1 load 1.0 load 1970-01-01 00:00:00 +230 ebay.com 1970-01-01 2018-09-01 06:00:00 eBay 1 load 1.0 load 1970-01-01 00:00:00 +231 berkshirehathaway.com 1970-01-01 2018-09-01 06:00:00 Berkshire Hathaway 1 load 1.0 load 1970-01-01 00:00:00 +233 lennar.com 1970-01-01 2018-09-01 06:00:00 Lennar 1 load 1.0 load 1970-01-01 00:00:00 +234 gamestopcorp.com 1970-01-01 2018-09-01 06:00:00 GameStop 1 load 1.0 load 1970-01-01 00:00:00 +235 rsac.com 1970-01-01 2018-09-01 06:00:00 Reliance Steel & Aluminum 1 load 1.0 load 1970-01-01 00:00:00 +236 hormelfoods.com 1970-01-01 2018-09-01 06:00:00 Hormel Foods 1 load 1.0 load 1970-01-01 00:00:00 +237 celgene.com 1970-01-01 2018-09-01 06:00:00 Celgene 1 load 1.0 load 1970-01-01 00:00:00 +238 genworth.com 1970-01-01 2018-09-01 06:00:00 Genworth Financial 1 load 1.0 load 1970-01-01 00:00:00 +239 paypal.com 1970-01-01 2018-09-01 06:00:00 PayPal Holdings 1 load 1.0 load 1970-01-01 00:00:00 +240 pricelinegroup.com 1970-01-01 2018-09-01 06:00:00 Priceline Group 1 load 1.0 load 1970-01-01 00:00:00 +241 mgmresorts.com 1970-01-01 2018-09-01 06:00:00 MGM Resorts International 1 load 1.0 load 1970-01-01 00:00:00 +242 autoliv.com 1970-01-01 2018-09-01 06:00:00 Autoliv 1 load 1.0 load 1970-01-01 00:00:00 +243 valero.com 1970-01-01 2018-09-01 06:00:00 Valero Energy 1 load 1.0 load 1970-01-01 00:00:00 +244 fnf.com 1970-01-01 2018-09-01 06:00:00 Fidelity National Financial 1 load 1.0 load 1970-01-01 00:00:00 +245 republicservices.com 1970-01-01 2018-09-01 06:00:00 Republic Services 1 load 1.0 load 1970-01-01 00:00:00 +246 corning.com 1970-01-01 2018-09-01 06:00:00 Corning 1 load 1.0 load 1970-01-01 00:00:00 +247 kiewit.com 1970-01-01 2018-09-01 06:00:00 Peter Kiewit Sons 1 load 1.0 load 1970-01-01 00:00:00 +248 univar.com 1970-01-01 2018-09-01 06:00:00 Univar 1 load 1.0 load 1970-01-01 00:00:00 +249 mosaicco.com 1970-01-01 2018-09-01 06:00:00 Mosaic 1 load 1.0 load 1970-01-01 00:00:00 +250 core-mark.com 1970-01-01 2018-09-01 06:00:00 Core-Mark Holding 1 load 1.0 load 1970-01-01 00:00:00 +251 thrivent.com 1970-01-01 2018-09-01 06:00:00 Thrivent Financial for Lutherans 1 load 1.0 load 1970-01-01 00:00:00 +252 c-a-m.com 1970-01-01 2018-09-01 06:00:00 Cameron International 1 load 1.0 load 1970-01-01 00:00:00 +253 hdsupply.com 1970-01-01 2018-09-01 06:00:00 HD Supply Holdings 1 load 1.0 load 1970-01-01 00:00:00 +254 antheminc.com 1970-01-01 2018-09-01 06:00:00 Anthem 1 load 1.0 load 1970-01-01 00:00:00 +255 crowncork.com 1970-01-01 2018-09-01 06:00:00 Crown Holdings 1 load 1.0 load 1970-01-01 00:00:00 +256 eogresources.com 1970-01-01 2018-09-01 06:00:00 EOG Resources 1 load 1.0 load 1970-01-01 00:00:00 +257 veritivcorp.com 1970-01-01 2018-09-01 06:00:00 Veritiv 1 load 1.0 load 1970-01-01 00:00:00 +258 anadarko.com 1970-01-01 2018-09-01 06:00:00 Anadarko Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +259 labcorp.com 1970-01-01 2018-09-01 06:00:00 Laboratory Corp. of America 1 load 1.0 load 1970-01-01 00:00:00 +260 pacificlife.com 1970-01-01 2018-09-01 06:00:00 Pacific Life 1 load 1.0 load 1970-01-01 00:00:00 +261 newscorp.com 1970-01-01 2018-09-01 06:00:00 News Corp. 1 load 1.0 load 1970-01-01 00:00:00 +262 jarden.com 1970-01-01 2018-09-01 06:00:00 Jarden 1 load 1.0 load 1970-01-01 00:00:00 +263 suntrust.com 1970-01-01 2018-09-01 06:00:00 SunTrust Banks 1 load 1.0 load 1970-01-01 00:00:00 +264 avisbudgetgroup.com 1970-01-01 2018-09-01 06:00:00 Avis Budget Group 1 load 1.0 load 1970-01-01 00:00:00 +265 pg.com 1970-01-01 2018-09-01 06:00:00 Procter & Gamble 1 load 1.0 load 1970-01-01 00:00:00 +266 broadcom.com 1970-01-01 2018-09-01 06:00:00 Broadcom 1 load 1.0 load 1970-01-01 00:00:00 +267 amfam.com 1970-01-01 2018-09-01 06:00:00 American Family Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +268 level3.com 1970-01-01 2018-09-01 06:00:00 Level 3 Communications 1 load 1.0 load 1970-01-01 00:00:00 +269 tenneco.com 1970-01-01 2018-09-01 06:00:00 Tenneco 1 load 1.0 load 1970-01-01 00:00:00 +270 unfi.com 1970-01-01 2018-09-01 06:00:00 United Natural Foods 1 load 1.0 load 1970-01-01 00:00:00 +271 deanfoods.com 1970-01-01 2018-09-01 06:00:00 Dean Foods 1 load 1.0 load 1970-01-01 00:00:00 +272 campbellsoupcompany.com 1970-01-01 2018-09-01 06:00:00 Campbell Soup 1 load 1.0 load 1970-01-01 00:00:00 +273 mohawkind.com 1970-01-01 2018-09-01 06:00:00 Mohawk Industries 1 load 1.0 load 1970-01-01 00:00:00 +274 borgwarner.com 1970-01-01 2018-09-01 06:00:00 BorgWarner 1 load 1.0 load 1970-01-01 00:00:00 +275 pvh.com 1970-01-01 2018-09-01 06:00:00 PVH 1 load 1.0 load 1970-01-01 00:00:00 +276 statefarm.com 1970-01-01 2018-09-01 06:00:00 State Farm Insurance Cos. 1 load 1.0 load 1970-01-01 00:00:00 +277 ball.com 1970-01-01 2018-09-01 06:00:00 Ball 1 load 1.0 load 1970-01-01 00:00:00 +278 oreillyauto.com 1970-01-01 2018-09-01 06:00:00 O Reilly Automotive 1 load 1.0 load 1970-01-01 00:00:00 +279 eversource.com 1970-01-01 2018-09-01 06:00:00 Eversource Energy 1 load 1.0 load 1970-01-01 00:00:00 +280 franklinresources.com 1970-01-01 2018-09-01 06:00:00 Franklin Resources 1 load 1.0 load 1970-01-01 00:00:00 +281 masco.com 1970-01-01 2018-09-01 06:00:00 Masco 1 load 1.0 load 1970-01-01 00:00:00 +282 lithia.com 1970-01-01 2018-09-01 06:00:00 Lithia Motors 1 load 1.0 load 1970-01-01 00:00:00 +283 kkr.com 1970-01-01 2018-09-01 06:00:00 KKR 1 load 1.0 load 1970-01-01 00:00:00 +284 oneok.com 1970-01-01 2018-09-01 06:00:00 Oneok 1 load 1.0 load 1970-01-01 00:00:00 +285 newmont.com 1970-01-01 2018-09-01 06:00:00 Newmont Mining 1 load 1.0 load 1970-01-01 00:00:00 +286 pplweb.com 1970-01-01 2018-09-01 06:00:00 PPL 1 load 1.0 load 1970-01-01 00:00:00 +287 google.com 1970-01-01 2018-09-01 06:00:00 Alphabet 1 load 1.0 load 1970-01-01 00:00:00 +288 spartannash.com 1970-01-01 2018-09-01 06:00:00 SpartanNash 1 load 1.0 load 1970-01-01 00:00:00 +289 quantaservices.com 1970-01-01 2018-09-01 06:00:00 Quanta Services 1 load 1.0 load 1970-01-01 00:00:00 +290 xpo.com 1970-01-01 2018-09-01 06:00:00 XPO Logistics 1 load 1.0 load 1970-01-01 00:00:00 +291 ralphlauren.com 1970-01-01 2018-09-01 06:00:00 Ralph Lauren 1 load 1.0 load 1970-01-01 00:00:00 +292 interpublic.com 1970-01-01 2018-09-01 06:00:00 Interpublic Group 1 load 1.0 load 1970-01-01 00:00:00 +293 steeldynamics.com 1970-01-01 2018-09-01 06:00:00 Steel Dynamics 1 load 1.0 load 1970-01-01 00:00:00 +294 wesco.com 1970-01-01 2018-09-01 06:00:00 WESCO International 1 load 1.0 load 1970-01-01 00:00:00 +295 questdiagnostics.com 1970-01-01 2018-09-01 06:00:00 Quest Diagnostics 1 load 1.0 load 1970-01-01 00:00:00 +296 bostonscientific.com 1970-01-01 2018-09-01 06:00:00 Boston Scientific 1 load 1.0 load 1970-01-01 00:00:00 +297 agcocorp.com 1970-01-01 2018-09-01 06:00:00 AGCO 1 load 1.0 load 1970-01-01 00:00:00 +298 comcastcorporation.com 1970-01-01 2018-09-01 06:00:00 Comcast 1 load 1.0 load 1970-01-01 00:00:00 +299 footlocker-inc.com 1970-01-01 2018-09-01 06:00:00 Foot Locker 1 load 1.0 load 1970-01-01 00:00:00 +300 thehersheycompany.com 1970-01-01 2018-09-01 06:00:00 Hershey 1 load 1.0 load 1970-01-01 00:00:00 +450 nvrinc.com 1970-01-01 2018-09-01 06:00:00 NVR 1 load 1.0 load 1970-01-01 00:00:00 +301 centerpointenergy.com 1970-01-01 2018-09-01 06:00:00 CenterPoint Energy 1 load 1.0 load 1970-01-01 00:00:00 +302 williams.com 1970-01-01 2018-09-01 06:00:00 Williams 1 load 1.0 load 1970-01-01 00:00:00 +303 dickssportinggoods.com 1970-01-01 2018-09-01 06:00:00 Dicks Sporting Goods 1 load 1.0 load 1970-01-01 00:00:00 +304 livenation.com 1970-01-01 2018-09-01 06:00:00 Live Nation Entertainment 1 load 1.0 load 1970-01-01 00:00:00 +305 mutualofomaha.com 1970-01-01 2018-09-01 06:00:00 Mutual of Omaha Insurance 1 load 1.0 load 1970-01-01 00:00:00 +306 wrberkley.com 1970-01-01 2018-09-01 06:00:00 W.R. Berkley 1 load 1.0 load 1970-01-01 00:00:00 +307 lkqcorp.com 1970-01-01 2018-09-01 06:00:00 LKQ 1 load 1.0 load 1970-01-01 00:00:00 +308 avoncompany.com 1970-01-01 2018-09-01 06:00:00 Avon Products 1 load 1.0 load 1970-01-01 00:00:00 +309 target.com 1970-01-01 2018-09-01 06:00:00 Target 1 load 1.0 load 1970-01-01 00:00:00 +310 darden.com 1970-01-01 2018-09-01 06:00:00 Darden Restaurants 1 load 1.0 load 1970-01-01 00:00:00 +311 kindredhealthcare.com 1970-01-01 2018-09-01 06:00:00 Kindred Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +312 weyerhaeuser.com 1970-01-01 2018-09-01 06:00:00 Weyerhaeuser 1 load 1.0 load 1970-01-01 00:00:00 +313 caseys.com 1970-01-01 2018-09-01 06:00:00 Caseys General Stores 1 load 1.0 load 1970-01-01 00:00:00 +314 sealedair.com 1970-01-01 2018-09-01 06:00:00 Sealed Air 1 load 1.0 load 1970-01-01 00:00:00 +315 53.com 1970-01-01 2018-09-01 06:00:00 Fifth Third Bancorp 1 load 1.0 load 1970-01-01 00:00:00 +316 dovercorporation.com 1970-01-01 2018-09-01 06:00:00 Dover 1 load 1.0 load 1970-01-01 00:00:00 +317 huntingtoningalls.com 1970-01-01 2018-09-01 06:00:00 Huntington Ingalls Industries 1 load 1.0 load 1970-01-01 00:00:00 +318 netflix.com 1970-01-01 2018-09-01 06:00:00 Netflix 1 load 1.0 load 1970-01-01 00:00:00 +319 dillards.com 1970-01-01 2018-09-01 06:00:00 Dillards 1 load 1.0 load 1970-01-01 00:00:00 +320 jnj.com 1970-01-01 2018-09-01 06:00:00 Johnson & Johnson 1 load 1.0 load 1970-01-01 00:00:00 +321 emcorgroup.com 1970-01-01 2018-09-01 06:00:00 EMCOR Group 1 load 1.0 load 1970-01-01 00:00:00 +322 edwardjones.com 1970-01-01 2018-09-01 06:00:00 Jones Financial 1 load 1.0 load 1970-01-01 00:00:00 +323 aksteel.com 1970-01-01 2018-09-01 06:00:00 AK Steel Holding 1 load 1.0 load 1970-01-01 00:00:00 +324 ugicorp.com 1970-01-01 2018-09-01 06:00:00 UGI 1 load 1.0 load 1970-01-01 00:00:00 +325 expediainc.com 1970-01-01 2018-09-01 06:00:00 Expedia 1 load 1.0 load 1970-01-01 00:00:00 +326 salesforce.com 1970-01-01 2018-09-01 06:00:00 salesforce.com 1 load 1.0 load 1970-01-01 00:00:00 +327 targaresources.com 1970-01-01 2018-09-01 06:00:00 Targa Resources 1 load 1.0 load 1970-01-01 00:00:00 +328 apachecorp.com 1970-01-01 2018-09-01 06:00:00 Apache 1 load 1.0 load 1970-01-01 00:00:00 +329 spiritaero.com 1970-01-01 2018-09-01 06:00:00 Spirit AeroSystems Holdings 1 load 1.0 load 1970-01-01 00:00:00 +330 expeditors.com 1970-01-01 2018-09-01 06:00:00 Expeditors International of Washington 1 load 1.0 load 1970-01-01 00:00:00 +331 metlife.com 1970-01-01 2018-09-01 06:00:00 MetLife 1 load 1.0 load 1970-01-01 00:00:00 +332 anixter.com 1970-01-01 2018-09-01 06:00:00 Anixter International 1 load 1.0 load 1970-01-01 00:00:00 +333 fisglobal.com 1970-01-01 2018-09-01 06:00:00 Fidelity National Information Services 1 load 1.0 load 1970-01-01 00:00:00 +334 asburyauto.com 1970-01-01 2018-09-01 06:00:00 Asbury Automotive Group 1 load 1.0 load 1970-01-01 00:00:00 +335 hess.com 1970-01-01 2018-09-01 06:00:00 Hess 1 load 1.0 load 1970-01-01 00:00:00 +336 ryder.com 1970-01-01 2018-09-01 06:00:00 Ryder System 1 load 1.0 load 1970-01-01 00:00:00 +337 terex.com 1970-01-01 2018-09-01 06:00:00 Terex 1 load 1.0 load 1970-01-01 00:00:00 +338 cokecce.com 1970-01-01 2018-09-01 06:00:00 Coca-Cola European Partners 1 load 1.0 load 1970-01-01 00:00:00 +339 auto-owners.com 1970-01-01 2018-09-01 06:00:00 Auto-Owners Insurance 1 load 1.0 load 1970-01-01 00:00:00 +340 cablevision.com 1970-01-01 2018-09-01 06:00:00 Cablevision Systems 1 load 1.0 load 1970-01-01 00:00:00 +341 symantec.com 1970-01-01 2018-09-01 06:00:00 Symantec 1 load 1.0 load 1970-01-01 00:00:00 +342 mckesson.com 1970-01-01 2018-09-01 06:00:00 McKesson 1 load 1.0 load 1970-01-01 00:00:00 +343 adm.com 1970-01-01 2018-09-01 06:00:00 Archer Daniels Midland 1 load 1.0 load 1970-01-01 00:00:00 +344 aboutschwab.com 1970-01-01 2018-09-01 06:00:00 Charles Schwab 1 load 1.0 load 1970-01-01 00:00:00 +345 calpine.com 1970-01-01 2018-09-01 06:00:00 Calpine 1 load 1.0 load 1970-01-01 00:00:00 +346 cmsenergy.com 1970-01-01 2018-09-01 06:00:00 CMS Energy 1 load 1.0 load 1970-01-01 00:00:00 +347 alliancedata.com 1970-01-01 2018-09-01 06:00:00 Alliance Data Systems 1 load 1.0 load 1970-01-01 00:00:00 +348 jetblue.com 1970-01-01 2018-09-01 06:00:00 JetBlue Airways 1 load 1.0 load 1970-01-01 00:00:00 +349 discoverycommunications.com 1970-01-01 2018-09-01 06:00:00 Discovery Communications 1 load 1.0 load 1970-01-01 00:00:00 +350 trin.net 1970-01-01 2018-09-01 06:00:00 Trinity Industries 1 load 1.0 load 1970-01-01 00:00:00 +351 sanmina.com 1970-01-01 2018-09-01 06:00:00 Sanmina 1 load 1.0 load 1970-01-01 00:00:00 +352 ncr.com 1970-01-01 2018-09-01 06:00:00 NCR 1 load 1.0 load 1970-01-01 00:00:00 +353 fmctechnologies.com 1970-01-01 2018-09-01 06:00:00 FMC Technologies 1 load 1.0 load 1970-01-01 00:00:00 +354 marathonpetroleum.com 1970-01-01 2018-09-01 06:00:00 Marathon Petroleum 1 load 1.0 load 1970-01-01 00:00:00 +355 erieinsurance.com 1970-01-01 2018-09-01 06:00:00 Erie Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +356 rockwellautomation.com 1970-01-01 2018-09-01 06:00:00 Rockwell Automation 1 load 1.0 load 1970-01-01 00:00:00 +357 drpeppersnapplegroup.com 1970-01-01 2018-09-01 06:00:00 Dr Pepper Snapple Group 1 load 1.0 load 1970-01-01 00:00:00 +358 iheartmedia.com 1970-01-01 2018-09-01 06:00:00 iHeartMedia 1 load 1.0 load 1970-01-01 00:00:00 +359 tractorsupply.com 1970-01-01 2018-09-01 06:00:00 Tractor Supply 1 load 1.0 load 1970-01-01 00:00:00 +360 jbhunt.com 1970-01-01 2018-09-01 06:00:00 J.B. Hunt Transport Services 1 load 1.0 load 1970-01-01 00:00:00 +361 cmc.com 1970-01-01 2018-09-01 06:00:00 Commercial Metals 1 load 1.0 load 1970-01-01 00:00:00 +362 o-i.com 1970-01-01 2018-09-01 06:00:00 Owens-Illinois 1 load 1.0 load 1970-01-01 00:00:00 +363 harman.com 1970-01-01 2018-09-01 06:00:00 Harman International Industries 1 load 1.0 load 1970-01-01 00:00:00 +364 baxalta.com 1970-01-01 2018-09-01 06:00:00 Baxalta 1 load 1.0 load 1970-01-01 00:00:00 +365 freddiemac.com 1970-01-01 2018-09-01 06:00:00 Freddie Mac 1 load 1.0 load 1970-01-01 00:00:00 +366 afginc.com 1970-01-01 2018-09-01 06:00:00 American Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +367 netapp.com 1970-01-01 2018-09-01 06:00:00 NetApp 1 load 1.0 load 1970-01-01 00:00:00 +368 graybar.com 1970-01-01 2018-09-01 06:00:00 Graybar Electric 1 load 1.0 load 1970-01-01 00:00:00 +369 oshkoshcorporation.com 1970-01-01 2018-09-01 06:00:00 Oshkosh 1 load 1.0 load 1970-01-01 00:00:00 +370 ameren.com 1970-01-01 2018-09-01 06:00:00 Ameren 1 load 1.0 load 1970-01-01 00:00:00 +371 amark.com 1970-01-01 2018-09-01 06:00:00 A-Mark Precious Metals 1 load 1.0 load 1970-01-01 00:00:00 +372 barnesandnobleinc.com 1970-01-01 2018-09-01 06:00:00 Barnes & Noble 1 load 1.0 load 1970-01-01 00:00:00 +373 dana.com 1970-01-01 2018-09-01 06:00:00 Dana Holding 1 load 1.0 load 1970-01-01 00:00:00 +374 cbrands.com 1970-01-01 2018-09-01 06:00:00 Constellation Brands 1 load 1.0 load 1970-01-01 00:00:00 +375 lifepointhealth.net 1970-01-01 2018-09-01 06:00:00 LifePoint Health 1 load 1.0 load 1970-01-01 00:00:00 +376 pepsico.com 1970-01-01 2018-09-01 06:00:00 PepsiCo 1 load 1.0 load 1970-01-01 00:00:00 +377 zimmerbiomet.com 1970-01-01 2018-09-01 06:00:00 Zimmer Biomet Holdings 1 load 1.0 load 1970-01-01 00:00:00 +378 harley-davidson.com 1970-01-01 2018-09-01 06:00:00 Harley-Davidson 1 load 1.0 load 1970-01-01 00:00:00 +379 pultegroupinc.com 1970-01-01 2018-09-01 06:00:00 PulteGroup 1 load 1.0 load 1970-01-01 00:00:00 +380 newellbrands.com 1970-01-01 2018-09-01 06:00:00 Newell Brands 1 load 1.0 load 1970-01-01 00:00:00 +381 averydennison.com 1970-01-01 2018-09-01 06:00:00 Avery Dennison 1 load 1.0 load 1970-01-01 00:00:00 +382 jll.com 1970-01-01 2018-09-01 06:00:00 Jones Lang LaSalle 1 load 1.0 load 1970-01-01 00:00:00 +383 wecenergygroup.com 1970-01-01 2018-09-01 06:00:00 WEC Energy Group 1 load 1.0 load 1970-01-01 00:00:00 +384 marathonoil.com 1970-01-01 2018-09-01 06:00:00 Marathon Oil 1 load 1.0 load 1970-01-01 00:00:00 +385 ta-petrol.com 1970-01-01 2018-09-01 06:00:00 TravelCenters of America 1 load 1.0 load 1970-01-01 00:00:00 +386 unitedrentals.com 1970-01-01 2018-09-01 06:00:00 United Rentals 1 load 1.0 load 1970-01-01 00:00:00 +387 utc.com 1970-01-01 2018-09-01 06:00:00 United Technologies 1 load 1.0 load 1970-01-01 00:00:00 +388 hrggroup.com 1970-01-01 2018-09-01 06:00:00 HRG Group 1 load 1.0 load 1970-01-01 00:00:00 +389 oldrepublic.com 1970-01-01 2018-09-01 06:00:00 Old Republic International 1 load 1.0 load 1970-01-01 00:00:00 +390 windstream.com 1970-01-01 2018-09-01 06:00:00 Windstream Holdings 1 load 1.0 load 1970-01-01 00:00:00 +391 starwoodhotels.com 1970-01-01 2018-09-01 06:00:00 Starwood Hotels & Resorts 1 load 1.0 load 1970-01-01 00:00:00 +392 delekus.com 1970-01-01 2018-09-01 06:00:00 Delek US Holdings 1 load 1.0 load 1970-01-01 00:00:00 +393 packagingcorp.com 1970-01-01 2018-09-01 06:00:00 Packaging Corp. of America 1 load 1.0 load 1970-01-01 00:00:00 +394 quintiles.com 1970-01-01 2018-09-01 06:00:00 Quintiles IMS Holdings 1 load 1.0 load 1970-01-01 00:00:00 +395 hanes.com 1970-01-01 2018-09-01 06:00:00 Hanesbrands 1 load 1.0 load 1970-01-01 00:00:00 +396 realogy.com 1970-01-01 2018-09-01 06:00:00 Realogy Holdings 1 load 1.0 load 1970-01-01 00:00:00 +397 mattel.com 1970-01-01 2018-09-01 06:00:00 Mattel 1 load 1.0 load 1970-01-01 00:00:00 +398 aetna.com 1970-01-01 2018-09-01 06:00:00 Aetna 1 load 1.0 load 1970-01-01 00:00:00 +399 motorolasolutions.com 1970-01-01 2018-09-01 06:00:00 Motorola Solutions 1 load 1.0 load 1970-01-01 00:00:00 +400 jmsmucker.com 1970-01-01 2018-09-01 06:00:00 J.M. Smucker 1 load 1.0 load 1970-01-01 00:00:00 +401 regions.com 1970-01-01 2018-09-01 06:00:00 Regions Financial 1 load 1.0 load 1970-01-01 00:00:00 +402 celanese.com 1970-01-01 2018-09-01 06:00:00 Celanese 1 load 1.0 load 1970-01-01 00:00:00 +403 thecloroxcompany.com 1970-01-01 2018-09-01 06:00:00 Clorox 1 load 1.0 load 1970-01-01 00:00:00 +404 ingredion.com 1970-01-01 2018-09-01 06:00:00 Ingredion 1 load 1.0 load 1970-01-01 00:00:00 +405 genesishcc.com 1970-01-01 2018-09-01 06:00:00 Genesis Healthcare 1 load 1.0 load 1970-01-01 00:00:00 +406 peabodyenergy.com 1970-01-01 2018-09-01 06:00:00 Peabody Energy 1 load 1.0 load 1970-01-01 00:00:00 +407 alaskaair.com 1970-01-01 2018-09-01 06:00:00 Alaska Air Group 1 load 1.0 load 1970-01-01 00:00:00 +408 seaboardcorp.com 1970-01-01 2018-09-01 06:00:00 Seaboard 1 load 1.0 load 1970-01-01 00:00:00 +409 lowes.com 1970-01-01 2018-09-01 06:00:00 Lowes 1 load 1.0 load 1970-01-01 00:00:00 +410 frontier.com 1970-01-01 2018-09-01 06:00:00 Frontier Communications 1 load 1.0 load 1970-01-01 00:00:00 +411 amphenol.com 1970-01-01 2018-09-01 06:00:00 Amphenol 1 load 1.0 load 1970-01-01 00:00:00 +412 lansingtradegroup.com 1970-01-01 2018-09-01 06:00:00 Lansing Trade Group 1 load 1.0 load 1970-01-01 00:00:00 +413 sandisk.com 1970-01-01 2018-09-01 06:00:00 SanDisk 1 load 1.0 load 1970-01-01 00:00:00 +414 sjm.com 1970-01-01 2018-09-01 06:00:00 St. Jude Medical 1 load 1.0 load 1970-01-01 00:00:00 +415 wyndhamworldwide.com 1970-01-01 2018-09-01 06:00:00 Wyndham Worldwide 1 load 1.0 load 1970-01-01 00:00:00 +416 kellyservices.com 1970-01-01 2018-09-01 06:00:00 Kelly Services 1 load 1.0 load 1970-01-01 00:00:00 +417 westernunion.com 1970-01-01 2018-09-01 06:00:00 Western Union 1 load 1.0 load 1970-01-01 00:00:00 +418 evhc.net 1970-01-01 2018-09-01 06:00:00 Envision Healthcare Holdings 1 load 1.0 load 1970-01-01 00:00:00 +419 visteon.com 1970-01-01 2018-09-01 06:00:00 Visteon 1 load 1.0 load 1970-01-01 00:00:00 +420 ups.com 1970-01-01 2018-09-01 06:00:00 UPS 1 load 1.0 load 1970-01-01 00:00:00 +421 ajg.com 1970-01-01 2018-09-01 06:00:00 Arthur J. Gallagher 1 load 1.0 load 1970-01-01 00:00:00 +422 hosthotels.com 1970-01-01 2018-09-01 06:00:00 Host Hotels & Resorts 1 load 1.0 load 1970-01-01 00:00:00 +423 ashland.com 1970-01-01 2018-09-01 06:00:00 Ashland 1 load 1.0 load 1970-01-01 00:00:00 +424 insight.com 1970-01-01 2018-09-01 06:00:00 Insight Enterprises 1 load 1.0 load 1970-01-01 00:00:00 +425 energyfutureholdings.com 1970-01-01 2018-09-01 06:00:00 Energy Future Holdings 1 load 1.0 load 1970-01-01 00:00:00 +426 markelcorp.com 1970-01-01 2018-09-01 06:00:00 Markel 1 load 1.0 load 1970-01-01 00:00:00 +427 essendant.com 1970-01-01 2018-09-01 06:00:00 Essendant 1 load 1.0 load 1970-01-01 00:00:00 +428 ch2m.com 1970-01-01 2018-09-01 06:00:00 CH2M Hill 1 load 1.0 load 1970-01-01 00:00:00 +429 westernsouthern.com 1970-01-01 2018-09-01 06:00:00 Western & Southern Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +430 owenscorning.com 1970-01-01 2018-09-01 06:00:00 Owens Corning 1 load 1.0 load 1970-01-01 00:00:00 +431 aig.com 1970-01-01 2018-09-01 06:00:00 AIG 1 load 1.0 load 1970-01-01 00:00:00 +432 spglobal.com 1970-01-01 2018-09-01 06:00:00 S&P Global 1 load 1.0 load 1970-01-01 00:00:00 +433 raymondjames.com 1970-01-01 2018-09-01 06:00:00 Raymond James Financial 1 load 1.0 load 1970-01-01 00:00:00 +434 nisource.com 1970-01-01 2018-09-01 06:00:00 NiSource 1 load 1.0 load 1970-01-01 00:00:00 +435 airgas.com 1970-01-01 2018-09-01 06:00:00 Airgas 1 load 1.0 load 1970-01-01 00:00:00 +436 abm.com 1970-01-01 2018-09-01 06:00:00 ABM Industries 1 load 1.0 load 1970-01-01 00:00:00 +437 citizensbank.com 1970-01-01 2018-09-01 06:00:00 Citizens Financial Group 1 load 1.0 load 1970-01-01 00:00:00 +438 boozallen.com 1970-01-01 2018-09-01 06:00:00 Booz Allen Hamilton Holding 1 load 1.0 load 1970-01-01 00:00:00 +439 simon.com 1970-01-01 2018-09-01 06:00:00 Simon Property Group 1 load 1.0 load 1970-01-01 00:00:00 +440 domtar.com 1970-01-01 2018-09-01 06:00:00 Domtar 1 load 1.0 load 1970-01-01 00:00:00 +441 rockwellcollins.com 1970-01-01 2018-09-01 06:00:00 Rockwell Collins 1 load 1.0 load 1970-01-01 00:00:00 +442 prudential.com 1970-01-01 2018-09-01 06:00:00 Prudential Financial 1 load 1.0 load 1970-01-01 00:00:00 +443 lamresearch.com 1970-01-01 2018-09-01 06:00:00 Lam Research 1 load 1.0 load 1970-01-01 00:00:00 +444 fiserv.com 1970-01-01 2018-09-01 06:00:00 Fiserv 1 load 1.0 load 1970-01-01 00:00:00 +445 spectraenergy.com 1970-01-01 2018-09-01 06:00:00 Spectra Energy 1 load 1.0 load 1970-01-01 00:00:00 +446 navient.com 1970-01-01 2018-09-01 06:00:00 Navient 1 load 1.0 load 1970-01-01 00:00:00 +447 biglots.com 1970-01-01 2018-09-01 06:00:00 Big Lots 1 load 1.0 load 1970-01-01 00:00:00 +448 tdsinc.com 1970-01-01 2018-09-01 06:00:00 Telephone & Data Systems 1 load 1.0 load 1970-01-01 00:00:00 +449 firstam.com 1970-01-01 2018-09-01 06:00:00 First American Financial 1 load 1.0 load 1970-01-01 00:00:00 +451 cinfin.com 1970-01-01 2018-09-01 06:00:00 Cincinnati Financial 1 load 1.0 load 1970-01-01 00:00:00 +452 burlingtonstores.com 1970-01-01 2018-09-01 06:00:00 Burlington Stores 1 load 1.0 load 1970-01-01 00:00:00 +453 unitedhealthgroup.com 1970-01-01 2018-09-01 06:00:00 UnitedHealth Group 1 load 1.0 load 1970-01-01 00:00:00 +454 intel.com 1970-01-01 2018-09-01 06:00:00 Intel 1 load 1.0 load 1970-01-01 00:00:00 +455 humana.com 1970-01-01 2018-09-01 06:00:00 Humana 1 load 1.0 load 1970-01-01 00:00:00 +456 disney.com 1970-01-01 2018-09-01 06:00:00 Disney 1 load 1.0 load 1970-01-01 00:00:00 +457 cisco.com 1970-01-01 2018-09-01 06:00:00 Cisco Systems 1 load 1.0 load 1970-01-01 00:00:00 +458 pfizer.com 1970-01-01 2018-09-01 06:00:00 Pfizer 1 load 1.0 load 1970-01-01 00:00:00 +459 dow.com 1970-01-01 2018-09-01 06:00:00 Dow Chemical 1 load 1.0 load 1970-01-01 00:00:00 +460 sysco.com 1970-01-01 2018-09-01 06:00:00 Sysco 1 load 1.0 load 1970-01-01 00:00:00 +461 fedex.com 1970-01-01 2018-09-01 06:00:00 FedEx 1 load 1.0 load 1970-01-01 00:00:00 +462 caterpillar.com 1970-01-01 2018-09-01 06:00:00 Caterpillar 1 load 1.0 load 1970-01-01 00:00:00 +463 lockheedmartin.com 1970-01-01 2018-09-01 06:00:00 Lockheed Martin 1 load 1.0 load 1970-01-01 00:00:00 +464 cvshealth.com 1970-01-01 2018-09-01 06:00:00 CVS Health 1 load 1.0 load 1970-01-01 00:00:00 +465 newyorklife.com 1970-01-01 2018-09-01 06:00:00 New York Life Insurance 1 load 1.0 load 1970-01-01 00:00:00 +466 coca-colacompany.com 1970-01-01 2018-09-01 06:00:00 Coca-Cola 1 load 1.0 load 1970-01-01 00:00:00 +467 hcahealthcare.com 1970-01-01 2018-09-01 06:00:00 HCA Holdings 1 load 1.0 load 1970-01-01 00:00:00 +468 ingrammicro.com 1970-01-01 2018-09-01 06:00:00 Ingram Micro 1 load 1.0 load 1970-01-01 00:00:00 +469 energytransfer.com 1970-01-01 2018-09-01 06:00:00 Energy Transfer Equity 1 load 1.0 load 1970-01-01 00:00:00 +470 tysonfoods.com 1970-01-01 2018-09-01 06:00:00 Tyson Foods 1 load 1.0 load 1970-01-01 00:00:00 +471 aa.com 1970-01-01 2018-09-01 06:00:00 American Airlines Group 1 load 1.0 load 1970-01-01 00:00:00 +472 delta.com 1970-01-01 2018-09-01 06:00:00 Delta Air Lines 1 load 1.0 load 1970-01-01 00:00:00 +473 nationwide.com 1970-01-01 2018-09-01 06:00:00 Nationwide 1 load 1.0 load 1970-01-01 00:00:00 +474 johnsoncontrols.com 1970-01-01 2018-09-01 06:00:00 Johnson Controls 1 load 1.0 load 1970-01-01 00:00:00 +475 gm.com 1970-01-01 2018-09-01 06:00:00 General Motors 1 load 1.0 load 1970-01-01 00:00:00 +476 bestbuy.com 1970-01-01 2018-09-01 06:00:00 Best Buy 1 load 1.0 load 1970-01-01 00:00:00 +477 merck.com 1970-01-01 2018-09-01 06:00:00 Merck 1 load 1.0 load 1970-01-01 00:00:00 +478 libertymutual.com 1970-01-01 2018-09-01 06:00:00 Liberty Mutual Insurance Group 1 load 1.0 load 1970-01-01 00:00:00 +479 gs.com 1970-01-01 2018-09-01 06:00:00 Goldman Sachs Group 1 load 1.0 load 1970-01-01 00:00:00 +480 honeywell.com 1970-01-01 2018-09-01 06:00:00 Honeywell International 1 load 1.0 load 1970-01-01 00:00:00 +481 massmutual.com 1970-01-01 2018-09-01 06:00:00 Massachusetts Mutual Life Insurance 1 load 1.0 load 1970-01-01 00:00:00 +482 oracle.com 1970-01-01 2018-09-01 06:00:00 Oracle 1 load 1.0 load 1970-01-01 00:00:00 +483 morganstanley.com 1970-01-01 2018-09-01 06:00:00 Morgan Stanley 1 load 1.0 load 1970-01-01 00:00:00 +484 cigna.com 1970-01-01 2018-09-01 06:00:00 Cigna 1 load 1.0 load 1970-01-01 00:00:00 +485 unitedcontinentalholdings.com 1970-01-01 2018-09-01 06:00:00 United Continental Holdings 1 load 1.0 load 1970-01-01 00:00:00 +486 ford.com 1970-01-01 2018-09-01 06:00:00 Ford Motor 1 load 1.0 load 1970-01-01 00:00:00 +487 allstate.com 1970-01-01 2018-09-01 06:00:00 Allstate 1 load 1.0 load 1970-01-01 00:00:00 +488 tiaa.org 1970-01-01 2018-09-01 06:00:00 TIAA 1 load 1.0 load 1970-01-01 00:00:00 +489 intlfcstone.com 1970-01-01 2018-09-01 06:00:00 INTL FCStone 1 load 1.0 load 1970-01-01 00:00:00 +490 chsinc.com 1970-01-01 2018-09-01 06:00:00 CHS 1 load 1.0 load 1970-01-01 00:00:00 +491 americanexpress.com 1970-01-01 2018-09-01 06:00:00 American Express 1 load 1.0 load 1970-01-01 00:00:00 +492 gilead.com 1970-01-01 2018-09-01 06:00:00 Gilead Sciences 1 load 1.0 load 1970-01-01 00:00:00 +493 publix.com 1970-01-01 2018-09-01 06:00:00 Publix Super Markets 1 load 1.0 load 1970-01-01 00:00:00 +494 generaldynamics.com 1970-01-01 2018-09-01 06:00:00 General Dynamics 1 load 1.0 load 1970-01-01 00:00:00 +495 tjx.com 1970-01-01 2018-09-01 06:00:00 TJX 1 load 1.0 load 1970-01-01 00:00:00 +496 conocophillips.com 1970-01-01 2018-09-01 06:00:00 ConocoPhillips 1 load 1.0 load 1970-01-01 00:00:00 +497 att.com 1970-01-01 2018-09-01 06:00:00 AT&T 1 load 1.0 load 1970-01-01 00:00:00 +498 nike.com 1970-01-01 2018-09-01 06:00:00 Nike 1 load 1.0 load 1970-01-01 00:00:00 +499 wfscorp.com 1970-01-01 2018-09-01 06:00:00 World Fuel Services 1 load 1.0 load 1970-01-01 00:00:00 +500 3m.com 1970-01-01 2018-09-01 06:00:00 3M 1 load 1.0 load 1970-01-01 00:00:00 +501 mondelezinternational.com 1970-01-01 2018-09-01 06:00:00 Mondelez International 1 load 1.0 load 1970-01-01 00:00:00 +502 exeloncorp.com 1970-01-01 2018-09-01 06:00:00 Exelon 1 load 1.0 load 1970-01-01 00:00:00 +503 21cf.com 1970-01-01 2018-09-01 06:00:00 Twenty-First Century Fox 1 load 1.0 load 1970-01-01 00:00:00 +504 johndeere.com 1970-01-01 2018-09-01 06:00:00 Deere 1 load 1.0 load 1970-01-01 00:00:00 +505 tsocorp.com 1970-01-01 2018-09-01 06:00:00 Tesoro 1 load 1.0 load 1970-01-01 00:00:00 +506 timewarner.com 1970-01-01 2018-09-01 06:00:00 Time Warner 1 load 1.0 load 1970-01-01 00:00:00 +507 redhat.com 1970-01-01 2018-09-01 06:00:00 Red Hat 1 load 1.0 load 1970-01-01 00:00:00 +509 openwrt.org 1970-01-01 2018-09-01 06:00:00 OpenWRT 1 load 1.0 load 1970-01-01 00:00:00 +510 panasonic.com 1970-01-01 2018-09-01 06:00:00 Panasonic 1 load 1.0 load 1970-01-01 00:00:00 +511 comcast.net 1970-01-01 2018-09-01 06:00:00 Comcast 1 load 1.0 load 1970-01-01 00:00:00 +512 linux.org 1970-01-01 2018-09-01 06:00:00 Linux 1 load 1.0 load 1970-01-01 00:00:00 +514 northwesternmutual.com 1970-01-01 2018-09-01 06:00:00 Northwestern Mutual 1 load 1.0 load 1970-01-01 00:00:00 +515 kde.org 1970-01-01 2018-09-01 06:00:00 KDE 1 load 1.0 load 1970-01-01 00:00:00 +516 twitter.com 1970-01-01 2018-09-01 06:00:00 Twitter 1 load 1.0 load 1970-01-01 00:00:00 +517 adobe.com 1970-01-01 2018-09-01 06:00:00 Adobe 1 load 1.0 load 1970-01-01 00:00:00 +519 acm.org 1970-01-01 2018-09-12 02:01:59 ACM 1 load 1.0 load 1970-01-01 00:00:00 +520 outdoors@acm.org 1970-01-01 2018-09-12 02:32:53 University of Missouri 1 load 1.0 load 2013-07-15 00:00:00 +521 freebsd.org 1970-01-01 2018-09-13 21:15:22 Free BSD 1 load 1.0 load 1970-01-01 00:00:00 +\. + + +-- +-- Data for Name: contributor_repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributor_repo (cntrb_repo_id, repo_git, repo_name, gh_repo_id, cntrb_category, event_id, created_at, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: contributors; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributors (cntrb_login, cntrb_email, cntrb_full_name, cntrb_company, cntrb_created_at, cntrb_type, cntrb_fake, cntrb_deleted, cntrb_long, cntrb_lat, cntrb_country_code, cntrb_state, cntrb_city, cntrb_location, cntrb_canonical, cntrb_last_used, gh_user_id, gh_login, gh_url, gh_html_url, gh_node_id, gh_avatar_url, gh_gravatar_id, gh_followers_url, gh_following_url, gh_gists_url, gh_starred_url, gh_subscriptions_url, gh_organizations_url, gh_repos_url, gh_events_url, gh_received_events_url, gh_type, gh_site_admin, gl_web_url, gl_avatar_url, gl_state, gl_username, gl_full_name, gl_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +not-provided \N \N \N 2019-06-13 11:33:39 \N 0 0 \N \N \N \N \N \N \N \N 1 nobody http://fake.me http://fake.me x http://fake.me \N http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me http://fake.me \N \N \N \N \N \N \N \N \N \N \N \N 2019-06-13 16:35:25 00000000-0000-0000-0000-000000000000 +nan kannayoshihiro@gmail.com KANNA Yoshihiro UTMC 2009-04-17 12:43:58 \N 0 0 \N \N \N \N \N \N kannayoshihiro@gmail.com 2021-01-28 21:56:10-06 74832 nan https://api.github.com/users/nan https://github.com/nan MDQ6VXNlcjc0ODMy https://avatars.githubusercontent.com/u/74832?v=4 https://api.github.com/users/nan/followers https://api.github.com/users/nan/following{/other_user} https://api.github.com/users/nan/gists{/gist_id} https://api.github.com/users/nan/starred{/owner}{/repo} https://api.github.com/users/nan/subscriptions https://api.github.com/users/nan/orgs https://api.github.com/users/nan/repos https://api.github.com/users/nan/events{/privacy} https://api.github.com/users/nan/received_events User false \N \N \N \N \N \N GitHub API Worker 1.0.0 GitHub API 2021-10-28 15:23:46 01000000-0000-0000-0000-000000000000 +\. + + +-- +-- Data for Name: contributors_aliases; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.contributors_aliases (cntrb_alias_id, canonical_email, alias_email, cntrb_active, cntrb_last_modified, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: discourse_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.discourse_insights (msg_discourse_id, msg_id, discourse_act, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_annual; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_annual (repo_id, email, affiliation, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_annual; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_annual (repo_group_id, email, affiliation, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_monthly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_monthly (repo_group_id, email, affiliation, month, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_group_weekly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_group_weekly (repo_group_id, email, affiliation, week, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_monthly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_monthly (repo_id, email, affiliation, month, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: dm_repo_weekly; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.dm_repo_weekly (repo_id, email, affiliation, week, year, added, removed, whitespace, files, patches, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: exclude; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.exclude (id, projects_id, email, domain) FROM stdin; +\. + + +-- +-- Data for Name: issue_assignees; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_assignees (issue_assignee_id, issue_id, repo_id, issue_assignee_src_id, issue_assignee_src_node, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: issue_events; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_events (event_id, issue_id, repo_id, action, action_commit_hash, created_at, node_id, node_url, platform_id, issue_event_src_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: issue_labels; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_labels (issue_label_id, issue_id, repo_id, label_text, label_description, label_color, label_src_id, label_src_node_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: issue_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issue_message_ref (issue_msg_ref_id, issue_id, repo_id, msg_id, issue_msg_ref_src_node_id, issue_msg_ref_src_comment_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: issues; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.issues (issue_id, repo_id, pull_request, pull_request_id, created_at, issue_title, issue_body, comment_count, updated_at, closed_at, due_on, repository_url, issue_url, labels_url, comments_url, events_url, html_url, issue_state, issue_node_id, gh_issue_number, gh_issue_id, gh_user_id, tool_source, tool_version, data_source, data_collection_date, reporter_id, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: libraries; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.libraries (library_id, repo_id, platform, name, created_timestamp, updated_timestamp, library_description, keywords, library_homepage, license, version_count, latest_release_timestamp, latest_release_number, package_manager_id, dependency_count, dependent_library_count, primary_language, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: library_dependencies; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.library_dependencies (lib_dependency_id, library_id, manifest_platform, manifest_filepath, manifest_kind, repo_id_branch, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: library_version; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.library_version (library_version_id, library_id, library_platform, version_number, version_release_date, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: lstm_anomaly_models; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.lstm_anomaly_models (model_id, model_name, model_description, look_back_days, training_days, batch_size, metric, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: lstm_anomaly_results; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.lstm_anomaly_results (result_id, repo_id, repo_category, model_id, metric, contamination_factor, mean_absolute_error, remarks, metric_field, mean_absolute_actual_value, mean_absolute_prediction_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message (msg_id, rgls_id, platform_msg_id, platform_node_id, repo_id, msg_text, msg_timestamp, msg_sender_email, msg_header, pltfrm_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: message_analysis; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_analysis (msg_analysis_id, msg_id, worker_run_id, sentiment_score, reconstruction_error, novelty_flag, feedback_flag, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_analysis_summary; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_analysis_summary (msg_summary_id, repo_id, worker_run_id, positive_ratio, negative_ratio, novel_count, period, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_sentiment; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_sentiment (msg_analysis_id, msg_id, worker_run_id, sentiment_score, reconstruction_error, novelty_flag, feedback_flag, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: message_sentiment_summary; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.message_sentiment_summary (msg_summary_id, repo_id, worker_run_id, positive_ratio, negative_ratio, novel_count, period, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: platform; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.platform (pltfrm_id, pltfrm_name, pltfrm_version, pltfrm_release_date, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 GitHub 3 2019-06-05 Manual Entry Sean Goggins GitHub 2019-06-05 17:23:42 +0 Unresolved 0 2019-06-05 Manual Entry Sean Goggins GitHub 2022-07-28 20:43:00 +2 GitLab 2 2019-06-05 Manual Entry Sean Goggins GitHub 2022-07-28 20:43:00 +\. + + +-- +-- Data for Name: pull_request_analysis; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_analysis (pull_request_analysis_id, pull_request_id, merge_probability, mechanism, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_assignees; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_assignees (pr_assignee_map_id, pull_request_id, repo_id, pr_assignee_src_id, tool_source, tool_version, data_source, data_collection_date, contrib_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_commits (pr_cmt_id, pull_request_id, repo_id, pr_cmt_sha, pr_cmt_node_id, pr_cmt_message, pr_cmt_comments_url, pr_cmt_timestamp, pr_cmt_author_email, tool_source, tool_version, data_source, data_collection_date, pr_cmt_author_cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_events; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_events (pr_event_id, pull_request_id, repo_id, action, action_commit_hash, created_at, issue_event_src_id, node_id, node_url, platform_id, pr_platform_event_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_files; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_files (pr_file_id, pull_request_id, repo_id, pr_file_additions, pr_file_deletions, pr_file_path, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_labels; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_labels (pr_label_id, pull_request_id, repo_id, pr_src_id, pr_src_node_id, pr_src_url, pr_src_description, pr_src_color, pr_src_default_bool, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_message_ref (pr_msg_ref_id, pull_request_id, repo_id, msg_id, pr_message_ref_src_comment_id, pr_message_ref_src_node_id, pr_issue_url, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_meta; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_meta (pr_repo_meta_id, pull_request_id, repo_id, pr_head_or_base, pr_src_meta_label, pr_src_meta_ref, pr_sha, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_repo (pr_repo_id, pr_repo_meta_id, pr_repo_head_or_base, pr_src_repo_id, pr_src_node_id, pr_repo_name, pr_repo_full_name, pr_repo_private_bool, tool_source, tool_version, data_source, data_collection_date, pr_cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_review_message_ref; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_review_message_ref (pr_review_msg_ref_id, pr_review_id, repo_id, msg_id, pr_review_msg_url, pr_review_src_id, pr_review_msg_src_id, pr_review_msg_node_id, pr_review_msg_diff_hunk, pr_review_msg_path, pr_review_msg_position, pr_review_msg_original_position, pr_review_msg_commit_id, pr_review_msg_original_commit_id, pr_review_msg_updated_at, pr_review_msg_html_url, pr_url, pr_review_msg_author_association, pr_review_msg_start_line, pr_review_msg_original_start_line, pr_review_msg_start_side, pr_review_msg_line, pr_review_msg_original_line, pr_review_msg_side, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_reviewers; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_reviewers (pr_reviewer_map_id, pull_request_id, pr_source_id, repo_id, pr_reviewer_src_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_reviews; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_reviews (pr_review_id, pull_request_id, repo_id, pr_review_author_association, pr_review_state, pr_review_body, pr_review_submitted_at, pr_review_src_id, pr_review_node_id, pr_review_html_url, pr_review_pull_request_url, pr_review_commit_id, platform_id, tool_source, tool_version, data_source, data_collection_date, cntrb_id) FROM stdin; +\. + + +-- +-- Data for Name: pull_request_teams; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_request_teams (pr_team_id, pull_request_id, pr_src_team_id, pr_src_team_node, pr_src_team_url, pr_team_name, pr_team_slug, pr_team_description, pr_team_privacy, pr_team_permission, pr_team_src_members_url, pr_team_src_repositories_url, pr_team_parent_id, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: pull_requests; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.pull_requests (pull_request_id, repo_id, pr_url, pr_src_id, pr_src_node_id, pr_html_url, pr_diff_url, pr_patch_url, pr_issue_url, pr_augur_issue_id, pr_src_number, pr_src_state, pr_src_locked, pr_src_title, pr_body, pr_created_at, pr_updated_at, pr_closed_at, pr_merged_at, pr_merge_commit_sha, pr_teams, pr_milestone, pr_commits_url, pr_review_comments_url, pr_review_comment_url, pr_comments_url, pr_statuses_url, pr_meta_head_id, pr_meta_base_id, pr_src_issue_url, pr_src_comments_url, pr_src_review_comments_url, pr_src_commits_url, pr_src_statuses_url, pr_src_author_association, tool_source, tool_version, data_source, data_collection_date, pr_augur_contributor_id) FROM stdin; +\. + + +-- +-- Data for Name: releases; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.releases (release_id, repo_id, release_name, release_description, release_author, release_created_at, release_published_at, release_updated_at, release_is_draft, release_is_prerelease, release_tag_name, release_url, tag_only, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo (repo_id, repo_group_id, repo_git, repo_path, repo_name, repo_added, repo_status, repo_type, url, owner_id, description, primary_language, created_at, forked_from, updated_at, repo_archived_date_collected, repo_archived, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +25452 10 https://github.com/chaoss/whitepaper \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +24441 10 https://github.com/operate-first/operate-first-twitter \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +24442 10 https://github.com/operate-first/blueprint \N \N 2021-08-25 16:47:47 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-08-25 16:47:47 +25445 10 https://github.com/chaoss/grimoirelab-perceval-opnfv \N \N 2020-04-17 21:40:39 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:39 +1 1 https://github.com/chaoss/augur \N \N 2021-08-10 14:28:44 New \N \N \N \N \N Parent not available \N \N 0 data load one git 2021-06-05 18:41:14 +25430 10 https://github.com/SociallyCompute/update-test \N \N 2021-10-07 08:50:13 New \N \N \N \N \N Parent not available \N \N 0 \N \N \N \N +25450 10 https://github.com/chaoss/grimoirelab-hatstall \N \N 2021-04-17 21:40:42 New \N \N \N \N \N Parent not available \N \N 0 CLI 1.0 Git 2021-04-17 21:40:42 +\. + + +-- +-- Data for Name: repo_badging; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_badging (badge_collection_id, repo_id, created_at, tool_source, tool_version, data_source, data_collection_date, data) FROM stdin; +\. + + +-- +-- Data for Name: repo_cluster_messages; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_cluster_messages (msg_cluster_id, repo_id, cluster_content, cluster_mechanism, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_dependencies; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_dependencies (repo_dependencies_id, repo_id, dep_name, dep_count, dep_language, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_deps_libyear; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_deps_libyear (repo_deps_libyear_id, repo_id, name, requirement, type, package_manager, current_verion, latest_version, current_release_date, latest_release_date, libyear, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_deps_scorecard; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_deps_scorecard (repo_deps_scorecard_id, repo_id, name, status, score, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_group_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_group_insights (rgi_id, repo_group_id, rgi_metric, rgi_value, cms_id, rgi_fresh, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_groups; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_groups (repo_group_id, rg_name, rg_description, rg_website, rg_recache, rg_last_modified, rg_type, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +1 Default Repo Group The default repo group created by the schema generation script 0 2019-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +10 Default Repo Group The default repo group created by the schema generation script 0 2021-06-03 15:55:20 GitHub Organization load one git 2019-06-05 13:36:25 +\. + + +-- +-- Data for Name: repo_groups_list_serve; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_groups_list_serve (rgls_id, repo_group_id, rgls_name, rgls_description, rgls_sponsor, rgls_email, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_info; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_info (repo_info_id, repo_id, last_updated, issues_enabled, open_issues, pull_requests_enabled, wiki_enabled, pages_enabled, fork_count, default_branch, watchers_count, "UUID", license, stars_count, committers_count, issue_contributors_count, changelog_file, contributing_file, license_file, code_of_conduct_file, security_issue_file, security_audit_file, status, keywords, commit_count, issues_count, issues_closed, pull_request_count, pull_requests_open, pull_requests_closed, pull_requests_merged, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_insights; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_insights (ri_id, repo_id, ri_metric, ri_value, ri_date, ri_fresh, tool_source, tool_version, data_source, data_collection_date, ri_score, ri_field, ri_detection_method) FROM stdin; +\. + + +-- +-- Data for Name: repo_insights_records; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_insights_records (ri_id, repo_id, ri_metric, ri_field, ri_value, ri_date, ri_score, ri_detection_method, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_labor; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_labor (repo_labor_id, repo_id, repo_clone_date, rl_analysis_date, programming_language, file_path, file_name, total_lines, code_lines, comment_lines, blank_lines, code_complexity, repo_url, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_meta; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_meta (repo_id, rmeta_id, rmeta_name, rmeta_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_sbom_scans; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_sbom_scans (rsb_id, repo_id, sbom_scan) FROM stdin; +\. + + +-- +-- Data for Name: repo_stats; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_stats (repo_id, rstat_id, rstat_name, rstat_value, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_test_coverage; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_test_coverage (repo_id, repo_clone_date, rtc_analysis_date, programming_language, file_path, file_name, testing_tool, file_statement_count, file_subroutine_count, file_statements_tested, file_subroutines_tested, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repo_topic; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repo_topic (repo_topic_id, repo_id, topic_id, topic_prob, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: repos_fetch_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.repos_fetch_log (repos_id, status, date) FROM stdin; +\. + + +-- +-- Data for Name: settings; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.settings (id, setting, value, last_modified) FROM stdin; +5 report_date committer 2019-05-07 12:47:26 +6 report_attribution author 2019-05-07 12:47:26 +10 google_analytics disabled 2019-05-07 12:47:26 +11 update_frequency 24 2019-05-07 12:47:26 +12 database_version 7 2019-05-07 12:47:26 +13 results_visibility show 2019-05-07 12:47:26 +1 start_date 2001-01-01 1900-01-22 20:34:51 +4 log_level Debug 2019-05-07 12:47:26 +2 repo_directory /augur/repos/ 2019-05-07 12:47:26 +8 affiliations_processed 2001-08-26 10:03:29.815013+00 1900-01-22 20:36:27 +9 aliases_processed 2001-08-26 10:03:29.815013+00 1900-01-22 20:36:27 +7 working_author done 1900-01-22 20:23:43 +3 utility_status Idle 1900-01-22 20:38:07 +\. + + +-- +-- Data for Name: topic_words; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.topic_words (topic_words_id, topic_id, word, word_prob, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: unknown_cache; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.unknown_cache (type, repo_group_id, email, domain, added, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: unresolved_commit_emails; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.unresolved_commit_emails (email_unresolved_id, email, name, tool_source, tool_version, data_source, data_collection_date) FROM stdin; +\. + + +-- +-- Data for Name: utility_log; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.utility_log (id, level, status, attempted) FROM stdin; +\. + + +-- +-- Data for Name: working_commits; Type: TABLE DATA; Schema: augur_data; Owner: augur +-- + +COPY augur_data.working_commits (repos_id, working_commit) FROM stdin; +\. + + +-- +-- Data for Name: all; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations."all" ("Name", "Bytes", "Lines", "Code", "Comment", "Blank", "Complexity", "Count", "WeightedComplexity", "Files") FROM stdin; +\. + + +-- +-- Data for Name: augur_settings; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.augur_settings (id, setting, value, last_modified) FROM stdin; +1 augur_data_version 100 2021-10-12 08:41:51 +\. + + +-- +-- Data for Name: config; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.config (id, section_name, setting_name, value, type) FROM stdin; +1 Augur developer 0 int +2 Augur version 1 int +5 Facade check_updates 1 int +6 Facade clone_repos 1 int +7 Facade create_xlsx_summary_files 1 int +8 Facade delete_marked_repos 0 int +9 Facade fix_affiliations 1 int +10 Facade force_analysis 1 int +11 Facade force_invalidate_caches 1 int +12 Facade force_updates 1 int +13 Facade limited_run 0 int +14 Facade multithreaded 1 int +15 Facade nuke_stored_affiliations 0 int +16 Facade pull_repos 1 int +17 Facade rebuild_caches 1 int +18 Facade run_analysis 1 int +20 Server cache_expire 3600 str +21 Server host 0.0.0.0 str +22 Server port 5000 int +23 Server workers 6 int +24 Server timeout 6000 int +25 Server ssl false bool +26 Server ssl_cert_file \N \N +27 Server ssl_key_file \N \N +29 Logging log_level INFO str +30 Logging verbose 0 int +31 Logging quiet 0 int +32 Logging debug 0 int +33 Celery concurrency 12 int +34 Redis cache_group 0 int +35 Redis connection_string redis://localhost:6379/ str +19 Facade repo_directory /facade str +28 Logging logs_directory /logs str +3 Keys github_api_key 0 str +4 Keys gitlab_api_key 0 str +\. + + +-- +-- Data for Name: repos_fetch_log; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.repos_fetch_log (repos_id, status, date) FROM stdin; +\. + + +-- +-- Data for Name: users; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.users (user_id, login_name, login_hashword, email, text_phone, first_name, last_name, tool_source, tool_version, data_source, data_collection_date, admin) FROM stdin; +\. + + +-- +-- Data for Name: worker_history; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_history (history_id, repo_id, worker, job_model, oauth_id, "timestamp", status, total_results) FROM stdin; +1 1 workers.repo_info_worker.50723 repo_info 0 2021-10-17 12:05:22 Success 1 +2 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:34:30 Success 0 +3 1 workers.github_worker.9396 repo_info 0 2021-12-20 10:34:32 Stopped 0 +4 1 workers.github_worker.9396 issues 0 2021-12-20 10:34:50 Error 0 +5 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:34:33 Success 1 +6 1 workers.insight_worker.9082 insights 0 2021-12-20 10:34:32 Success 0 +7 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:34:32 Success 1 +8 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:36:31 Success 0 +9 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:36:33 Success 0 +10 24441 workers.github_worker.9396 issues 0 2021-12-20 10:36:34 Error 0 +11 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:36:34 Success 1 +12 24441 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:36:33 Success 0 +13 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:36:33 Stopped 0 +14 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:38:32 Success 0 +15 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:39:00 Success 0 +16 24442 workers.github_worker.9396 issues 0 2021-12-20 10:38:35 Error 0 +17 24442 workers.insight_worker.9082 insights 0 2021-12-20 10:38:33 Success 0 +18 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:38:34 Success 1 +19 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:39:00 Stopped 0 +20 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:40:32 Success 0 +21 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:40:33 Success 0 +22 25430 workers.insight_worker.9082 insights 0 2021-12-20 10:40:34 Success 0 +23 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:40:34 Success 0 +24 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:40:34 Stopped 0 +25 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:40:35 Success 1 +26 25430 workers.insight_worker.9082 insights 0 2021-12-20 10:50:56 Success 0 +27 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:51:26 Success 0 +28 1 workers.github_worker.9396 issues 0 2021-12-20 10:51:14 Error 0 +29 1 workers.release_worker.9488 releases 0 2021-12-20 10:51:01 Success 1 +30 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:50:56 Success 0 +31 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:51:26 Success 0 +32 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:51:26 Stopped 0 +33 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:52:57 Success 0 +34 1 workers.insight_worker.9082 insights 0 2021-12-20 10:52:56 Success 0 +35 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:52:58 Success 1 +36 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:52:57 Success 1 +37 24441 workers.release_worker.9488 repo_info 0 2021-12-20 10:52:56 Stopped 0 +38 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:52:57 Success 0 +39 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:52:57 Stopped 0 +40 24441 workers.insight_worker.9082 insights 0 2021-12-20 10:54:59 Success 2 +41 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:54:57 Success 0 +42 24442 workers.github_worker.9396 issues 0 2021-12-20 10:54:58 Error 0 +43 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:54:58 Success 1 +44 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:54:57 Success 0 +45 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:54:57 Stopped 0 +46 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 10:56:56 Success 0 +47 24442 workers.insight_worker.9082 insights 0 2021-12-20 10:56:57 Success 0 +48 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 10:56:56 Success 0 +49 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 10:56:56 Stopped 0 +50 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 10:56:58 Success 1 +51 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 10:56:58 Success 0 +52 24442 workers.insight_worker.9082 insights 0 2021-12-20 11:37:29 Success 0 +53 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:37:28 Success 1 +54 1 workers.github_worker.9396 issues 0 2021-12-20 11:38:35 Error 0 +55 1 workers.release_worker.9488 releases 0 2021-12-20 11:37:32 Success 1 +56 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:37:27 Success 0 +57 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:37:27 Stopped 0 +58 1 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:38:25 Success 0 +59 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:39:29 Success 1 +60 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:39:28 Success 0 +61 24441 workers.github_worker.9396 issues 0 2021-12-20 11:39:49 Success 0 +62 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:39:27 Success 0 +63 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:39:27 Stopped 0 +64 24441 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:39:47 Success 0 +65 25430 workers.insight_worker.9082 insights 0 2021-12-20 11:39:29 Success 0 +66 1 workers.insight_worker.9082 insights 0 2021-12-20 11:41:32 Success 1 +67 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:41:28 Success 1 +68 24442 workers.github_worker.9396 issues 0 2021-12-20 11:42:22 Success 0 +69 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:41:30 Success 1 +70 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:41:28 Stopped 0 +71 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:42:05 Success 0 +72 24441 workers.insight_worker.9082 insights 0 2021-12-20 11:43:33 Success 1 +73 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:43:29 Success 1 +74 25430 workers.github_worker.9396 issues 0 2021-12-20 11:43:31 Success 0 +75 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:43:49 Success 0 +76 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:43:49 Stopped 0 +77 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 11:44:10 Success 0 +78 24441 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:52:46 Success 0 +79 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:52:31 Success 1 +80 24441 workers.github_worker.9396 repo_info 0 2021-12-20 12:05:59 Stopped 0 +81 24442 workers.github_worker.9396 repo_info 0 2021-12-20 12:06:20 Stopped 0 +82 25430 workers.github_worker.9396 repo_info 0 2021-12-20 12:07:08 Stopped 0 +83 25430 workers.github_worker.9396 issues 0 2021-12-20 12:07:11 Success 0 +84 24441 workers.pull_request_worker.9145 repo_info 0 2021-12-20 11:53:12 Stopped 0 +85 24442 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 11:54:45 Success 0 +86 24442 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:54:28 Success 1 +87 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:54:28 Success 0 +88 24441 workers.release_worker.9488 repo_info 0 2021-12-20 11:54:28 Stopped 0 +89 24442 workers.insight_worker.9082 insights 0 2021-12-20 11:54:31 Success 0 +90 24442 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 12:16:33 Success 0 +91 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:56:31 Success 0 +92 25430 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:56:32 Success 1 +93 25430 workers.insight_worker.9082 insights 0 2021-12-20 11:56:34 Success 0 +94 1 workers.linux_badge_worker.9447 badges 0 2021-12-20 11:58:31 Success 1 +95 1 workers.repo_info_worker.9176 repo_info 0 2021-12-20 11:58:33 Success 1 +96 1 workers.insight_worker.9082 insights 0 2021-12-20 11:58:34 Success 0 +97 24442 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:16:33 Stopped 0 +98 25430 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 12:17:02 Success 0 +99 25430 workers.pull_request_worker.9145 pull_requests 0 2021-12-20 12:17:06 Success 0 +100 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:17:07 Stopped 0 +101 1 workers.pull_request_worker.9145 pull_request_files 0 2021-12-20 12:17:08 Success 0 +102 1 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:17:08 Stopped 0 +103 1 workers.insight_worker.9082 insights 0 2021-12-20 12:43:41 Success 0 +104 25430 workers.pull_request_worker.9145 repo_info 0 2021-12-20 12:43:38 Stopped 0 +105 24441 workers.github_worker.9396 repo_info 14 2021-12-20 12:55:23 Stopped 0 +106 24442 workers.github_worker.9396 repo_info 14 2021-12-20 12:55:44 Stopped 0 +107 25430 workers.github_worker.9396 repo_info 14 2021-12-20 12:56:32 Stopped 0 +108 1 workers.pull_request_worker.9145 pull_requests 1017 2021-12-20 12:58:53 Success 0 +109 24441 workers.insight_worker.9082 insights 0 2021-12-20 12:45:43 Success 1 +110 24441 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:45:39 Success 0 +111 24441 workers.release_worker.9488 repo_info 0 2021-12-20 12:45:38 Stopped 0 +112 24441 workers.repo_info_worker.9176 repo_info 0 2021-12-20 12:45:41 Success 1 +113 24442 workers.insight_worker.9082 insights 0 2021-12-20 12:47:41 Success 0 +114 24442 workers.repo_info_worker.9176 repo_info 1022 2021-12-20 12:47:48 Success 1 +115 24442 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:47:40 Success 0 +116 25430 workers.insight_worker.9082 insights 0 2021-12-20 12:49:41 Success 0 +117 25430 workers.repo_info_worker.9176 repo_info 14 2021-12-20 12:49:48 Success 1 +118 25430 workers.linux_badge_worker.9447 badges 0 2021-12-20 12:49:40 Success 0 +119 1 workers.pull_request_worker.9145 pull_request_files 1017 2021-12-20 13:09:07 Success 0 +120 1 workers.pull_request_worker.9145 repo_info 1017 2021-12-20 13:09:07 Stopped 0 +\. + + +-- +-- Data for Name: worker_job; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_job (job_model, state, zombie_head, since_id_str, description, last_count, last_run, analysis_state, oauth_id) FROM stdin; +\. + + +-- +-- Data for Name: worker_oauth; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_oauth (oauth_id, name, consumer_key, consumer_secret, access_token, access_token_secret, repo_directory, platform) FROM stdin; +\. + + +-- +-- Data for Name: worker_settings_facade; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.worker_settings_facade (id, setting, value, last_modified) FROM stdin; +\. + + +-- +-- Data for Name: working_commits; Type: TABLE DATA; Schema: augur_operations; Owner: augur +-- + +COPY augur_operations.working_commits (repos_id, working_commit) FROM stdin; +\. + + +-- +-- Data for Name: alembic_version; Type: TABLE DATA; Schema: public; Owner: augur +-- + +COPY public.alembic_version (version_num) FROM stdin; +11 +\. + + +-- +-- Data for Name: annotation_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.annotation_types (annotation_type_id, name) FROM stdin; +1 REVIEW +2 OTHER +\. + + +-- +-- Data for Name: annotations; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.annotations (annotation_id, document_id, annotation_type_id, identifier_id, creator_id, created_ts, comment) FROM stdin; +\. + + +-- +-- Data for Name: augur_repo_map; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.augur_repo_map (map_id, dosocs_pkg_id, dosocs_pkg_name, repo_id, repo_path) FROM stdin; +\. + + +-- +-- Data for Name: creator_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.creator_types (creator_type_id, name) FROM stdin; +1 Person +2 Organization +3 Tool +\. + + +-- +-- Data for Name: creators; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.creators (creator_id, creator_type_id, name, email) FROM stdin; +1 3 dosocs2-0.16.1 +\. + + +-- +-- Data for Name: document_namespaces; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.document_namespaces (document_namespace_id, uri) FROM stdin; +\. + + +-- +-- Data for Name: documents; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.documents (document_id, document_namespace_id, data_license_id, spdx_version, name, license_list_version, created_ts, creator_comment, document_comment, package_id) FROM stdin; +\. + + +-- +-- Data for Name: documents_creators; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.documents_creators (document_creator_id, document_id, creator_id) FROM stdin; +\. + + +-- +-- Data for Name: external_refs; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.external_refs (external_ref_id, document_id, document_namespace_id, id_string, sha256) FROM stdin; +\. + + +-- +-- Data for Name: file_contributors; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.file_contributors (file_contributor_id, file_id, contributor) FROM stdin; +\. + + +-- +-- Data for Name: file_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.file_types (file_type_id, name) FROM stdin; +4 APPLICATION +3 ARCHIVE +5 AUDIO +2 BINARY +9 DOCUMENTATION +6 IMAGE +11 OTHER +1 SOURCE +10 SPDX +7 TEXT +8 VIDEO +\. + + +-- +-- Data for Name: files; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files (file_id, file_type_id, sha256, copyright_text, package_id, comment, notice) FROM stdin; +\. + + +-- +-- Data for Name: files_licenses; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files_licenses (file_license_id, file_id, license_id, extracted_text) FROM stdin; +\. + + +-- +-- Data for Name: files_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.files_scans (file_scan_id, file_id, scanner_id) FROM stdin; +\. + + +-- +-- Data for Name: identifiers; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.identifiers (identifier_id, document_namespace_id, id_string, document_id, package_id, package_file_id) FROM stdin; +\. + + +-- +-- Data for Name: licenses; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.licenses (license_id, name, short_name, cross_reference, comment, is_spdx_official) FROM stdin; +1 3dfx Glide License Glide http://spdx.org/licenses/Glide.html t +2 Abstyles License Abstyles http://spdx.org/licenses/Abstyles.html t +3 Academic Free License v1.1 AFL-1.1 http://spdx.org/licenses/AFL-1.1.html t +4 Academic Free License v1.2 AFL-1.2 http://spdx.org/licenses/AFL-1.2.html t +5 Academic Free License v2.0 AFL-2.0 http://spdx.org/licenses/AFL-2.0.html t +6 Academic Free License v2.1 AFL-2.1 http://spdx.org/licenses/AFL-2.1.html t +7 Academic Free License v3.0 AFL-3.0 http://spdx.org/licenses/AFL-3.0.html t +8 Academy of Motion Picture Arts and Sciences BSD AMPAS http://spdx.org/licenses/AMPAS.html t +9 Adaptive Public License 1.0 APL-1.0 http://spdx.org/licenses/APL-1.0.html t +10 Adobe Glyph List License Adobe-Glyph http://spdx.org/licenses/Adobe-Glyph.html t +11 Adobe Postscript AFM License APAFML http://spdx.org/licenses/APAFML.html t +12 Adobe Systems Incorporated Source Code License Agreement Adobe-2006 http://spdx.org/licenses/Adobe-2006.html t +13 Affero General Public License v1.0 AGPL-1.0 http://spdx.org/licenses/AGPL-1.0.html t +14 Afmparse License Afmparse http://spdx.org/licenses/Afmparse.html t +15 Aladdin Free Public License Aladdin http://spdx.org/licenses/Aladdin.html t +16 Amazon Digital Services License ADSL http://spdx.org/licenses/ADSL.html t +17 AMD's plpa_map.c License AMDPLPA http://spdx.org/licenses/AMDPLPA.html t +18 ANTLR Software Rights Notice ANTLR-PD http://spdx.org/licenses/ANTLR-PD.html t +19 Apache License 1.0 Apache-1.0 http://spdx.org/licenses/Apache-1.0.html t +20 Apache License 1.1 Apache-1.1 http://spdx.org/licenses/Apache-1.1.html t +21 Apache License 2.0 Apache-2.0 http://spdx.org/licenses/Apache-2.0.html t +22 Apple MIT License AML http://spdx.org/licenses/AML.html t +23 Apple Public Source License 1.0 APSL-1.0 http://spdx.org/licenses/APSL-1.0.html t +24 Apple Public Source License 1.1 APSL-1.1 http://spdx.org/licenses/APSL-1.1.html t +25 Apple Public Source License 1.2 APSL-1.2 http://spdx.org/licenses/APSL-1.2.html t +26 Apple Public Source License 2.0 APSL-2.0 http://spdx.org/licenses/APSL-2.0.html t +27 Artistic License 1.0 Artistic-1.0 http://spdx.org/licenses/Artistic-1.0.html t +28 Artistic License 1.0 (Perl) Artistic-1.0-Perl http://spdx.org/licenses/Artistic-1.0-Perl.html t +29 Artistic License 1.0 w/clause 8 Artistic-1.0-cl8 http://spdx.org/licenses/Artistic-1.0-cl8.html t +30 Artistic License 2.0 Artistic-2.0 http://spdx.org/licenses/Artistic-2.0.html t +31 Attribution Assurance License AAL http://spdx.org/licenses/AAL.html t +32 Bahyph License Bahyph http://spdx.org/licenses/Bahyph.html t +33 Barr License Barr http://spdx.org/licenses/Barr.html t +34 Beerware License Beerware http://spdx.org/licenses/Beerware.html t +35 BitTorrent Open Source License v1.0 BitTorrent-1.0 http://spdx.org/licenses/BitTorrent-1.0.html t +36 BitTorrent Open Source License v1.1 BitTorrent-1.1 http://spdx.org/licenses/BitTorrent-1.1.html t +37 Boost Software License 1.0 BSL-1.0 http://spdx.org/licenses/BSL-1.0.html t +38 Borceux license Borceux http://spdx.org/licenses/Borceux.html t +39 BSD 2-clause "Simplified" License BSD-2-Clause http://spdx.org/licenses/BSD-2-Clause.html t +40 BSD 2-clause FreeBSD License BSD-2-Clause-FreeBSD http://spdx.org/licenses/BSD-2-Clause-FreeBSD.html t +41 BSD 2-clause NetBSD License BSD-2-Clause-NetBSD http://spdx.org/licenses/BSD-2-Clause-NetBSD.html t +42 BSD 3-clause "New" or "Revised" License BSD-3-Clause http://spdx.org/licenses/BSD-3-Clause.html t +43 BSD 3-clause Clear License BSD-3-Clause-Clear http://spdx.org/licenses/BSD-3-Clause-Clear.html t +44 BSD 4-clause "Original" or "Old" License BSD-4-Clause http://spdx.org/licenses/BSD-4-Clause.html t +45 BSD Protection License BSD-Protection http://spdx.org/licenses/BSD-Protection.html t +46 BSD with attribution BSD-3-Clause-Attribution http://spdx.org/licenses/BSD-3-Clause-Attribution.html t +47 BSD Zero Clause License 0BSD http://spdx.org/licenses/0BSD.html t +48 BSD-4-Clause (University of California-Specific) BSD-4-Clause-UC http://spdx.org/licenses/BSD-4-Clause-UC.html t +49 bzip2 and libbzip2 License v1.0.5 bzip2-1.0.5 http://spdx.org/licenses/bzip2-1.0.5.html t +50 bzip2 and libbzip2 License v1.0.6 bzip2-1.0.6 http://spdx.org/licenses/bzip2-1.0.6.html t +51 Caldera License Caldera http://spdx.org/licenses/Caldera.html t +52 CeCILL Free Software License Agreement v1.0 CECILL-1.0 http://spdx.org/licenses/CECILL-1.0.html t +53 CeCILL Free Software License Agreement v1.1 CECILL-1.1 http://spdx.org/licenses/CECILL-1.1.html t +54 CeCILL Free Software License Agreement v2.0 CECILL-2.0 http://spdx.org/licenses/CECILL-2.0.html t +55 CeCILL Free Software License Agreement v2.1 CECILL-2.1 http://spdx.org/licenses/CECILL-2.1.html t +56 CeCILL-B Free Software License Agreement CECILL-B http://spdx.org/licenses/CECILL-B.html t +57 CeCILL-C Free Software License Agreement CECILL-C http://spdx.org/licenses/CECILL-C.html t +58 Clarified Artistic License ClArtistic http://spdx.org/licenses/ClArtistic.html t +59 CMU License MIT-CMU http://spdx.org/licenses/MIT-CMU.html t +60 CNRI Jython License CNRI-Jython http://spdx.org/licenses/CNRI-Jython.html t +61 CNRI Python License CNRI-Python http://spdx.org/licenses/CNRI-Python.html t +62 CNRI Python Open Source GPL Compatible License Agreement CNRI-Python-GPL-Compatible http://spdx.org/licenses/CNRI-Python-GPL-Compatible.html t +63 Code Project Open License 1.02 CPOL-1.02 http://spdx.org/licenses/CPOL-1.02.html t +64 Common Development and Distribution License 1.0 CDDL-1.0 http://spdx.org/licenses/CDDL-1.0.html t +65 Common Development and Distribution License 1.1 CDDL-1.1 http://spdx.org/licenses/CDDL-1.1.html t +66 Common Public Attribution License 1.0 CPAL-1.0 http://spdx.org/licenses/CPAL-1.0.html t +67 Common Public License 1.0 CPL-1.0 http://spdx.org/licenses/CPL-1.0.html t +68 Computer Associates Trusted Open Source License 1.1 CATOSL-1.1 http://spdx.org/licenses/CATOSL-1.1.html t +69 Condor Public License v1.1 Condor-1.1 http://spdx.org/licenses/Condor-1.1.html t +70 Creative Commons Attribution 1.0 CC-BY-1.0 http://spdx.org/licenses/CC-BY-1.0.html t +71 Creative Commons Attribution 2.0 CC-BY-2.0 http://spdx.org/licenses/CC-BY-2.0.html t +72 Creative Commons Attribution 2.5 CC-BY-2.5 http://spdx.org/licenses/CC-BY-2.5.html t +73 Creative Commons Attribution 3.0 CC-BY-3.0 http://spdx.org/licenses/CC-BY-3.0.html t +74 Creative Commons Attribution 4.0 CC-BY-4.0 http://spdx.org/licenses/CC-BY-4.0.html t +75 Creative Commons Attribution No Derivatives 1.0 CC-BY-ND-1.0 http://spdx.org/licenses/CC-BY-ND-1.0.html t +76 Creative Commons Attribution No Derivatives 2.0 CC-BY-ND-2.0 http://spdx.org/licenses/CC-BY-ND-2.0.html t +77 Creative Commons Attribution No Derivatives 2.5 CC-BY-ND-2.5 http://spdx.org/licenses/CC-BY-ND-2.5.html t +78 Creative Commons Attribution No Derivatives 3.0 CC-BY-ND-3.0 http://spdx.org/licenses/CC-BY-ND-3.0.html t +79 Creative Commons Attribution No Derivatives 4.0 CC-BY-ND-4.0 http://spdx.org/licenses/CC-BY-ND-4.0.html t +80 Creative Commons Attribution Non Commercial 1.0 CC-BY-NC-1.0 http://spdx.org/licenses/CC-BY-NC-1.0.html t +81 Creative Commons Attribution Non Commercial 2.0 CC-BY-NC-2.0 http://spdx.org/licenses/CC-BY-NC-2.0.html t +82 Creative Commons Attribution Non Commercial 2.5 CC-BY-NC-2.5 http://spdx.org/licenses/CC-BY-NC-2.5.html t +83 Creative Commons Attribution Non Commercial 3.0 CC-BY-NC-3.0 http://spdx.org/licenses/CC-BY-NC-3.0.html t +84 Creative Commons Attribution Non Commercial 4.0 CC-BY-NC-4.0 http://spdx.org/licenses/CC-BY-NC-4.0.html t +85 Creative Commons Attribution Non Commercial No Derivatives 1.0 CC-BY-NC-ND-1.0 http://spdx.org/licenses/CC-BY-NC-ND-1.0.html t +86 Creative Commons Attribution Non Commercial No Derivatives 2.0 CC-BY-NC-ND-2.0 http://spdx.org/licenses/CC-BY-NC-ND-2.0.html t +87 Creative Commons Attribution Non Commercial No Derivatives 2.5 CC-BY-NC-ND-2.5 http://spdx.org/licenses/CC-BY-NC-ND-2.5.html t +88 Creative Commons Attribution Non Commercial No Derivatives 3.0 CC-BY-NC-ND-3.0 http://spdx.org/licenses/CC-BY-NC-ND-3.0.html t +89 Creative Commons Attribution Non Commercial No Derivatives 4.0 CC-BY-NC-ND-4.0 http://spdx.org/licenses/CC-BY-NC-ND-4.0.html t +90 Creative Commons Attribution Non Commercial Share Alike 1.0 CC-BY-NC-SA-1.0 http://spdx.org/licenses/CC-BY-NC-SA-1.0.html t +91 Creative Commons Attribution Non Commercial Share Alike 2.0 CC-BY-NC-SA-2.0 http://spdx.org/licenses/CC-BY-NC-SA-2.0.html t +92 Creative Commons Attribution Non Commercial Share Alike 2.5 CC-BY-NC-SA-2.5 http://spdx.org/licenses/CC-BY-NC-SA-2.5.html t +93 Creative Commons Attribution Non Commercial Share Alike 3.0 CC-BY-NC-SA-3.0 http://spdx.org/licenses/CC-BY-NC-SA-3.0.html t +94 Creative Commons Attribution Non Commercial Share Alike 4.0 CC-BY-NC-SA-4.0 http://spdx.org/licenses/CC-BY-NC-SA-4.0.html t +95 Creative Commons Attribution Share Alike 1.0 CC-BY-SA-1.0 http://spdx.org/licenses/CC-BY-SA-1.0.html t +96 Creative Commons Attribution Share Alike 2.0 CC-BY-SA-2.0 http://spdx.org/licenses/CC-BY-SA-2.0.html t +97 Creative Commons Attribution Share Alike 2.5 CC-BY-SA-2.5 http://spdx.org/licenses/CC-BY-SA-2.5.html t +98 Creative Commons Attribution Share Alike 3.0 CC-BY-SA-3.0 http://spdx.org/licenses/CC-BY-SA-3.0.html t +99 Creative Commons Attribution Share Alike 4.0 CC-BY-SA-4.0 http://spdx.org/licenses/CC-BY-SA-4.0.html t +100 Creative Commons Zero v1.0 Universal CC0-1.0 http://spdx.org/licenses/CC0-1.0.html t +101 Crossword License Crossword http://spdx.org/licenses/Crossword.html t +102 CrystalStacker License CrystalStacker http://spdx.org/licenses/CrystalStacker.html t +103 CUA Office Public License v1.0 CUA-OPL-1.0 http://spdx.org/licenses/CUA-OPL-1.0.html t +104 Cube License Cube http://spdx.org/licenses/Cube.html t +105 Deutsche Freie Software Lizenz D-FSL-1.0 http://spdx.org/licenses/D-FSL-1.0.html t +106 diffmark license diffmark http://spdx.org/licenses/diffmark.html t +107 Do What The F*ck You Want To Public License WTFPL http://spdx.org/licenses/WTFPL.html t +108 DOC License DOC http://spdx.org/licenses/DOC.html t +109 Dotseqn License Dotseqn http://spdx.org/licenses/Dotseqn.html t +110 DSDP License DSDP http://spdx.org/licenses/DSDP.html t +111 dvipdfm License dvipdfm http://spdx.org/licenses/dvipdfm.html t +112 Eclipse Public License 1.0 EPL-1.0 http://spdx.org/licenses/EPL-1.0.html t +113 Educational Community License v1.0 ECL-1.0 http://spdx.org/licenses/ECL-1.0.html t +114 Educational Community License v2.0 ECL-2.0 http://spdx.org/licenses/ECL-2.0.html t +115 eGenix.com Public License 1.1.0 eGenix http://spdx.org/licenses/eGenix.html t +116 Eiffel Forum License v1.0 EFL-1.0 http://spdx.org/licenses/EFL-1.0.html t +117 Eiffel Forum License v2.0 EFL-2.0 http://spdx.org/licenses/EFL-2.0.html t +118 Enlightenment License (e16) MIT-advertising http://spdx.org/licenses/MIT-advertising.html t +119 enna License MIT-enna http://spdx.org/licenses/MIT-enna.html t +120 Entessa Public License v1.0 Entessa http://spdx.org/licenses/Entessa.html t +121 Erlang Public License v1.1 ErlPL-1.1 http://spdx.org/licenses/ErlPL-1.1.html t +122 EU DataGrid Software License EUDatagrid http://spdx.org/licenses/EUDatagrid.html t +123 European Union Public License 1.0 EUPL-1.0 http://spdx.org/licenses/EUPL-1.0.html t +124 European Union Public License 1.1 EUPL-1.1 http://spdx.org/licenses/EUPL-1.1.html t +125 Eurosym License Eurosym http://spdx.org/licenses/Eurosym.html t +126 Fair License Fair http://spdx.org/licenses/Fair.html t +127 feh License MIT-feh http://spdx.org/licenses/MIT-feh.html t +128 Frameworx Open License 1.0 Frameworx-1.0 http://spdx.org/licenses/Frameworx-1.0.html t +129 FreeImage Public License v1.0 FreeImage http://spdx.org/licenses/FreeImage.html t +130 Freetype Project License FTL http://spdx.org/licenses/FTL.html t +131 FSF Unlimited License FSFUL http://spdx.org/licenses/FSFUL.html t +132 FSF Unlimited License (with License Retention) FSFULLR http://spdx.org/licenses/FSFULLR.html t +133 Giftware License Giftware http://spdx.org/licenses/Giftware.html t +134 GL2PS License GL2PS http://spdx.org/licenses/GL2PS.html t +135 Glulxe License Glulxe http://spdx.org/licenses/Glulxe.html t +136 GNU Affero General Public License v3.0 AGPL-3.0 http://spdx.org/licenses/AGPL-3.0.html t +137 GNU Free Documentation License v1.1 GFDL-1.1 http://spdx.org/licenses/GFDL-1.1.html t +138 GNU Free Documentation License v1.2 GFDL-1.2 http://spdx.org/licenses/GFDL-1.2.html t +139 GNU Free Documentation License v1.3 GFDL-1.3 http://spdx.org/licenses/GFDL-1.3.html t +140 GNU General Public License v1.0 only GPL-1.0 http://spdx.org/licenses/GPL-1.0.html t +141 GNU General Public License v2.0 only GPL-2.0 http://spdx.org/licenses/GPL-2.0.html t +142 GNU General Public License v3.0 only GPL-3.0 http://spdx.org/licenses/GPL-3.0.html t +143 GNU Lesser General Public License v2.1 only LGPL-2.1 http://spdx.org/licenses/LGPL-2.1.html t +144 GNU Lesser General Public License v3.0 only LGPL-3.0 http://spdx.org/licenses/LGPL-3.0.html t +145 GNU Library General Public License v2 only LGPL-2.0 http://spdx.org/licenses/LGPL-2.0.html t +146 gnuplot License gnuplot http://spdx.org/licenses/gnuplot.html t +147 gSOAP Public License v1.3b gSOAP-1.3b http://spdx.org/licenses/gSOAP-1.3b.html t +148 Haskell Language Report License HaskellReport http://spdx.org/licenses/HaskellReport.html t +149 Historic Permission Notice and Disclaimer HPND http://spdx.org/licenses/HPND.html t +150 IBM PowerPC Initialization and Boot Software IBM-pibs http://spdx.org/licenses/IBM-pibs.html t +151 IBM Public License v1.0 IPL-1.0 http://spdx.org/licenses/IPL-1.0.html t +152 ICU License ICU http://spdx.org/licenses/ICU.html t +153 ImageMagick License ImageMagick http://spdx.org/licenses/ImageMagick.html t +154 iMatix Standard Function Library Agreement iMatix http://spdx.org/licenses/iMatix.html t +155 Imlib2 License Imlib2 http://spdx.org/licenses/Imlib2.html t +156 Independent JPEG Group License IJG http://spdx.org/licenses/IJG.html t +157 Intel ACPI Software License Agreement Intel-ACPI http://spdx.org/licenses/Intel-ACPI.html t +158 Intel Open Source License Intel http://spdx.org/licenses/Intel.html t +159 Interbase Public License v1.0 Interbase-1.0 http://spdx.org/licenses/Interbase-1.0.html t +160 IPA Font License IPA http://spdx.org/licenses/IPA.html t +161 ISC License ISC http://spdx.org/licenses/ISC.html t +162 JasPer License JasPer-2.0 http://spdx.org/licenses/JasPer-2.0.html t +163 JSON License JSON http://spdx.org/licenses/JSON.html t +164 LaTeX Project Public License 1.3a LPPL-1.3a http://spdx.org/licenses/LPPL-1.3a.html t +165 LaTeX Project Public License v1.0 LPPL-1.0 http://spdx.org/licenses/LPPL-1.0.html t +166 LaTeX Project Public License v1.1 LPPL-1.1 http://spdx.org/licenses/LPPL-1.1.html t +167 LaTeX Project Public License v1.2 LPPL-1.2 http://spdx.org/licenses/LPPL-1.2.html t +168 LaTeX Project Public License v1.3c LPPL-1.3c http://spdx.org/licenses/LPPL-1.3c.html t +169 Latex2e License Latex2e http://spdx.org/licenses/Latex2e.html t +170 Lawrence Berkeley National Labs BSD variant license BSD-3-Clause-LBNL http://spdx.org/licenses/BSD-3-Clause-LBNL.html t +171 Leptonica License Leptonica http://spdx.org/licenses/Leptonica.html t +172 Lesser General Public License For Linguistic Resources LGPLLR http://spdx.org/licenses/LGPLLR.html t +173 libpng License Libpng http://spdx.org/licenses/Libpng.html t +174 libtiff License libtiff http://spdx.org/licenses/libtiff.html t +175 Lucent Public License v1.02 LPL-1.02 http://spdx.org/licenses/LPL-1.02.html t +176 Lucent Public License Version 1.0 LPL-1.0 http://spdx.org/licenses/LPL-1.0.html t +177 MakeIndex License MakeIndex http://spdx.org/licenses/MakeIndex.html t +178 Matrix Template Library License MTLL http://spdx.org/licenses/MTLL.html t +179 Microsoft Public License MS-PL http://spdx.org/licenses/MS-PL.html t +180 Microsoft Reciprocal License MS-RL http://spdx.org/licenses/MS-RL.html t +181 MirOS Licence MirOS http://spdx.org/licenses/MirOS.html t +182 MIT +no-false-attribs license MITNFA http://spdx.org/licenses/MITNFA.html t +183 MIT License MIT http://spdx.org/licenses/MIT.html t +184 Motosoto License Motosoto http://spdx.org/licenses/Motosoto.html t +185 Mozilla Public License 1.0 MPL-1.0 http://spdx.org/licenses/MPL-1.0.html t +186 Mozilla Public License 1.1 MPL-1.1 http://spdx.org/licenses/MPL-1.1.html t +187 Mozilla Public License 2.0 MPL-2.0 http://spdx.org/licenses/MPL-2.0.html t +188 Mozilla Public License 2.0 (no copyleft exception) MPL-2.0-no-copyleft-exception http://spdx.org/licenses/MPL-2.0-no-copyleft-exception.html t +189 mpich2 License mpich2 http://spdx.org/licenses/mpich2.html t +190 Multics License Multics http://spdx.org/licenses/Multics.html t +191 Mup License Mup http://spdx.org/licenses/Mup.html t +192 NASA Open Source Agreement 1.3 NASA-1.3 http://spdx.org/licenses/NASA-1.3.html t +193 Naumen Public License Naumen http://spdx.org/licenses/Naumen.html t +194 Net Boolean Public License v1 NBPL-1.0 http://spdx.org/licenses/NBPL-1.0.html t +195 NetCDF license NetCDF http://spdx.org/licenses/NetCDF.html t +196 Nethack General Public License NGPL http://spdx.org/licenses/NGPL.html t +197 Netizen Open Source License NOSL http://spdx.org/licenses/NOSL.html t +198 Netscape Public License v1.0 NPL-1.0 http://spdx.org/licenses/NPL-1.0.html t +199 Netscape Public License v1.1 NPL-1.1 http://spdx.org/licenses/NPL-1.1.html t +200 Newsletr License Newsletr http://spdx.org/licenses/Newsletr.html t +201 No Limit Public License NLPL http://spdx.org/licenses/NLPL.html t +202 Nokia Open Source License Nokia http://spdx.org/licenses/Nokia.html t +203 Non-Profit Open Software License 3.0 NPOSL-3.0 http://spdx.org/licenses/NPOSL-3.0.html t +204 Noweb License Noweb http://spdx.org/licenses/Noweb.html t +205 NRL License NRL http://spdx.org/licenses/NRL.html t +206 NTP License NTP http://spdx.org/licenses/NTP.html t +207 Nunit License Nunit http://spdx.org/licenses/Nunit.html t +208 OCLC Research Public License 2.0 OCLC-2.0 http://spdx.org/licenses/OCLC-2.0.html t +209 ODC Open Database License v1.0 ODbL-1.0 http://spdx.org/licenses/ODbL-1.0.html t +210 ODC Public Domain Dedication & License 1.0 PDDL-1.0 http://spdx.org/licenses/PDDL-1.0.html t +211 Open Group Test Suite License OGTSL http://spdx.org/licenses/OGTSL.html t +212 Open LDAP Public License 2.2.2 OLDAP-2.2.2 http://spdx.org/licenses/OLDAP-2.2.2.html t +213 Open LDAP Public License v1.1 OLDAP-1.1 http://spdx.org/licenses/OLDAP-1.1.html t +214 Open LDAP Public License v1.2 OLDAP-1.2 http://spdx.org/licenses/OLDAP-1.2.html t +215 Open LDAP Public License v1.3 OLDAP-1.3 http://spdx.org/licenses/OLDAP-1.3.html t +216 Open LDAP Public License v1.4 OLDAP-1.4 http://spdx.org/licenses/OLDAP-1.4.html t +217 Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B) OLDAP-2.0 http://spdx.org/licenses/OLDAP-2.0.html t +218 Open LDAP Public License v2.0.1 OLDAP-2.0.1 http://spdx.org/licenses/OLDAP-2.0.1.html t +219 Open LDAP Public License v2.1 OLDAP-2.1 http://spdx.org/licenses/OLDAP-2.1.html t +220 Open LDAP Public License v2.2 OLDAP-2.2 http://spdx.org/licenses/OLDAP-2.2.html t +221 Open LDAP Public License v2.2.1 OLDAP-2.2.1 http://spdx.org/licenses/OLDAP-2.2.1.html t +222 Open LDAP Public License v2.3 OLDAP-2.3 http://spdx.org/licenses/OLDAP-2.3.html t +223 Open LDAP Public License v2.4 OLDAP-2.4 http://spdx.org/licenses/OLDAP-2.4.html t +224 Open LDAP Public License v2.5 OLDAP-2.5 http://spdx.org/licenses/OLDAP-2.5.html t +225 Open LDAP Public License v2.6 OLDAP-2.6 http://spdx.org/licenses/OLDAP-2.6.html t +226 Open LDAP Public License v2.7 OLDAP-2.7 http://spdx.org/licenses/OLDAP-2.7.html t +227 Open LDAP Public License v2.8 OLDAP-2.8 http://spdx.org/licenses/OLDAP-2.8.html t +228 Open Market License OML http://spdx.org/licenses/OML.html t +229 Open Public License v1.0 OPL-1.0 http://spdx.org/licenses/OPL-1.0.html t +230 Open Software License 1.0 OSL-1.0 http://spdx.org/licenses/OSL-1.0.html t +231 Open Software License 1.1 OSL-1.1 http://spdx.org/licenses/OSL-1.1.html t +232 Open Software License 2.0 OSL-2.0 http://spdx.org/licenses/OSL-2.0.html t +233 Open Software License 2.1 OSL-2.1 http://spdx.org/licenses/OSL-2.1.html t +234 Open Software License 3.0 OSL-3.0 http://spdx.org/licenses/OSL-3.0.html t +235 OpenSSL License OpenSSL http://spdx.org/licenses/OpenSSL.html t +236 PHP License v3.0 PHP-3.0 http://spdx.org/licenses/PHP-3.0.html t +237 PHP License v3.01 PHP-3.01 http://spdx.org/licenses/PHP-3.01.html t +238 Plexus Classworlds License Plexus http://spdx.org/licenses/Plexus.html t +239 PostgreSQL License PostgreSQL http://spdx.org/licenses/PostgreSQL.html t +240 psfrag License psfrag http://spdx.org/licenses/psfrag.html t +241 psutils License psutils http://spdx.org/licenses/psutils.html t +242 Python License 2.0 Python-2.0 http://spdx.org/licenses/Python-2.0.html t +243 Q Public License 1.0 QPL-1.0 http://spdx.org/licenses/QPL-1.0.html t +244 Qhull License Qhull http://spdx.org/licenses/Qhull.html t +245 Rdisc License Rdisc http://spdx.org/licenses/Rdisc.html t +246 RealNetworks Public Source License v1.0 RPSL-1.0 http://spdx.org/licenses/RPSL-1.0.html t +247 Reciprocal Public License 1.1 RPL-1.1 http://spdx.org/licenses/RPL-1.1.html t +248 Reciprocal Public License 1.5 RPL-1.5 http://spdx.org/licenses/RPL-1.5.html t +249 Red Hat eCos Public License v1.1 RHeCos-1.1 http://spdx.org/licenses/RHeCos-1.1.html t +250 Ricoh Source Code Public License RSCPL http://spdx.org/licenses/RSCPL.html t +251 RSA Message-Digest License RSA-MD http://spdx.org/licenses/RSA-MD.html t +252 Ruby License Ruby http://spdx.org/licenses/Ruby.html t +253 Sax Public Domain Notice SAX-PD http://spdx.org/licenses/SAX-PD.html t +254 Saxpath License Saxpath http://spdx.org/licenses/Saxpath.html t +255 SCEA Shared Source License SCEA http://spdx.org/licenses/SCEA.html t +256 Scheme Widget Library (SWL) Software License Agreement SWL http://spdx.org/licenses/SWL.html t +257 Sendmail License Sendmail http://spdx.org/licenses/Sendmail.html t +258 SGI Free Software License B v1.0 SGI-B-1.0 http://spdx.org/licenses/SGI-B-1.0.html t +259 SGI Free Software License B v1.1 SGI-B-1.1 http://spdx.org/licenses/SGI-B-1.1.html t +260 SGI Free Software License B v2.0 SGI-B-2.0 http://spdx.org/licenses/SGI-B-2.0.html t +261 SIL Open Font License 1.0 OFL-1.0 http://spdx.org/licenses/OFL-1.0.html t +262 SIL Open Font License 1.1 OFL-1.1 http://spdx.org/licenses/OFL-1.1.html t +263 Simple Public License 2.0 SimPL-2.0 http://spdx.org/licenses/SimPL-2.0.html t +264 Sleepycat License Sleepycat http://spdx.org/licenses/Sleepycat.html t +265 SNIA Public License 1.1 SNIA http://spdx.org/licenses/SNIA.html t +266 Spencer License 86 Spencer-86 http://spdx.org/licenses/Spencer-86.html t +267 Spencer License 94 Spencer-94 http://spdx.org/licenses/Spencer-94.html t +268 Spencer License 99 Spencer-99 http://spdx.org/licenses/Spencer-99.html t +269 Standard ML of New Jersey License SMLNJ http://spdx.org/licenses/SMLNJ.html t +270 SugarCRM Public License v1.1.3 SugarCRM-1.1.3 http://spdx.org/licenses/SugarCRM-1.1.3.html t +271 Sun Industry Standards Source License v1.1 SISSL http://spdx.org/licenses/SISSL.html t +272 Sun Industry Standards Source License v1.2 SISSL-1.2 http://spdx.org/licenses/SISSL-1.2.html t +273 Sun Public License v1.0 SPL-1.0 http://spdx.org/licenses/SPL-1.0.html t +274 Sybase Open Watcom Public License 1.0 Watcom-1.0 http://spdx.org/licenses/Watcom-1.0.html t +275 TCL/TK License TCL http://spdx.org/licenses/TCL.html t +276 The Unlicense Unlicense http://spdx.org/licenses/Unlicense.html t +277 TMate Open Source License TMate http://spdx.org/licenses/TMate.html t +278 TORQUE v2.5+ Software License v1.1 TORQUE-1.1 http://spdx.org/licenses/TORQUE-1.1.html t +279 Trusster Open Source License TOSL http://spdx.org/licenses/TOSL.html t +280 Unicode Terms of Use Unicode-TOU http://spdx.org/licenses/Unicode-TOU.html t +281 Universal Permissive License v1.0 UPL-1.0 http://spdx.org/licenses/UPL-1.0.html t +282 University of Illinois/NCSA Open Source License NCSA http://spdx.org/licenses/NCSA.html t +283 Vim License Vim http://spdx.org/licenses/Vim.html t +284 VOSTROM Public License for Open Source VOSTROM http://spdx.org/licenses/VOSTROM.html t +285 Vovida Software License v1.0 VSL-1.0 http://spdx.org/licenses/VSL-1.0.html t +286 W3C Software Notice and License (1998-07-20) W3C-19980720 http://spdx.org/licenses/W3C-19980720.html t +287 W3C Software Notice and License (2002-12-31) W3C http://spdx.org/licenses/W3C.html t +288 Wsuipa License Wsuipa http://spdx.org/licenses/Wsuipa.html t +289 X.Net License Xnet http://spdx.org/licenses/Xnet.html t +290 X11 License X11 http://spdx.org/licenses/X11.html t +291 Xerox License Xerox http://spdx.org/licenses/Xerox.html t +292 XFree86 License 1.1 XFree86-1.1 http://spdx.org/licenses/XFree86-1.1.html t +293 xinetd License xinetd http://spdx.org/licenses/xinetd.html t +294 XPP License xpp http://spdx.org/licenses/xpp.html t +295 XSkat License XSkat http://spdx.org/licenses/XSkat.html t +296 Yahoo! Public License v1.0 YPL-1.0 http://spdx.org/licenses/YPL-1.0.html t +297 Yahoo! Public License v1.1 YPL-1.1 http://spdx.org/licenses/YPL-1.1.html t +298 Zed License Zed http://spdx.org/licenses/Zed.html t +299 Zend License v2.0 Zend-2.0 http://spdx.org/licenses/Zend-2.0.html t +300 Zimbra Public License v1.3 Zimbra-1.3 http://spdx.org/licenses/Zimbra-1.3.html t +301 Zimbra Public License v1.4 Zimbra-1.4 http://spdx.org/licenses/Zimbra-1.4.html t +302 zlib License Zlib http://spdx.org/licenses/Zlib.html t +303 zlib/libpng License with Acknowledgement zlib-acknowledgement http://spdx.org/licenses/zlib-acknowledgement.html t +304 Zope Public License 1.1 ZPL-1.1 http://spdx.org/licenses/ZPL-1.1.html t +305 Zope Public License 2.0 ZPL-2.0 http://spdx.org/licenses/ZPL-2.0.html t +306 Zope Public License 2.1 ZPL-2.1 http://spdx.org/licenses/ZPL-2.1.html t +307 eCos license version 2.0 eCos-2.0 http://spdx.org/licenses/eCos-2.0 t +308 GNU General Public License v1.0 or later GPL-1.0+ http://spdx.org/licenses/GPL-1.0+ t +309 GNU General Public License v2.0 or later GPL-2.0+ http://spdx.org/licenses/GPL-2.0+ t +310 GNU General Public License v2.0 w/Autoconf exception GPL-2.0-with-autoconf-exception http://spdx.org/licenses/GPL-2.0-with-autoconf-exception t +311 GNU General Public License v2.0 w/Bison exception GPL-2.0-with-bison-exception http://spdx.org/licenses/GPL-2.0-with-bison-exception t +312 GNU General Public License v2.0 w/Classpath exception GPL-2.0-with-classpath-exception http://spdx.org/licenses/GPL-2.0-with-classpath-exception t +313 GNU General Public License v2.0 w/Font exception GPL-2.0-with-font-exception http://spdx.org/licenses/GPL-2.0-with-font-exception t +314 GNU General Public License v2.0 w/GCC Runtime Library exception GPL-2.0-with-GCC-exception http://spdx.org/licenses/GPL-2.0-with-GCC-exception t +315 GNU General Public License v3.0 or later GPL-3.0+ http://spdx.org/licenses/GPL-3.0+ t +316 GNU General Public License v3.0 w/Autoconf exception GPL-3.0-with-autoconf-exception http://spdx.org/licenses/GPL-3.0-with-autoconf-exception t +317 GNU General Public License v3.0 w/GCC Runtime Library exception GPL-3.0-with-GCC-exception http://spdx.org/licenses/GPL-3.0-with-GCC-exception t +318 GNU Lesser General Public License v2.1 or later LGPL-2.1+ http://spdx.org/licenses/LGPL-2.1+ t +319 GNU Lesser General Public License v3.0 or later LGPL-3.0+ http://spdx.org/licenses/LGPL-3.0+ t +320 GNU Library General Public License v2 or later LGPL-2.0+ http://spdx.org/licenses/LGPL-2.0+ t +321 Standard ML of New Jersey License StandardML-NJ http://spdx.org/licenses/StandardML-NJ t +322 wxWindows Library License WXwindows http://spdx.org/licenses/WXwindows t +\. + + +-- +-- Data for Name: packages; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages (package_id, name, version, file_name, supplier_id, originator_id, download_location, verification_code, ver_code_excluded_file_id, sha256, home_page, source_info, concluded_license_id, declared_license_id, license_comment, copyright_text, summary, description, comment, dosocs2_dir_code) FROM stdin; +\. + + +-- +-- Data for Name: packages_files; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages_files (package_file_id, package_id, file_id, concluded_license_id, license_comment, file_name) FROM stdin; +\. + + +-- +-- Data for Name: packages_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.packages_scans (package_scan_id, package_id, scanner_id) FROM stdin; +\. + + +-- +-- Data for Name: projects; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.projects (package_id, name, homepage, uri) FROM stdin; +\. + + +-- +-- Data for Name: relationship_types; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.relationship_types (relationship_type_id, name) FROM stdin; +1 DESCRIBES +2 DESCRIBED_BY +3 CONTAINS +4 CONTAINED_BY +5 GENERATES +6 GENERATED_FROM +7 ANCESTOR_OF +8 DESCENDANT_OF +9 VARIANT_OF +10 DISTRIBUTION_ARTIFACT +11 PATCH_FOR +12 PATCH_APPLIED +13 COPY_OF +14 FILE_ADDED +15 FILE_DELETED +16 FILE_MODIFIED +17 EXPANDED_FROM_ARCHIVE +18 DYNAMIC_LINK +19 STATIC_LINK +20 DATA_FILE_OF +21 TEST_CASE_OF +22 BUILD_TOOL_OF +23 DOCUMENTATION_OF +24 OPTIONAL_COMPONENT_OF +25 METAFILE_OF +26 PACKAGE_OF +27 AMENDS +28 PREREQUISITE_FOR +29 HAS_PREREQUISITE +30 OTHER +\. + + +-- +-- Data for Name: relationships; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.relationships (relationship_id, left_identifier_id, right_identifier_id, relationship_type_id, relationship_comment) FROM stdin; +\. + + +-- +-- Data for Name: sbom_scans; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.sbom_scans (repo_id, sbom_scan) FROM stdin; +\. + + +-- +-- Data for Name: scanners; Type: TABLE DATA; Schema: spdx; Owner: augur +-- + +COPY spdx.scanners (scanner_id, name) FROM stdin; +\. + + +-- +-- Name: augur_data.repo_insights_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data."augur_data.repo_insights_ri_id_seq"', 25430, false); + + +-- +-- Name: chaoss_metric_status_cms_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.chaoss_metric_status_cms_id_seq', 1, false); + + +-- +-- Name: chaoss_user_chaoss_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.chaoss_user_chaoss_id_seq', 1, false); + + +-- +-- Name: commit_comment_ref_cmt_comment_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commit_comment_ref_cmt_comment_id_seq', 25430, false); + + +-- +-- Name: commit_parents_parent_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commit_parents_parent_id_seq', 25430, false); + + +-- +-- Name: commits_cmt_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.commits_cmt_id_seq', 25430, false); + + +-- +-- Name: contributor_affiliations_ca_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributor_affiliations_ca_id_seq', 25430, false); + + +-- +-- Name: contributor_repo_cntrb_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributor_repo_cntrb_repo_id_seq', 1, false); + + +-- +-- Name: contributors_aliases_cntrb_a_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_aliases_cntrb_a_id_seq', 25430, false); + + +-- +-- Name: contributors_aliases_cntrb_alias_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_aliases_cntrb_alias_id_seq', 1, false); + + +-- +-- Name: contributors_cntrb_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_cntrb_id_seq', 25430, false); + + +-- +-- Name: contributors_history_cntrb_history_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.contributors_history_cntrb_history_id_seq', 25430, false); + + +-- +-- Name: discourse_insights_msg_discourse_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.discourse_insights_msg_discourse_id_seq', 1, false); + + +-- +-- Name: discourse_insights_msg_discourse_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.discourse_insights_msg_discourse_id_seq1', 1, false); + + +-- +-- Name: issue_assignees_issue_assignee_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_assignees_issue_assignee_id_seq', 1, false); + + +-- +-- Name: issue_events_event_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_events_event_id_seq', 25430, false); + + +-- +-- Name: issue_labels_issue_label_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_labels_issue_label_id_seq', 25430, false); + + +-- +-- Name: issue_message_ref_issue_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_message_ref_issue_msg_ref_id_seq', 25430, false); + + +-- +-- Name: issue_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.issue_seq', 31000, false); + + +-- +-- Name: libraries_library_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.libraries_library_id_seq', 25430, false); + + +-- +-- Name: library_dependencies_lib_dependency_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.library_dependencies_lib_dependency_id_seq', 25430, false); + + +-- +-- Name: library_version_library_version_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.library_version_library_version_id_seq', 25430, false); + + +-- +-- Name: lstm_anomaly_models_model_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.lstm_anomaly_models_model_id_seq', 1, false); + + +-- +-- Name: lstm_anomaly_results_result_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.lstm_anomaly_results_result_id_seq', 1, false); + + +-- +-- Name: message_analysis_msg_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_analysis_msg_analysis_id_seq', 1, false); + + +-- +-- Name: message_analysis_summary_msg_summary_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_analysis_summary_msg_summary_id_seq', 1, false); + + +-- +-- Name: message_msg_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_msg_id_seq', 25430, false); + + +-- +-- Name: message_sentiment_msg_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_sentiment_msg_analysis_id_seq', 1, false); + + +-- +-- Name: message_sentiment_summary_msg_summary_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.message_sentiment_summary_msg_summary_id_seq', 1, false); + + +-- +-- Name: platform_pltfrm_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.platform_pltfrm_id_seq', 25430, false); + + +-- +-- Name: pull_request_analysis_pull_request_analysis_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_analysis_pull_request_analysis_id_seq', 1, false); + + +-- +-- Name: pull_request_assignees_pr_assignee_map_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_assignees_pr_assignee_map_id_seq', 25430, false); + + +-- +-- Name: pull_request_commits_pr_cmt_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_commits_pr_cmt_id_seq', 1, false); + + +-- +-- Name: pull_request_events_pr_event_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_events_pr_event_id_seq', 25430, false); + + +-- +-- Name: pull_request_files_pr_file_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_files_pr_file_id_seq', 25150, false); + + +-- +-- Name: pull_request_labels_pr_label_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_labels_pr_label_id_seq', 25430, false); + + +-- +-- Name: pull_request_message_ref_pr_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_message_ref_pr_msg_ref_id_seq', 25430, false); + + +-- +-- Name: pull_request_meta_pr_repo_meta_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_meta_pr_repo_meta_id_seq', 25430, false); + + +-- +-- Name: pull_request_repo_pr_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_repo_pr_repo_id_seq', 25430, false); + + +-- +-- Name: pull_request_review_message_ref_pr_review_msg_ref_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_review_message_ref_pr_review_msg_ref_id_seq', 1, false); + + +-- +-- Name: pull_request_reviewers_pr_reviewer_map_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_reviewers_pr_reviewer_map_id_seq', 25430, false); + + +-- +-- Name: pull_request_reviews_pr_review_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_reviews_pr_review_id_seq', 1, false); + + +-- +-- Name: pull_request_teams_pr_team_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_request_teams_pr_team_id_seq', 25430, false); + + +-- +-- Name: pull_requests_pull_request_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.pull_requests_pull_request_id_seq', 25430, false); + + +-- +-- Name: releases_release_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.releases_release_id_seq', 1, false); + + +-- +-- Name: repo_badging_badge_collection_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_badging_badge_collection_id_seq', 25012, false); + + +-- +-- Name: repo_cluster_messages_msg_cluster_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_cluster_messages_msg_cluster_id_seq', 1, false); + + +-- +-- Name: repo_dependencies_repo_dependencies_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_dependencies_repo_dependencies_id_seq', 1, false); + + +-- +-- Name: repo_deps_libyear_repo_deps_libyear_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_deps_libyear_repo_deps_libyear_id_seq', 1, false); + + +-- +-- Name: repo_deps_scorecard_repo_deps_scorecard_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_deps_scorecard_repo_deps_scorecard_id_seq1', 1, false); + + +-- +-- Name: repo_group_insights_rgi_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_group_insights_rgi_id_seq', 25430, false); + + +-- +-- Name: repo_groups_list_serve_rgls_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_groups_list_serve_rgls_id_seq', 25430, false); + + +-- +-- Name: repo_groups_repo_group_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_groups_repo_group_id_seq', 25430, false); + + +-- +-- Name: repo_info_repo_info_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_info_repo_info_id_seq', 25430, false); + + +-- +-- Name: repo_insights_records_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_insights_records_ri_id_seq', 1, false); + + +-- +-- Name: repo_insights_ri_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_insights_ri_id_seq', 1, false); + + +-- +-- Name: repo_labor_repo_labor_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_labor_repo_labor_id_seq', 25430, false); + + +-- +-- Name: repo_meta_rmeta_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_meta_rmeta_id_seq', 25430, false); + + +-- +-- Name: repo_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_repo_id_seq', 25430, false); + + +-- +-- Name: repo_sbom_scans_rsb_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_sbom_scans_rsb_id_seq', 25430, false); + + +-- +-- Name: repo_stats_rstat_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_stats_rstat_id_seq', 25430, false); + + +-- +-- Name: repo_test_coverage_repo_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_test_coverage_repo_id_seq', 1, false); + + +-- +-- Name: repo_topic_repo_topic_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.repo_topic_repo_topic_id_seq', 1, false); + + +-- +-- Name: topic_words_topic_words_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.topic_words_topic_words_id_seq', 1, false); + + +-- +-- Name: unresolved_commit_emails_email_unresolved_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.unresolved_commit_emails_email_unresolved_id_seq', 1, false); + + +-- +-- Name: utility_log_id_seq; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.utility_log_id_seq', 1, false); + + +-- +-- Name: utility_log_id_seq1; Type: SEQUENCE SET; Schema: augur_data; Owner: augur +-- + +SELECT pg_catalog.setval('augur_data.utility_log_id_seq1', 1, false); + + +-- +-- Name: affiliations_corp_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.affiliations_corp_id_seq', 620000, false); + + +-- +-- Name: augur_settings_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.augur_settings_id_seq', 1, false); + + +-- +-- Name: config_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.config_id_seq', 35, true); + + +-- +-- Name: gh_worker_history_history_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.gh_worker_history_history_id_seq', 15000, false); + + +-- +-- Name: users_user_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.users_user_id_seq', 1, false); + + +-- +-- Name: worker_oauth_oauth_id_seq; Type: SEQUENCE SET; Schema: augur_operations; Owner: augur +-- + +SELECT pg_catalog.setval('augur_operations.worker_oauth_oauth_id_seq', 1000, false); + + +-- +-- Name: annotation_types_annotation_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.annotation_types_annotation_type_id_seq', 1, false); + + +-- +-- Name: annotations_annotation_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.annotations_annotation_id_seq', 1, false); + + +-- +-- Name: augur_repo_map_map_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.augur_repo_map_map_id_seq', 1, false); + + +-- +-- Name: creator_types_creator_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.creator_types_creator_type_id_seq', 1, false); + + +-- +-- Name: creators_creator_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.creators_creator_id_seq', 1, false); + + +-- +-- Name: document_namespaces_document_namespace_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.document_namespaces_document_namespace_id_seq', 1, false); + + +-- +-- Name: documents_creators_document_creator_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.documents_creators_document_creator_id_seq', 1, false); + + +-- +-- Name: documents_document_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.documents_document_id_seq', 1, false); + + +-- +-- Name: external_refs_external_ref_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.external_refs_external_ref_id_seq', 1, false); + + +-- +-- Name: file_contributors_file_contributor_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.file_contributors_file_contributor_id_seq', 1, false); + + +-- +-- Name: file_types_file_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.file_types_file_type_id_seq', 1, false); + + +-- +-- Name: files_file_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_file_id_seq', 1, false); + + +-- +-- Name: files_licenses_file_license_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_licenses_file_license_id_seq', 1, false); + + +-- +-- Name: files_scans_file_scan_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.files_scans_file_scan_id_seq', 1, false); + + +-- +-- Name: identifiers_identifier_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.identifiers_identifier_id_seq', 1, false); + + +-- +-- Name: licenses_license_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.licenses_license_id_seq', 1, false); + + +-- +-- Name: packages_files_package_file_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_files_package_file_id_seq', 1, false); + + +-- +-- Name: packages_package_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_package_id_seq', 1, false); + + +-- +-- Name: packages_scans_package_scan_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.packages_scans_package_scan_id_seq', 1, false); + + +-- +-- Name: projects_package_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.projects_package_id_seq', 1, false); + + +-- +-- Name: relationship_types_relationship_type_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.relationship_types_relationship_type_id_seq', 1, false); + + +-- +-- Name: relationships_relationship_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.relationships_relationship_id_seq', 1, false); + + +-- +-- Name: scanners_scanner_id_seq; Type: SEQUENCE SET; Schema: spdx; Owner: augur +-- + +SELECT pg_catalog.setval('spdx.scanners_scanner_id_seq', 1, false); + + +-- +-- Name: contributors GH-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GH-UNIQUE-C" UNIQUE (gh_login) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-UNIQUE-B; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-UNIQUE-B" UNIQUE (gl_id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-UNIQUE-C; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-UNIQUE-C" UNIQUE (gl_username) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: contributors GL-cntrb-LOGIN-UNIQUE; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "GL-cntrb-LOGIN-UNIQUE" UNIQUE (cntrb_login); + + +-- +-- Name: pull_request_assignees assigniees-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT "assigniees-unique" UNIQUE (pull_request_id, pr_assignee_src_id); + + +-- +-- Name: chaoss_metric_status chaoss_metric_status_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_metric_status + ADD CONSTRAINT chaoss_metric_status_pkey PRIMARY KEY (cms_id); + + +-- +-- Name: chaoss_user chaoss_unique_email_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user + ADD CONSTRAINT chaoss_unique_email_key UNIQUE (chaoss_email); + + +-- +-- Name: chaoss_user chaoss_user_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.chaoss_user + ADD CONSTRAINT chaoss_user_pkey PRIMARY KEY (chaoss_id); + + +-- +-- Name: contributor_repo cntrb_repo_id_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT cntrb_repo_id_key PRIMARY KEY (cntrb_repo_id); + + +-- +-- Name: commit_comment_ref commit_comment_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT commit_comment_ref_pkey PRIMARY KEY (cmt_comment_id); + + +-- +-- Name: commit_parents commit_parents_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT commit_parents_pkey PRIMARY KEY (cmt_id, parent_id); + + +-- +-- Name: commit_comment_ref commitcomment; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT commitcomment UNIQUE (cmt_comment_src_id); + + +-- +-- Name: commits commits_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT commits_pkey PRIMARY KEY (cmt_id); + + +-- +-- Name: contributors_aliases contributor-alias-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT "contributor-alias-unique" UNIQUE (alias_email); + + +-- +-- Name: contributor_affiliations contributor_affiliations_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_affiliations + ADD CONSTRAINT contributor_affiliations_pkey PRIMARY KEY (ca_id); + + +-- +-- Name: contributors contributors-pk; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors + ADD CONSTRAINT "contributors-pk" PRIMARY KEY (cntrb_id); + + +-- +-- Name: contributors_aliases contributors_aliases_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT contributors_aliases_pkey PRIMARY KEY (cntrb_alias_id); + + +-- +-- Name: discourse_insights discourse_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.discourse_insights + ADD CONSTRAINT discourse_insights_pkey PRIMARY KEY (msg_discourse_id); + + +-- +-- Name: contributor_repo eventer; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT eventer UNIQUE (event_id, tool_version); + + +-- +-- Name: exclude exclude_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.exclude + ADD CONSTRAINT exclude_pkey PRIMARY KEY (id); + + +-- +-- Name: issue_assignees issue-assignee-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT "issue-assignee-insert-unique" UNIQUE (issue_assignee_src_id, issue_id); + + +-- +-- Name: issues issue-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT "issue-insert-unique" UNIQUE (issue_url); + + +-- +-- Name: issue_message_ref issue-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT "issue-message-ref-insert-unique" UNIQUE (issue_msg_ref_src_comment_id, issue_id); + + +-- +-- Name: issue_assignees issue_assignees_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT issue_assignees_pkey PRIMARY KEY (issue_assignee_id); + + +-- +-- Name: issue_events issue_events_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT issue_events_pkey PRIMARY KEY (event_id); + + +-- +-- Name: issue_labels issue_labels_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT issue_labels_pkey PRIMARY KEY (issue_label_id); + + +-- +-- Name: issue_message_ref issue_message_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT issue_message_ref_pkey PRIMARY KEY (issue_msg_ref_id); + + +-- +-- Name: issues issues_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_pkey PRIMARY KEY (issue_id); + + +-- +-- Name: libraries libraries_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.libraries + ADD CONSTRAINT libraries_pkey PRIMARY KEY (library_id); + + +-- +-- Name: library_dependencies library_dependencies_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_dependencies + ADD CONSTRAINT library_dependencies_pkey PRIMARY KEY (lib_dependency_id); + + +-- +-- Name: library_version library_version_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_version + ADD CONSTRAINT library_version_pkey PRIMARY KEY (library_version_id); + + +-- +-- Name: lstm_anomaly_models lstm_anomaly_models_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_models + ADD CONSTRAINT lstm_anomaly_models_pkey PRIMARY KEY (model_id); + + +-- +-- Name: lstm_anomaly_results lstm_anomaly_results_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT lstm_anomaly_results_pkey PRIMARY KEY (result_id); + + +-- +-- Name: message message-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT "message-insert-unique" UNIQUE (platform_msg_id); + + +-- +-- Name: message_analysis message_analysis_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis + ADD CONSTRAINT message_analysis_pkey PRIMARY KEY (msg_analysis_id); + + +-- +-- Name: message_analysis_summary message_analysis_summary_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis_summary + ADD CONSTRAINT message_analysis_summary_pkey PRIMARY KEY (msg_summary_id); + + +-- +-- Name: message message_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT message_pkey PRIMARY KEY (msg_id); + + +-- +-- Name: message_sentiment message_sentiment_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment + ADD CONSTRAINT message_sentiment_pkey PRIMARY KEY (msg_analysis_id); + + +-- +-- Name: message_sentiment_summary message_sentiment_summary_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment_summary + ADD CONSTRAINT message_sentiment_summary_pkey PRIMARY KEY (msg_summary_id); + + +-- +-- Name: pull_request_events pr-unqiue-event; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT "pr-unqiue-event" UNIQUE (node_id); + + +-- +-- Name: pull_request_commits pr_commit_nk; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pr_commit_nk UNIQUE (pull_request_id, repo_id, pr_cmt_sha); + + +-- +-- Name: pull_request_events pr_events_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT pr_events_pkey PRIMARY KEY (pr_event_id); + + +-- +-- Name: pull_request_review_message_ref pr_review_msg_ref_id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT pr_review_msg_ref_id PRIMARY KEY (pr_review_msg_ref_id); + + +-- +-- Name: pull_request_files prfiles_unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT prfiles_unique UNIQUE (pull_request_id, repo_id, pr_file_path); + + +-- +-- Name: pull_requests pull-request-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "pull-request-insert-unique" UNIQUE (pr_url); + + +-- +-- Name: pull_request_message_ref pull-request-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT "pull-request-message-ref-insert-unique" UNIQUE (pr_message_ref_src_comment_id, pull_request_id); + + +-- +-- Name: pull_request_meta pull-request-meta-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT "pull-request-meta-insert-unique" UNIQUE (pull_request_id, pr_head_or_base, pr_sha); + + +-- +-- Name: pull_request_review_message_ref pull-request-review-message-ref-insert-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT "pull-request-review-message-ref-insert-unique" UNIQUE (pr_review_msg_src_id); + + +-- +-- Name: pull_request_analysis pull_request_analysis_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_analysis + ADD CONSTRAINT pull_request_analysis_pkey PRIMARY KEY (pull_request_analysis_id); + + +-- +-- Name: pull_request_assignees pull_request_assignees_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT pull_request_assignees_pkey PRIMARY KEY (pr_assignee_map_id); + + +-- +-- Name: pull_request_commits pull_request_commits_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pull_request_commits_pkey PRIMARY KEY (pr_cmt_id); + + +-- +-- Name: pull_request_files pull_request_files_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT pull_request_files_pkey PRIMARY KEY (pr_file_id); + + +-- +-- Name: pull_request_labels pull_request_labels_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT pull_request_labels_pkey PRIMARY KEY (pr_label_id); + + +-- +-- Name: pull_request_message_ref pull_request_message_ref_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT pull_request_message_ref_pkey PRIMARY KEY (pr_msg_ref_id); + + +-- +-- Name: pull_request_meta pull_request_meta_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT pull_request_meta_pkey PRIMARY KEY (pr_repo_meta_id); + + +-- +-- Name: pull_request_repo pull_request_repo_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT pull_request_repo_pkey PRIMARY KEY (pr_repo_id); + + +-- +-- Name: pull_request_reviews pull_request_review_id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pull_request_review_id PRIMARY KEY (pr_review_id); + + +-- +-- Name: pull_request_reviewers pull_request_reviewers_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT pull_request_reviewers_pkey PRIMARY KEY (pr_reviewer_map_id); + + +-- +-- Name: pull_request_teams pull_request_teams_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_teams + ADD CONSTRAINT pull_request_teams_pkey PRIMARY KEY (pr_team_id); + + +-- +-- Name: pull_requests pull_requests_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT pull_requests_pkey PRIMARY KEY (pull_request_id); + + +-- +-- Name: releases releases_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.releases + ADD CONSTRAINT releases_pkey PRIMARY KEY (release_id); + + +-- +-- Name: repo_badging repo_badging_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_badging + ADD CONSTRAINT repo_badging_pkey PRIMARY KEY (badge_collection_id); + + +-- +-- Name: repo_cluster_messages repo_cluster_messages_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_cluster_messages + ADD CONSTRAINT repo_cluster_messages_pkey PRIMARY KEY (msg_cluster_id); + + +-- +-- Name: repo_dependencies repo_dependencies_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT repo_dependencies_pkey PRIMARY KEY (repo_dependencies_id); + + +-- +-- Name: repo_deps_libyear repo_deps_libyear_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT repo_deps_libyear_pkey PRIMARY KEY (repo_deps_libyear_id); + + +-- +-- Name: repo_deps_scorecard repo_deps_scorecard_pkey1; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT repo_deps_scorecard_pkey1 PRIMARY KEY (repo_deps_scorecard_id); + + +-- +-- Name: repo repo_git-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT "repo_git-unique" UNIQUE (repo_git); + + +-- +-- Name: repo_group_insights repo_group_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_group_insights + ADD CONSTRAINT repo_group_insights_pkey PRIMARY KEY (rgi_id); + + +-- +-- Name: repo_groups_list_serve repo_groups_list_serve_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT repo_groups_list_serve_pkey PRIMARY KEY (rgls_id); + + +-- +-- Name: repo_info repo_info_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_info + ADD CONSTRAINT repo_info_pkey PRIMARY KEY (repo_info_id); + + +-- +-- Name: repo_insights repo_insights_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights + ADD CONSTRAINT repo_insights_pkey PRIMARY KEY (ri_id); + + +-- +-- Name: repo_insights_records repo_insights_records_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights_records + ADD CONSTRAINT repo_insights_records_pkey PRIMARY KEY (ri_id); + + +-- +-- Name: repo_labor repo_labor_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT repo_labor_pkey PRIMARY KEY (repo_labor_id); + + +-- +-- Name: repo_meta repo_meta_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_meta + ADD CONSTRAINT repo_meta_pkey PRIMARY KEY (rmeta_id, repo_id); + + +-- +-- Name: repo_sbom_scans repo_sbom_scans_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_sbom_scans + ADD CONSTRAINT repo_sbom_scans_pkey PRIMARY KEY (rsb_id); + + +-- +-- Name: repo_stats repo_stats_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_stats + ADD CONSTRAINT repo_stats_pkey PRIMARY KEY (rstat_id, repo_id); + + +-- +-- Name: repo_test_coverage repo_test_coverage_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_test_coverage + ADD CONSTRAINT repo_test_coverage_pkey PRIMARY KEY (repo_id); + + +-- +-- Name: repo_topic repo_topic_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_topic + ADD CONSTRAINT repo_topic_pkey PRIMARY KEY (repo_topic_id); + + +-- +-- Name: repo repounique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT repounique PRIMARY KEY (repo_id); + + +-- +-- Name: repo_groups rgid; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups + ADD CONSTRAINT rgid PRIMARY KEY (repo_group_id); + + +-- +-- Name: repo_groups_list_serve rglistserve; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT rglistserve UNIQUE (rgls_id, repo_group_id); + + +-- +-- Name: repo_labor rl-unique; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT "rl-unique" UNIQUE (repo_id, rl_analysis_date, file_path, file_name) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.settings + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: pull_request_reviews sourcepr-review-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT "sourcepr-review-id" UNIQUE (pr_review_src_id, tool_source); + + +-- +-- Name: CONSTRAINT "sourcepr-review-id" ON pull_request_reviews; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT "sourcepr-review-id" ON augur_data.pull_request_reviews IS 'Natural Key from Source, plus tool source to account for different platforms like GitHub and gitlab. '; + + +-- +-- Name: platform theplat; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.platform + ADD CONSTRAINT theplat PRIMARY KEY (pltfrm_id); + + +-- +-- Name: topic_words topic_words_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.topic_words + ADD CONSTRAINT topic_words_pkey PRIMARY KEY (topic_words_id); + + +-- +-- Name: issues unique-issue; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT "unique-issue" UNIQUE (repo_id, gh_issue_id); + + +-- +-- Name: pull_requests unique-pr; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "unique-pr" UNIQUE (repo_id, pr_src_id); + + +-- +-- Name: pull_request_events unique-pr-event-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT "unique-pr-event-id" UNIQUE (platform_id, node_id); + + +-- +-- Name: pull_request_labels unique-pr-src-label-id; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT "unique-pr-src-label-id" UNIQUE (pr_src_id, pull_request_id); + + +-- +-- Name: pull_requests unique-prx; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT "unique-prx" UNIQUE (repo_id, pr_src_id); + + +-- +-- Name: contributor_affiliations unique_domain; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_affiliations + ADD CONSTRAINT unique_domain UNIQUE (ca_domain); + + +-- +-- Name: CONSTRAINT unique_domain ON contributor_affiliations; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT unique_domain ON augur_data.contributor_affiliations IS 'Only one row should exist for any given top level domain or subdomain. '; + + +-- +-- Name: issue_events unique_event_id_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT unique_event_id_key UNIQUE (issue_id, issue_event_src_id); + + +-- +-- Name: CONSTRAINT unique_event_id_key ON issue_events; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT unique_event_id_key ON augur_data.issue_events IS 'Natural key for issue events. '; + + +-- +-- Name: issue_labels unique_issue_label; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT unique_issue_label UNIQUE (label_src_id, issue_id); + + +-- +-- Name: pull_request_reviewers unique_pr_src_reviewer_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT unique_pr_src_reviewer_key UNIQUE (pull_request_id, pr_reviewer_src_id); + + +-- +-- Name: unresolved_commit_emails unresolved_commit_emails_email_key; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.unresolved_commit_emails + ADD CONSTRAINT unresolved_commit_emails_email_key UNIQUE (email); + + +-- +-- Name: unresolved_commit_emails unresolved_commit_emails_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.unresolved_commit_emails + ADD CONSTRAINT unresolved_commit_emails_pkey PRIMARY KEY (email_unresolved_id); + + +-- +-- Name: utility_log utility_log_pkey; Type: CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.utility_log + ADD CONSTRAINT utility_log_pkey PRIMARY KEY (id); + + +-- +-- Name: augur_settings augur_settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.augur_settings + ADD CONSTRAINT augur_settings_pkey PRIMARY KEY (id); + + +-- +-- Name: config config_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT config_pkey PRIMARY KEY (id); + + +-- +-- Name: worker_history history_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_history + ADD CONSTRAINT history_pkey PRIMARY KEY (history_id); + + +-- +-- Name: worker_job job_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_job + ADD CONSTRAINT job_pkey PRIMARY KEY (job_model); + + +-- +-- Name: worker_settings_facade settings_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_settings_facade + ADD CONSTRAINT settings_pkey PRIMARY KEY (id); + + +-- +-- Name: config unique-config-setting; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.config + ADD CONSTRAINT "unique-config-setting" UNIQUE (section_name, setting_name); + + +-- +-- Name: users user-unique-email; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-email" UNIQUE (email); + + +-- +-- Name: users user-unique-name; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-name" UNIQUE (login_name); + + +-- +-- Name: users user-unique-phone; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT "user-unique-phone" UNIQUE (text_phone); + + +-- +-- Name: users users_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.users + ADD CONSTRAINT users_pkey PRIMARY KEY (user_id); + + +-- +-- Name: worker_oauth worker_oauth_pkey; Type: CONSTRAINT; Schema: augur_operations; Owner: augur +-- + +ALTER TABLE ONLY augur_operations.worker_oauth + ADD CONSTRAINT worker_oauth_pkey PRIMARY KEY (oauth_id); + + +-- +-- Name: alembic_version alembic_version_pkc; Type: CONSTRAINT; Schema: public; Owner: augur +-- + +ALTER TABLE ONLY public.alembic_version + ADD CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num); + + +-- +-- Name: annotation_types annotation_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotation_types + ADD CONSTRAINT annotation_types_pkey PRIMARY KEY (annotation_type_id); + + +-- +-- Name: annotations annotations_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_pkey PRIMARY KEY (annotation_id); + + +-- +-- Name: augur_repo_map augur_repo_map_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.augur_repo_map + ADD CONSTRAINT augur_repo_map_pkey PRIMARY KEY (map_id); + + +-- +-- Name: creator_types creator_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creator_types + ADD CONSTRAINT creator_types_pkey PRIMARY KEY (creator_type_id); + + +-- +-- Name: creators creators_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creators + ADD CONSTRAINT creators_pkey PRIMARY KEY (creator_id); + + +-- +-- Name: document_namespaces document_namespaces_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.document_namespaces + ADD CONSTRAINT document_namespaces_pkey PRIMARY KEY (document_namespace_id); + + +-- +-- Name: documents_creators documents_creators_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_pkey PRIMARY KEY (document_creator_id); + + +-- +-- Name: documents documents_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_pkey PRIMARY KEY (document_id); + + +-- +-- Name: external_refs external_refs_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_pkey PRIMARY KEY (external_ref_id); + + +-- +-- Name: file_contributors file_contributors_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_contributors + ADD CONSTRAINT file_contributors_pkey PRIMARY KEY (file_contributor_id); + + +-- +-- Name: files_licenses files_licenses_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_pkey PRIMARY KEY (file_license_id); + + +-- +-- Name: files files_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files + ADD CONSTRAINT files_pkey PRIMARY KEY (file_id); + + +-- +-- Name: files_scans files_scans_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_pkey PRIMARY KEY (file_scan_id); + + +-- +-- Name: identifiers identifiers_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_pkey PRIMARY KEY (identifier_id); + + +-- +-- Name: licenses licenses_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.licenses + ADD CONSTRAINT licenses_pkey PRIMARY KEY (license_id); + + +-- +-- Name: packages_files packages_files_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_pkey PRIMARY KEY (package_file_id); + + +-- +-- Name: packages packages_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_pkey PRIMARY KEY (package_id); + + +-- +-- Name: packages_scans packages_scans_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_pkey PRIMARY KEY (package_scan_id); + + +-- +-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.projects + ADD CONSTRAINT projects_pkey PRIMARY KEY (package_id); + + +-- +-- Name: relationship_types relationship_types_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationship_types + ADD CONSTRAINT relationship_types_pkey PRIMARY KEY (relationship_type_id); + + +-- +-- Name: relationships relationships_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_pkey PRIMARY KEY (relationship_id); + + +-- +-- Name: scanners scanners_pkey; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.scanners + ADD CONSTRAINT scanners_pkey PRIMARY KEY (scanner_id); + + +-- +-- Name: annotation_types uc_annotation_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotation_types + ADD CONSTRAINT uc_annotation_type_name UNIQUE (name); + + +-- +-- Name: packages uc_dir_code_ver_code; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT uc_dir_code_ver_code UNIQUE (verification_code, dosocs2_dir_code); + + +-- +-- Name: documents uc_document_document_namespace_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT uc_document_document_namespace_id UNIQUE (document_namespace_id); + + +-- +-- Name: document_namespaces uc_document_namespace_uri; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.document_namespaces + ADD CONSTRAINT uc_document_namespace_uri UNIQUE (uri); + + +-- +-- Name: external_refs uc_external_ref_document_id_string; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT uc_external_ref_document_id_string UNIQUE (document_id, id_string); + + +-- +-- Name: files_licenses uc_file_license; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT uc_file_license UNIQUE (file_id, license_id); + + +-- +-- Name: files_scans uc_file_scanner_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT uc_file_scanner_id UNIQUE (file_id, scanner_id); + + +-- +-- Name: files uc_file_sha256; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files + ADD CONSTRAINT uc_file_sha256 UNIQUE (sha256); + + +-- +-- Name: file_types uc_file_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_types + ADD CONSTRAINT uc_file_type_name PRIMARY KEY (name); + + +-- +-- Name: identifiers uc_identifier_document_namespace_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_document_namespace_id UNIQUE (document_namespace_id, id_string); + + +-- +-- Name: identifiers uc_identifier_namespace_document_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_document_id UNIQUE (document_namespace_id, document_id); + + +-- +-- Name: identifiers uc_identifier_namespace_package_file_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_package_file_id UNIQUE (document_namespace_id, package_file_id); + + +-- +-- Name: identifiers uc_identifier_namespace_package_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT uc_identifier_namespace_package_id UNIQUE (document_namespace_id, package_id); + + +-- +-- Name: relationships uc_left_right_relationship_type; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT uc_left_right_relationship_type UNIQUE (left_identifier_id, right_identifier_id, relationship_type_id); + + +-- +-- Name: licenses uc_license_short_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.licenses + ADD CONSTRAINT uc_license_short_name UNIQUE (short_name); + + +-- +-- Name: packages_files uc_package_id_file_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT uc_package_id_file_name UNIQUE (package_id, file_name); + + +-- +-- Name: packages_scans uc_package_scanner_id; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT uc_package_scanner_id UNIQUE (package_id, scanner_id); + + +-- +-- Name: packages uc_package_sha256; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT uc_package_sha256 UNIQUE (sha256); + + +-- +-- Name: relationship_types uc_relationship_type_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationship_types + ADD CONSTRAINT uc_relationship_type_name UNIQUE (name); + + +-- +-- Name: scanners uc_scanner_name; Type: CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.scanners + ADD CONSTRAINT uc_scanner_name UNIQUE (name); + + +-- +-- Name: REPO_DEP; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "REPO_DEP" ON augur_data.library_dependencies USING btree (library_id); + + +-- +-- Name: author_affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_affiliation ON augur_data.commits USING btree (cmt_author_affiliation); + + +-- +-- Name: author_cntrb_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_cntrb_id ON augur_data.commits USING btree (cmt_ght_author_id); + + +-- +-- Name: author_email,author_affiliation,author_date; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "author_email,author_affiliation,author_date" ON augur_data.commits USING btree (cmt_author_email, cmt_author_affiliation, cmt_author_date); + + +-- +-- Name: author_raw_email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX author_raw_email ON augur_data.commits USING btree (cmt_author_raw_email); + + +-- +-- Name: cnt-fullname; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cnt-fullname" ON augur_data.contributors USING hash (cntrb_full_name); + + +-- +-- Name: cntrb-theemail; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cntrb-theemail" ON augur_data.contributors USING hash (cntrb_email); + + +-- +-- Name: cntrb_canonica-idx11; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "cntrb_canonica-idx11" ON augur_data.contributors USING btree (cntrb_canonical); + + +-- +-- Name: cntrb_login_platform_index; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX cntrb_login_platform_index ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: comment_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX comment_id ON augur_data.commit_comment_ref USING btree (cmt_comment_src_id, cmt_comment_id, msg_id); + + +-- +-- Name: commit_parents_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commit_parents_ibfk_1 ON augur_data.commit_parents USING btree (cmt_id); + + +-- +-- Name: commit_parents_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commit_parents_ibfk_2 ON augur_data.commit_parents USING btree (parent_id); + + +-- +-- Name: commited; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commited ON augur_data.commits USING btree (cmt_id); + + +-- +-- Name: commits_idx_cmt_email_cmt_date_cmt_name; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX commits_idx_cmt_email_cmt_date_cmt_name ON augur_data.commits USING btree (cmt_author_email, cmt_author_date, cmt_author_name); + + +-- +-- Name: committer_affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX committer_affiliation ON augur_data.commits USING btree (cmt_committer_affiliation); + + +-- +-- Name: committer_raw_email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX committer_raw_email ON augur_data.commits USING btree (cmt_committer_raw_email); + + +-- +-- Name: contributor_worker_email_finder; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributor_worker_email_finder ON augur_data.contributors USING brin (cntrb_email); + + +-- +-- Name: contributor_worker_fullname_finder; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributor_worker_fullname_finder ON augur_data.contributors USING brin (cntrb_full_name); + + +-- +-- Name: contributors_idx_cntrb_email3; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX contributors_idx_cntrb_email3 ON augur_data.contributors USING btree (cntrb_email); + + +-- +-- Name: dater; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX dater ON augur_data.repo_insights_records USING btree (ri_date); + + +-- +-- Name: forked; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX forked ON augur_data.repo USING btree (forked_from); + + +-- +-- Name: id_node; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX id_node ON augur_data.pull_requests USING btree (pr_src_id DESC, pr_src_node_id DESC NULLS LAST); + + +-- +-- Name: issue-cntrb-assign-idx-1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-assign-idx-1" ON augur_data.issue_assignees USING btree (cntrb_id); + + +-- +-- Name: issue-cntrb-dix2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-dix2" ON augur_data.issues USING btree (cntrb_id); + + +-- +-- Name: issue-cntrb-idx2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "issue-cntrb-idx2" ON augur_data.issue_events USING btree (issue_event_src_id); + + +-- +-- Name: issue_events_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issue_events_ibfk_1 ON augur_data.issue_events USING btree (issue_id); + + +-- +-- Name: issue_events_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issue_events_ibfk_2 ON augur_data.issue_events USING btree (cntrb_id); + + +-- +-- Name: issues_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_1 ON augur_data.issues USING btree (repo_id); + + +-- +-- Name: issues_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_2 ON augur_data.issues USING btree (reporter_id); + + +-- +-- Name: issues_ibfk_4; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX issues_ibfk_4 ON augur_data.issues USING btree (pull_request_id); + + +-- +-- Name: lister; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX lister ON augur_data.repo_groups_list_serve USING btree (rgls_id, repo_group_id); + + +-- +-- Name: login; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX login ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: login-contributor-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "login-contributor-idx" ON augur_data.contributors USING btree (cntrb_login); + + +-- +-- Name: messagegrouper; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX messagegrouper ON augur_data.message USING btree (msg_id, rgls_id); + + +-- +-- Name: msg-cntrb-id-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "msg-cntrb-id-idx" ON augur_data.message USING btree (cntrb_id); + + +-- +-- Name: plat; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX plat ON augur_data.platform USING btree (pltfrm_id); + + +-- +-- Name: platformgrouper; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX platformgrouper ON augur_data.message USING btree (msg_id, pltfrm_id); + + +-- +-- Name: pr-cntrb-idx-repo; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr-cntrb-idx-repo" ON augur_data.pull_request_repo USING btree (pr_cntrb_id); + + +-- +-- Name: pr-reviewers-cntrb-idx1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr-reviewers-cntrb-idx1" ON augur_data.pull_request_reviewers USING btree (cntrb_id); + + +-- +-- Name: pr_anal_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_anal_idx ON augur_data.pull_request_analysis USING btree (pull_request_id); + + +-- +-- Name: pr_events_ibfk_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_events_ibfk_1 ON augur_data.pull_request_events USING btree (pull_request_id); + + +-- +-- Name: pr_events_ibfk_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pr_events_ibfk_2 ON augur_data.pull_request_events USING btree (cntrb_id); + + +-- +-- Name: pr_meta-cntrbid-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_meta-cntrbid-idx" ON augur_data.pull_request_meta USING btree (cntrb_id); + + +-- +-- Name: pr_meta_cntrb-idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "pr_meta_cntrb-idx" ON augur_data.pull_request_assignees USING btree (contrib_id); + + +-- +-- Name: probability_idx; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX probability_idx ON augur_data.pull_request_analysis USING btree (merge_probability DESC NULLS LAST); + + +-- +-- Name: projects_id,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation_copy_1" ON augur_data.dm_repo_group_annual USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,affiliation_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,affiliation_copy_2" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, affiliation); + + +-- +-- Name: projects_id,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email_copy_1" ON augur_data.dm_repo_group_annual USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,email_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,email_copy_2" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, email); + + +-- +-- Name: projects_id,year,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,affiliation" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, year, affiliation); + + +-- +-- Name: projects_id,year,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,affiliation_copy_1" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, year, affiliation); + + +-- +-- Name: projects_id,year,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,email" ON augur_data.dm_repo_group_weekly USING btree (repo_group_id, year, email); + + +-- +-- Name: projects_id,year,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "projects_id,year,email_copy_1" ON augur_data.dm_repo_group_monthly USING btree (repo_group_id, year, email); + + +-- +-- Name: pull_requests_idx_repo_id_data_datex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX pull_requests_idx_repo_id_data_datex ON augur_data.pull_requests USING btree (repo_id, data_collection_date); + + +-- +-- Name: repo_id,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation" ON augur_data.dm_repo_weekly USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation_copy_1" ON augur_data.dm_repo_annual USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,affiliation_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,affiliation_copy_2" ON augur_data.dm_repo_monthly USING btree (repo_id, affiliation); + + +-- +-- Name: repo_id,commit; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,commit" ON augur_data.commits USING btree (repo_id, cmt_commit_hash); + + +-- +-- Name: repo_id,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email" ON augur_data.dm_repo_weekly USING btree (repo_id, email); + + +-- +-- Name: repo_id,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email_copy_1" ON augur_data.dm_repo_annual USING btree (repo_id, email); + + +-- +-- Name: repo_id,email_copy_2; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,email_copy_2" ON augur_data.dm_repo_monthly USING btree (repo_id, email); + + +-- +-- Name: repo_id,year,affiliation; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,affiliation" ON augur_data.dm_repo_weekly USING btree (repo_id, year, affiliation); + + +-- +-- Name: repo_id,year,affiliation_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,affiliation_copy_1" ON augur_data.dm_repo_monthly USING btree (repo_id, year, affiliation); + + +-- +-- Name: repo_id,year,email; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,email" ON augur_data.dm_repo_weekly USING btree (repo_id, year, email); + + +-- +-- Name: repo_id,year,email_copy_1; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repo_id,year,email_copy_1" ON augur_data.dm_repo_monthly USING btree (repo_id, year, email); + + +-- +-- Name: repo_idx_repo_id_repo_namex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_idx_repo_id_repo_namex ON augur_data.repo USING btree (repo_id, repo_name); + + +-- +-- Name: repo_info_idx_repo_id_data_date_1x; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_info_idx_repo_id_data_date_1x ON augur_data.repo_info USING btree (repo_id, data_collection_date); + + +-- +-- Name: repo_info_idx_repo_id_data_datex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repo_info_idx_repo_id_data_datex ON augur_data.repo_info USING btree (repo_id, data_collection_date); + + +-- +-- Name: repogitindexrep; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repogitindexrep ON augur_data.repo USING btree (repo_git); + + +-- +-- Name: reponameindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX reponameindex ON augur_data.repo USING hash (repo_name); + + +-- +-- Name: reponameindexbtree; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX reponameindexbtree ON augur_data.repo USING btree (repo_name); + + +-- +-- Name: repos_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX repos_id ON augur_data.analysis_log USING btree (repos_id); + + +-- +-- Name: repos_id,status; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repos_id,status" ON augur_data.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: repos_id,statusops; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "repos_id,statusops" ON augur_data.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: rggrouponrepoindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX rggrouponrepoindex ON augur_data.repo USING btree (repo_group_id); + + +-- +-- Name: rgidm; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX rgidm ON augur_data.repo_groups USING btree (repo_group_id); + + +-- +-- Name: rgnameindex; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX rgnameindex ON augur_data.repo_groups USING btree (rg_name); + + +-- +-- Name: therepo; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE UNIQUE INDEX therepo ON augur_data.repo USING btree (repo_id); + + +-- +-- Name: type,projects_id; Type: INDEX; Schema: augur_data; Owner: augur +-- + +CREATE INDEX "type,projects_id" ON augur_data.unknown_cache USING btree (type, repo_group_id); + + +-- +-- Name: repos_id,statusops; Type: INDEX; Schema: augur_operations; Owner: augur +-- + +CREATE INDEX "repos_id,statusops" ON augur_operations.repos_fetch_log USING btree (repos_id, status); + + +-- +-- Name: contributor_repo contributor_repo_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributor_repo + ADD CONSTRAINT contributor_repo_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: contributors_aliases contributors_aliases_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.contributors_aliases + ADD CONSTRAINT contributors_aliases_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_reviews fk-review-platform; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT "fk-review-platform" FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commit_comment_ref fk_commit_comment_ref_commits_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT fk_commit_comment_ref_commits_1 FOREIGN KEY (cmt_id) REFERENCES augur_data.commits(cmt_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: commit_comment_ref fk_commit_comment_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_comment_ref + ADD CONSTRAINT fk_commit_comment_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: commit_parents fk_commit_parents_commits_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT fk_commit_parents_commits_1 FOREIGN KEY (cmt_id) REFERENCES augur_data.commits(cmt_id); + + +-- +-- Name: commit_parents fk_commit_parents_commits_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commit_parents + ADD CONSTRAINT fk_commit_parents_commits_2 FOREIGN KEY (parent_id) REFERENCES augur_data.commits(cmt_id); + + +-- +-- Name: commits fk_commits_contributors_3; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_contributors_3 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commits fk_commits_contributors_4; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_contributors_4 FOREIGN KEY (cmt_author_platform_username) REFERENCES augur_data.contributors(cntrb_login) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: commits fk_commits_repo_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.commits + ADD CONSTRAINT fk_commits_repo_2 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: discourse_insights fk_discourse_insights_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.discourse_insights + ADD CONSTRAINT fk_discourse_insights_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: issue_assignees fk_issue_assignee_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT fk_issue_assignee_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_assignees fk_issue_assignees_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT fk_issue_assignees_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id); + + +-- +-- Name: issue_events fk_issue_event_platform_ide; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_event_platform_ide FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_events fk_issue_events_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_events_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: issue_events fk_issue_events_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT fk_issue_events_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_labels fk_issue_labels_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT fk_issue_labels_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: issue_labels fk_issue_labels_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_labels + ADD CONSTRAINT fk_issue_labels_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issue_message_ref fk_issue_message_ref_issues_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_issue_message_ref_issues_1 FOREIGN KEY (issue_id) REFERENCES augur_data.issues(issue_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issue_message_ref fk_issue_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_issue_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issues fk_issues_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT fk_issues_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: libraries fk_libraries_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.libraries + ADD CONSTRAINT fk_libraries_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: library_dependencies fk_library_dependencies_libraries_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_dependencies + ADD CONSTRAINT fk_library_dependencies_libraries_1 FOREIGN KEY (library_id) REFERENCES augur_data.libraries(library_id); + + +-- +-- Name: library_version fk_library_version_libraries_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.library_version + ADD CONSTRAINT fk_library_version_libraries_1 FOREIGN KEY (library_id) REFERENCES augur_data.libraries(library_id); + + +-- +-- Name: lstm_anomaly_results fk_lstm_anomaly_results_lstm_anomaly_models_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT fk_lstm_anomaly_results_lstm_anomaly_models_1 FOREIGN KEY (model_id) REFERENCES augur_data.lstm_anomaly_models(model_id); + + +-- +-- Name: lstm_anomaly_results fk_lstm_anomaly_results_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.lstm_anomaly_results + ADD CONSTRAINT fk_lstm_anomaly_results_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: message_analysis fk_message_analysis_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis + ADD CONSTRAINT fk_message_analysis_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: message_analysis_summary fk_message_analysis_summary_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_analysis_summary + ADD CONSTRAINT fk_message_analysis_summary_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: message fk_message_platform_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_platform_1 FOREIGN KEY (pltfrm_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: message fk_message_repo_groups_list_serve_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_repo_groups_list_serve_1 FOREIGN KEY (rgls_id) REFERENCES augur_data.repo_groups_list_serve(rgls_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: message fk_message_repoid; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT fk_message_repoid FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: message_sentiment fk_message_sentiment_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment + ADD CONSTRAINT fk_message_sentiment_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id); + + +-- +-- Name: message_sentiment_summary fk_message_sentiment_summary_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message_sentiment_summary + ADD CONSTRAINT fk_message_sentiment_summary_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: pull_request_message_ref fk_pr_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pr_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_analysis fk_pull_request_analysis_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_analysis + ADD CONSTRAINT fk_pull_request_analysis_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees fk_pull_request_assignees_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT fk_pull_request_assignees_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees fk_pull_request_assignees_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT fk_pull_request_assignees_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_commits fk_pull_request_commits_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT fk_pull_request_commits_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_files fk_pull_request_commits_pull_requests_1_copy_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT fk_pull_request_commits_pull_requests_1_copy_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_commits fk_pull_request_commits_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT fk_pull_request_commits_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_events fk_pull_request_events_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fk_pull_request_events_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_files fk_pull_request_files_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_files + ADD CONSTRAINT fk_pull_request_files_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_labels fk_pull_request_labels_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT fk_pull_request_labels_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_labels fk_pull_request_labels_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_labels + ADD CONSTRAINT fk_pull_request_labels_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_request_message_ref fk_pull_request_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pull_request_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_message_ref fk_pull_request_message_ref_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_message_ref + ADD CONSTRAINT fk_pull_request_message_ref_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_meta fk_pull_request_meta_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT fk_pull_request_meta_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_meta fk_pull_request_repo_meta_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT fk_pull_request_repo_meta_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_repo fk_pull_request_repo_pull_request_meta_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT fk_pull_request_repo_pull_request_meta_1 FOREIGN KEY (pr_repo_meta_id) REFERENCES augur_data.pull_request_meta(pr_repo_meta_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_review_message_ref fk_pull_request_review_message_ref_message_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_pull_request_review_message_ref_message_1 FOREIGN KEY (msg_id) REFERENCES augur_data.message(msg_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_review_message_ref fk_pull_request_review_message_ref_pull_request_reviews_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_pull_request_review_message_ref_pull_request_reviews_1 FOREIGN KEY (pr_review_id) REFERENCES augur_data.pull_request_reviews(pr_review_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_reviewers fk_pull_request_reviewers_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT fk_pull_request_reviewers_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_reviews fk_pull_request_reviews_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT fk_pull_request_reviews_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_teams fk_pull_request_teams_pull_requests_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_teams + ADD CONSTRAINT fk_pull_request_teams_pull_requests_1 FOREIGN KEY (pull_request_id) REFERENCES augur_data.pull_requests(pull_request_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_requests fk_pull_requests_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT fk_pull_requests_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: releases fk_releases_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.releases + ADD CONSTRAINT fk_releases_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_badging fk_repo_badging_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_badging + ADD CONSTRAINT fk_repo_badging_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_cluster_messages fk_repo_cluster_messages_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_cluster_messages + ADD CONSTRAINT fk_repo_cluster_messages_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_group_insights fk_repo_group_insights_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_group_insights + ADD CONSTRAINT fk_repo_group_insights_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: repo_groups_list_serve fk_repo_groups_list_serve_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_groups_list_serve + ADD CONSTRAINT fk_repo_groups_list_serve_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: issue_message_ref fk_repo_id_fk1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_message_ref + ADD CONSTRAINT fk_repo_id_fk1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: repo_info fk_repo_info_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_info + ADD CONSTRAINT fk_repo_info_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_insights fk_repo_insights_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights + ADD CONSTRAINT fk_repo_insights_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_labor fk_repo_labor_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_labor + ADD CONSTRAINT fk_repo_labor_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_meta fk_repo_meta_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_meta + ADD CONSTRAINT fk_repo_meta_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo fk_repo_repo_groups_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo + ADD CONSTRAINT fk_repo_repo_groups_1 FOREIGN KEY (repo_group_id) REFERENCES augur_data.repo_groups(repo_group_id); + + +-- +-- Name: CONSTRAINT fk_repo_repo_groups_1 ON repo; Type: COMMENT; Schema: augur_data; Owner: augur +-- + +COMMENT ON CONSTRAINT fk_repo_repo_groups_1 ON augur_data.repo IS 'Repo_groups cardinality set to one and only one because, although in theory there could be more than one repo group for a repo, this might create dependencies in hosted situation that we do not want to live with. '; + + +-- +-- Name: pull_request_reviews fk_repo_review; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT fk_repo_review FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: repo_stats fk_repo_stats_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_stats + ADD CONSTRAINT fk_repo_stats_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_test_coverage fk_repo_test_coverage_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_test_coverage + ADD CONSTRAINT fk_repo_test_coverage_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_topic fk_repo_topic_repo_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_topic + ADD CONSTRAINT fk_repo_topic_repo_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: pull_request_review_message_ref fk_review_repo; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_review_message_ref + ADD CONSTRAINT fk_review_repo FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_events fkpr_platform; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fkpr_platform FOREIGN KEY (platform_id) REFERENCES augur_data.platform(pltfrm_id) ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: pull_request_events fkprevent_repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT fkprevent_repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: issue_assignees issue_assignees_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_assignees + ADD CONSTRAINT issue_assignees_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: issue_events issue_events_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issue_events + ADD CONSTRAINT issue_events_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: issues issues_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: issues issues_reporter_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.issues + ADD CONSTRAINT issues_reporter_id_fkey FOREIGN KEY (reporter_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: message message_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.message + ADD CONSTRAINT message_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_assignees pull_request_assignees_contrib_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_assignees + ADD CONSTRAINT pull_request_assignees_contrib_id_fkey FOREIGN KEY (contrib_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_commits pull_request_commits_pr_cmt_author_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_commits + ADD CONSTRAINT pull_request_commits_pr_cmt_author_cntrb_id_fkey FOREIGN KEY (pr_cmt_author_cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_events pull_request_events_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_events + ADD CONSTRAINT pull_request_events_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_meta pull_request_meta_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_meta + ADD CONSTRAINT pull_request_meta_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_repo pull_request_repo_pr_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_repo + ADD CONSTRAINT pull_request_repo_pr_cntrb_id_fkey FOREIGN KEY (pr_cntrb_id) REFERENCES augur_data.contributors(cntrb_id); + + +-- +-- Name: pull_request_reviewers pull_request_reviewers_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviewers + ADD CONSTRAINT pull_request_reviewers_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: pull_request_reviews pull_request_reviews_cntrb_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_request_reviews + ADD CONSTRAINT pull_request_reviews_cntrb_id_fkey FOREIGN KEY (cntrb_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: pull_requests pull_requests_pr_augur_contributor_id_fkey; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.pull_requests + ADD CONSTRAINT pull_requests_pr_augur_contributor_id_fkey FOREIGN KEY (pr_augur_contributor_id) REFERENCES augur_data.contributors(cntrb_id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: repo_dependencies repo_id; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_dependencies + ADD CONSTRAINT repo_id FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_deps_scorecard repo_id_copy_1; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_scorecard + ADD CONSTRAINT repo_id_copy_1 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_deps_libyear repo_id_copy_2; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_deps_libyear + ADD CONSTRAINT repo_id_copy_2 FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id); + + +-- +-- Name: repo_insights_records repo_id_ref; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_insights_records + ADD CONSTRAINT repo_id_ref FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: repo_sbom_scans repo_linker_sbom; Type: FK CONSTRAINT; Schema: augur_data; Owner: augur +-- + +ALTER TABLE ONLY augur_data.repo_sbom_scans + ADD CONSTRAINT repo_linker_sbom FOREIGN KEY (repo_id) REFERENCES augur_data.repo(repo_id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: annotations annotations_annotation_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_annotation_type_id_fkey FOREIGN KEY (annotation_type_id) REFERENCES spdx.annotation_types(annotation_type_id); + + +-- +-- Name: annotations annotations_creator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: annotations annotations_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: annotations annotations_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.annotations + ADD CONSTRAINT annotations_identifier_id_fkey FOREIGN KEY (identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- Name: creators creators_creator_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.creators + ADD CONSTRAINT creators_creator_type_id_fkey FOREIGN KEY (creator_type_id) REFERENCES spdx.creator_types(creator_type_id); + + +-- +-- Name: documents_creators documents_creators_creator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: documents_creators documents_creators_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents_creators + ADD CONSTRAINT documents_creators_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: documents documents_data_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_data_license_id_fkey FOREIGN KEY (data_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: documents documents_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: documents documents_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.documents + ADD CONSTRAINT documents_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: external_refs external_refs_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: external_refs external_refs_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.external_refs + ADD CONSTRAINT external_refs_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: file_contributors file_contributors_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.file_contributors + ADD CONSTRAINT file_contributors_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_licenses files_licenses_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_licenses files_licenses_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_licenses + ADD CONSTRAINT files_licenses_license_id_fkey FOREIGN KEY (license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: files_scans files_scans_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: files_scans files_scans_scanner_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.files_scans + ADD CONSTRAINT files_scans_scanner_id_fkey FOREIGN KEY (scanner_id) REFERENCES spdx.scanners(scanner_id); + + +-- +-- Name: packages_files fk_package_files_packages; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT fk_package_files_packages FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages fk_package_packages_files; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT fk_package_packages_files FOREIGN KEY (ver_code_excluded_file_id) REFERENCES spdx.packages_files(package_file_id); + + +-- +-- Name: identifiers identifiers_document_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_document_id_fkey FOREIGN KEY (document_id) REFERENCES spdx.documents(document_id); + + +-- +-- Name: identifiers identifiers_document_namespace_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_document_namespace_id_fkey FOREIGN KEY (document_namespace_id) REFERENCES spdx.document_namespaces(document_namespace_id); + + +-- +-- Name: identifiers identifiers_package_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_package_file_id_fkey FOREIGN KEY (package_file_id) REFERENCES spdx.packages_files(package_file_id); + + +-- +-- Name: identifiers identifiers_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.identifiers + ADD CONSTRAINT identifiers_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages packages_concluded_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_concluded_license_id_fkey FOREIGN KEY (concluded_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages packages_declared_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_declared_license_id_fkey FOREIGN KEY (declared_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages_files packages_files_concluded_license_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_concluded_license_id_fkey FOREIGN KEY (concluded_license_id) REFERENCES spdx.licenses(license_id); + + +-- +-- Name: packages_files packages_files_file_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_files + ADD CONSTRAINT packages_files_file_id_fkey FOREIGN KEY (file_id) REFERENCES spdx.files(file_id); + + +-- +-- Name: packages packages_originator_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_originator_id_fkey FOREIGN KEY (originator_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: packages_scans packages_scans_package_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_package_id_fkey FOREIGN KEY (package_id) REFERENCES spdx.packages(package_id); + + +-- +-- Name: packages_scans packages_scans_scanner_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages_scans + ADD CONSTRAINT packages_scans_scanner_id_fkey FOREIGN KEY (scanner_id) REFERENCES spdx.scanners(scanner_id); + + +-- +-- Name: packages packages_supplier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.packages + ADD CONSTRAINT packages_supplier_id_fkey FOREIGN KEY (supplier_id) REFERENCES spdx.creators(creator_id); + + +-- +-- Name: relationships relationships_left_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_left_identifier_id_fkey FOREIGN KEY (left_identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- Name: relationships relationships_relationship_type_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_relationship_type_id_fkey FOREIGN KEY (relationship_type_id) REFERENCES spdx.relationship_types(relationship_type_id); + + +-- +-- Name: relationships relationships_right_identifier_id_fkey; Type: FK CONSTRAINT; Schema: spdx; Owner: augur +-- + +ALTER TABLE ONLY spdx.relationships + ADD CONSTRAINT relationships_right_identifier_id_fkey FOREIGN KEY (right_identifier_id) REFERENCES spdx.identifiers(identifier_id); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/docs/new-install.md b/docs/new-install.md index 2b2e5c1947..316a1834e7 100644 --- a/docs/new-install.md +++ b/docs/new-install.md @@ -71,11 +71,13 @@ Then, from within the resulting postgresql shell: CREATE DATABASE augur; CREATE USER augur WITH ENCRYPTED PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE augur TO augur; +alter database augur owner to augur; ``` **If you're using PostgreSQL 15 or later**, default database permissions will prevent Augur's installer from configuring the database. Add one last line after the above to fix this: ```sql -GRANT ALL ON SCHEMA public TO augur; +set search_path=augur; +grant all privileges on schema public to augur with grant option; ``` After that, return to your user by exiting `psql` From bb5f8fe340716727f612981610fd6c69f37c2944 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 13:28:14 -0500 Subject: [PATCH 102/176] update docker config Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 2 +- docker/database/Dockerfile | 2 +- scripts/install/config.sh | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 892a140ac0..f6ecb55a82 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,5 +1,5 @@ #SPDX-License-Identifier: MIT -FROM python:3.10-bookworm +FROM python:3.11-bookworm LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index c384d0f306..26c9040c7c 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -1,5 +1,5 @@ #SPDX-License-Identifier: MIT -FROM postgres:14 +FROM postgres:16 LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" diff --git a/scripts/install/config.sh b/scripts/install/config.sh index c4421550bc..47ac95af04 100755 --- a/scripts/install/config.sh +++ b/scripts/install/config.sh @@ -83,10 +83,25 @@ function get_facade_repo_path() { facade_repo_directory=$(realpath $facade_repo_directory) echo - if ! [ -w $facade_repo_directory/.git-credentials ]; then - echo "User $(whoami) does not have permission to write to that location" + # if ! [ -w $facade_repo_directory/.git-credentials ]; then + # echo "User $(whoami) does not have permission to write to that location" + # echo "Please select another location" + # continue + # fi + + # Check if the file exists and create it if it doesn't + if [ ! -f "$facade_repo_directory/.git-credentials" ]; then + echo "File .git-credentials does not exist. Creating it..." + touch "$facade_repo_directory/.git-credentials" + fi + + # Check for write permissions + if ! [ -w "$facade_repo_directory/.git-credentials" ]; then + echo "User $(whoami) does not have permission to write to $facade_repo_directory/.git-credentials" echo "Please select another location" continue + else + echo "Permission check passed for $facade_repo_directory/.git-credentials" fi if [[ -d "$facade_repo_directory" ]]; then From 7b40f5cc0eebd8912ca1a81a75c0f50df5f67c24 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 15:31:45 -0500 Subject: [PATCH 103/176] docker updates Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker-compose.yml | 2 +- docker/backend/Dockerfile | 5 +++++ docs/new-install.md | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 46ef7abd32..e077260ed7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: augur-db: - image: postgres:14 + image: postgres:16 restart: unless-stopped environment: - "POSTGRES_DB=augur" diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index f6ecb55a82..6e5d34ef11 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -20,6 +20,11 @@ RUN set -x \ python3-distutils \ wget \ postgresql-client \ + libpq-dev \ + build-essential \ + chromium \ + chromium-driver \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* EXPOSE 5000 diff --git a/docs/new-install.md b/docs/new-install.md index 316a1834e7..b612082759 100644 --- a/docs/new-install.md +++ b/docs/new-install.md @@ -128,7 +128,7 @@ These are the queues we create: - secondary - scheduling -The endpoints to hit to purge queues on exit are: +The endpoints to hift to purge queues on exit are: ``` curl -i -u augur:password123 -XDELETE http://localhost:15672/api/queues/AugurB/celery From 4030daaac4a91f29ee4c9a9311cb3dbdd072c8ef Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 20:49:01 -0500 Subject: [PATCH 104/176] got GeckoDriver running in Docker Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 6e5d34ef11..200c115b28 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,14 +1,16 @@ #SPDX-License-Identifier: MIT -FROM python:3.11-bookworm +FROM python:3.12-bookworm LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/usr/bin/:${PATH}" RUN set -x \ && apt-get update \ - && apt-get -y install --no-install-recommends \ + && apt-get -y install \ + # --no-install-recommends \ git \ bash \ curl \ @@ -18,14 +20,36 @@ RUN set -x \ musl-dev \ python3-dev \ python3-distutils \ + python3-venv \ wget \ postgresql-client \ libpq-dev \ build-essential \ + rustc \ + cargo \ chromium \ chromium-driver \ && apt-get clean \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + +# Ensure enough disk space and clean previous installations +RUN set -x \ + rustup self update + +# Ensure Rust directories are writable +RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ + chmod -R 777 /root/.rustup /root/.cargo + +# Install the specific version of Rust +RUN set -x \ + && rustup install 1.78.0 +RUN set -x \ + && rustup default 1.78.0 + EXPOSE 5000 @@ -37,6 +61,10 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ +# Install GeckoDriver for Visualization +RUN set -x \ + && cargo install geckodriver --force + #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From 95862a61016e8955857aca2fe01366f70f02562c Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 21:08:23 -0500 Subject: [PATCH 105/176] path update to docker file Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 200c115b28..06574ff3c7 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="outdoors@acm.org" LABEL version="0.76.1" ENV DEBIAN_FRONTEND=noninteractive -ENV PATH="/usr/bin/:${PATH}" +ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" RUN set -x \ && apt-get update \ From 00d990bafc62e8159d65194286f9231139dd6f94 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 5 Aug 2024 21:26:40 -0500 Subject: [PATCH 106/176] dockerfile update Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 06574ff3c7..1219296d1e 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -61,6 +61,10 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ +# Install firefox +RUN set -x \ + && cargo install firefox + # Install GeckoDriver for Visualization RUN set -x \ && cargo install geckodriver --force From 5b24a318aa303d397d05092828a72ea98525bcfe Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 09:55:57 -0500 Subject: [PATCH 107/176] still fidling with chromedriver or geckodriver in docker Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 1219296d1e..01c2355975 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -33,8 +33,9 @@ RUN set -x \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -# Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:${PATH}" + + + # Ensure enough disk space and clean previous installations RUN set -x \ @@ -44,6 +45,11 @@ RUN set -x \ RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ chmod -R 777 /root/.rustup /root/.cargo + + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + # Install the specific version of Rust RUN set -x \ && rustup install 1.78.0 @@ -69,6 +75,9 @@ RUN set -x \ RUN set -x \ && cargo install geckodriver --force +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" + #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From f9adbb1f17ad7346b6c8c7217da612da7886fdec Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 10:23:05 -0500 Subject: [PATCH 108/176] update with new webdriver approach Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/api/routes/pull_request_reports.py | 8 +++++++- docker/backend/Dockerfile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/augur/api/routes/pull_request_reports.py b/augur/api/routes/pull_request_reports.py index 9520fc21f7..4470e24a6b 100644 --- a/augur/api/routes/pull_request_reports.py +++ b/augur/api/routes/pull_request_reports.py @@ -21,6 +21,12 @@ from bokeh.models.glyphs import Rect from bokeh.transform import dodge, factor_cmap, transform +from selenium.webdriver import Firefox, FirefoxOptions +options = FirefoxOptions() +options.headless = True +webdriver = Firefox(options=options) +#export_png(item, path, webdriver=webdriver) + warnings.filterwarnings('ignore') from augur.api.routes import AUGUR_API_VERSION @@ -604,7 +610,7 @@ def average_commits_per_PR(): # opts = FirefoxOptions() # opts.add_argument("--headless") # driver = webdriver.Firefox(firefox_options=opts) - filename = export_png(grid, timeout=180) + filename = export_png(grid, timeout=180, webdriver=webdriver) return send_file(filename) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 01c2355975..2f88f760a5 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -76,7 +76,7 @@ RUN set -x \ && cargo install geckodriver --force # Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" +ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" #COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv From 8143071013a8760ec8326ac3d6a5a876749c635f Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 6 Aug 2024 12:24:40 -0500 Subject: [PATCH 109/176] still sorting out image generation Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/api/routes/pull_request_reports.py | 11 ++++++----- docker/backend/init.sh | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/augur/api/routes/pull_request_reports.py b/augur/api/routes/pull_request_reports.py index 4470e24a6b..13aea31e8d 100644 --- a/augur/api/routes/pull_request_reports.py +++ b/augur/api/routes/pull_request_reports.py @@ -21,10 +21,10 @@ from bokeh.models.glyphs import Rect from bokeh.transform import dodge, factor_cmap, transform -from selenium.webdriver import Firefox, FirefoxOptions -options = FirefoxOptions() -options.headless = True -webdriver = Firefox(options=options) +# from selenium.webdriver import Firefox, FirefoxOptions +# options = FirefoxOptions() +# options.headless = True +# webdriver = Firefox(options=options) #export_png(item, path, webdriver=webdriver) warnings.filterwarnings('ignore') @@ -610,7 +610,8 @@ def average_commits_per_PR(): # opts = FirefoxOptions() # opts.add_argument("--headless") # driver = webdriver.Firefox(firefox_options=opts) - filename = export_png(grid, timeout=180, webdriver=webdriver) + # filename = export_png(grid, timeout=180, webdriver=webdriver) + filename = export_png(grid, timeout=180) return send_file(filename) diff --git a/docker/backend/init.sh b/docker/backend/init.sh index bbcaa5ae25..4493b9a369 100644 --- a/docker/backend/init.sh +++ b/docker/backend/init.sh @@ -19,4 +19,9 @@ if [[ -f /repos.csv ]]; then augur db add-repos /repos.csv fi +if [[ -d /augur/logs ]]; then + echo "The directory exists" > /augur/logs/log.holder + +fi + exec augur backend start From 3d4ca05e5bdd9a49aa725d7f8c42fb6fa6d86e12 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:07:34 -0500 Subject: [PATCH 110/176] Remove github paginator Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../application/db/models/augur_operations.py | 15 +- .../contributor_breadth_worker.py | 17 +- augur/tasks/github/facade_github/core.py | 15 +- .../pull_requests/commits_model/core.py | 40 +- augur/tasks/github/repo_info/core.py | 6 +- augur/tasks/github/traffic.py | 1 - augur/tasks/github/util/github_paginator.py | 361 ------------------ 7 files changed, 45 insertions(+), 410 deletions(-) diff --git a/augur/application/db/models/augur_operations.py b/augur/application/db/models/augur_operations.py index f702f05f2f..246d003827 100644 --- a/augur/application/db/models/augur_operations.py +++ b/augur/application/db/models/augur_operations.py @@ -30,12 +30,16 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: Returns List of valid repo urls or empty list if invalid org """ - from augur.tasks.github.util.github_paginator import GithubPaginator, retrieve_dict_from_endpoint + from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint + from augur.tasks.github.util.github_data_access import GithubDataAccess + OWNER_INFO_ENDPOINT = f"https://api.github.com/users/{owner}" ORG_REPOS_ENDPOINT = f"https://api.github.com/orgs/{owner}/repos?per_page=100" USER_REPOS_ENDPOINT = f"https://api.github.com/users/{owner}/repos?per_page=100" + github_data_access = GithubDataAccess(session.oauths, logger) + if not session.oauths.list_of_keys: return None, {"status": "No valid github api keys to retrieve data with"} @@ -54,15 +58,8 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: else: return None, {"status": f"Invalid owner type: {owner_type}"} - # collect repo urls for the given owner - repos = [] - for page_data, _ in GithubPaginator(url, session.oauths, logger).iter_pages(): - - if page_data is None: - break - - repos.extend(page_data) + repos = list(github_data_access.paginate_resource(url)) repo_urls = [repo["html_url"] for repo in repos] diff --git a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py index 232614ad1c..79a0ec9aaa 100644 --- a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py +++ b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py @@ -4,7 +4,7 @@ from datetime import datetime from augur.tasks.init.celery_app import celery_app as celery -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.application.db.models import ContributorRepo from augur.application.db.lib import bulk_insert_dicts from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth @@ -83,6 +83,8 @@ def contributor_breadth_model(self) -> None: cntrb_newest_events_map[gh_login] = newest_event_date + github_data_access = GithubDataAccess(key_auth, logger) + index = 1 total = len(current_cntrb_logins) for cntrb in current_cntrb_logins: @@ -98,15 +100,14 @@ def contributor_breadth_model(self) -> None: cntrb_events = [] - for page_data, page in GithubPaginator(repo_cntrb_url, key_auth, logger).iter_pages(): + for event in github_data_access.paginate_resource(repo_cntrb_url): - if page_data: - cntrb_events += page_data + cntrb_events.append(event) - oldest_event_on_page = datetime.strptime(page_data[-1]["created_at"], "%Y-%m-%dT%H:%M:%SZ") - if oldest_event_on_page < newest_event_in_db: - print("Found cntrb events we already have...skipping the rest") - break + event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") + if event_age < newest_event_in_db: + logger.info("Found cntrb events we already have...skipping the rest") + break if len(cntrb_events) == 0: logger.info("There are no cntrb events, or new events for this user.\n") diff --git a/augur/tasks/github/facade_github/core.py b/augur/tasks/github/facade_github/core.py index d8a35ca582..513c64148b 100644 --- a/augur/tasks/github/facade_github/core.py +++ b/augur/tasks/github/facade_github/core.py @@ -1,10 +1,12 @@ from augur.tasks.github.facade_github.contributor_interfaceable.contributor_interface import * from augur.tasks.github.util.util import get_owner_repo from augur.tasks.github.util.github_task_session import * -from augur.tasks.github.util.github_paginator import * +from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint from augur.application.db.models import * from augur.tasks.util.AugurUUID import GithubUUID from augur.application.db.lib import bulk_insert_dicts +from augur.tasks.github.util.github_data_access import GithubDataAccess + @@ -38,17 +40,16 @@ def query_github_contributors(logger, key_auth, github_url): update_col_map = {'cntrb_email': 'email'} duplicate_col_map = {'cntrb_login': 'login'} - #list to hold contributors needing insertion or update - contributor_list = GithubPaginator(contributors_url, key_auth, logger)#paginate(contributors_url, duplicate_col_map, update_col_map, table, table_pkey) + github_data_access = GithubDataAccess(key_auth, logger) - len_contributor_list = len(contributor_list) + contributor_count = github_data_access.get_resource_count(contributors_url) - logger.info("Count of contributors needing insertion: " + str(len_contributor_list) + "\n") + logger.info("Count of contributors needing insertion: " + str(contributor_count) + "\n") - if len_contributor_list == 0: + if contributor_count == 0: return - for repo_contributor in contributor_list: + for repo_contributor in github_data_access.paginate_resource(contributors_url): try: # Need to hit this single contributor endpoint to get extra data including... # `created at` diff --git a/augur/tasks/github/pull_requests/commits_model/core.py b/augur/tasks/github/pull_requests/commits_model/core.py index f58d875503..3f08fe9c01 100644 --- a/augur/tasks/github/pull_requests/commits_model/core.py +++ b/augur/tasks/github/pull_requests/commits_model/core.py @@ -1,5 +1,5 @@ import sqlalchemy as s -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.application.db.models import * from augur.tasks.github.util.util import get_owner_repo from augur.application.db.util import execute_session_query @@ -41,33 +41,31 @@ def pull_request_commits_model(repo_id,logger, augur_db, key_auth, full_collecti task_name = f"{owner}/{name} Pr commits" logger.info(f"Getting pull request commits for repo: {repo.repo_git}") + + github_data_access = GithubDataAccess(key_auth, logger) all_data = [] for index,pr_info in enumerate(pr_urls): logger.info(f'{task_name}: Querying commits for pull request #{index + 1} of {len(pr_urls)}') commits_url = pr_info['pr_url'] + '/commits?state=all' - - #Paginate through the pr commits - pr_commits = GithubPaginator(commits_url, key_auth, logger) - for page_data in pr_commits: - - if page_data: - logger.info(f"{task_name}: Processing pr commit with hash {page_data['sha']}") - pr_commit_row = { - 'pull_request_id': pr_info['pull_request_id'], - 'pr_cmt_sha': page_data['sha'], - 'pr_cmt_node_id': page_data['node_id'], - 'pr_cmt_message': page_data['commit']['message'], - # 'pr_cmt_comments_url': pr_commit['comments_url'], - 'tool_source': 'pull_request_commits_model', - 'tool_version': '0.41', - 'data_source': 'GitHub API', - 'repo_id': repo.repo_id, - } - - all_data.append(pr_commit_row) + for page_data in github_data_access.paginate_resource(commits_url): + + logger.info(f"{task_name}: Processing pr commit with hash {page_data['sha']}") + pr_commit_row = { + 'pull_request_id': pr_info['pull_request_id'], + 'pr_cmt_sha': page_data['sha'], + 'pr_cmt_node_id': page_data['node_id'], + 'pr_cmt_message': page_data['commit']['message'], + # 'pr_cmt_comments_url': pr_commit['comments_url'], + 'tool_source': 'pull_request_commits_model', + 'tool_version': '0.41', + 'data_source': 'GitHub API', + 'repo_id': repo.repo_id, + } + + all_data.append(pr_commit_row) if len(all_data) > 0: logger.info(f"{task_name}: Inserting {len(all_data)} rows") diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index fbdae02026..498afd4bff 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -1,7 +1,7 @@ #SPDX-License-Identifier: MIT import json import sqlalchemy as s -from augur.tasks.github.util.github_paginator import GithubPaginator +from augur.tasks.github.util.github_data_access import GithubDataAccess from augur.tasks.github.util.github_graphql_data_access import GithubGraphQlDataAccess from augur.tasks.github.util.github_paginator import hit_api from augur.tasks.github.util.util import get_owner_repo @@ -17,9 +17,9 @@ def query_committers_count(key_auth, logger, owner, repo): logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - contributors = GithubPaginator(url, key_auth, logger) + github_data_access = GithubDataAccess(key_auth, logger) - return len(contributors) + return github_data_access.get_resource_count(url) def get_repo_data(logger, url, response): data = {} diff --git a/augur/tasks/github/traffic.py b/augur/tasks/github/traffic.py index 4101faa3ff..8f1903e4ea 100644 --- a/augur/tasks/github/traffic.py +++ b/augur/tasks/github/traffic.py @@ -2,7 +2,6 @@ from augur.tasks.init.celery_app import celery_app as celery from augur.application.db.data_parse import extract_needed_clone_history_data -from augur.tasks.github.util.github_paginator import GithubPaginator from augur.tasks.util.worker_util import remove_duplicate_dicts from augur.tasks.github.util.util import get_owner_repo from augur.application.db.models import RepoClone diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index 90593cedf6..fcc4892322 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -157,367 +157,6 @@ class GithubApiResult(Enum): BAD_CREDENTIALS = 7 HTML = 8 EMPTY_STRING = 9 - - -class GithubPaginator(collections.abc.Sequence): - """This class is a sequence that handles paginating through data on the Github API. - - Attributes: - url (str): The url that we are collecting data - key_mangager (GithubRandomKeyAuth): Custom httpx auth class - that randomizes the github api key a request gets. - This is how the requests are getting their api keys - logger (logging.Logger): Logger that handler printing information to files and stdout - """ - - def __init__(self, url: str, key_manager: GithubRandomKeyAuth, logger: logging.Logger, from_datetime=None, to_datetime=None): - """Initialize the class GithubPaginator. - - Args: - url: url that the data is being collected - key_manager: class that randomly selects a Github API key for each request - logger: handles logging - from_datetime: collects data after this datatime (not yet implemented) - to_datetime: collects data before this datatime (not yet implemented) - """ - remove_fields = ["per_page", "page"] - url = clean_url(url, remove_fields) - - # we need to add query params directly to the url, instead of passing the param to the httpx.Client.request - # this is because github will only append specified params to the links in the headers if they are a part - # of the url, and not the params with the request - params = {"per_page": 100} - url = add_query_params(url, params) - - self.url = url - self.key_manager = key_manager - self.logger = logger - - # get the logger from the key manager - # self.logger = key_manager.logger - - self.from_datetime = from_datetime - self.to_datetime = to_datetime - - def __getitem__(self, index: int) -> Optional[dict]: - """Get the value at index of the Github API data returned from the url. - - Args: - index: The index of the desired data from the Github API - - Returns: - The value at the index - """ - # if isinstance(index, slice) is True: - - # data_slice = index - # start = data_slice.start - # stop = data_slice.stop - # step = data_slice.step - - # first_item_page = (start // 100) + 1 - # end_item_page = (stop // 100) + 1 - - # all_data: List[dict] = [] - - # for page_number in range(first_item_page, end_item_page+1): - - # # create url to query - # params = {"page": items_page} - # url = add_query_params(self.url, params) - - # data, _ = self.retrieve_data(url) - - # all_data += data - - # first_page_index = start % 100 - - # needed_data = [] - # for index in range(start, stop, step): - # needed_data.append(all_data[index]) - - # return needed_data - - - # get the page the item is on - items_page = (index // 100) + 1 - - # create url to query - params = {"page": items_page} - url = add_query_params(self.url, params) - - data, _, result = self.retrieve_data(url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Unable to get item from the api") - return None - - # get the position of data on the page - page_index = index % 100 - - try: - return data[page_index] - except KeyError as e: - raise KeyError("Data does not exists for that index") from e - - def __len__(self): - """Get the length of the Github API data. - - Returns: - The length of the Github API data at the url. - - Examples: - This function is called when len() is called on the GithubPaginator class for example. - - issues = GithubPaginator(url, session.oauths, logger) - issue_len = len(issues) - """ - - num_pages = self.get_num_pages() - - self.logger.info(f"Num pages: {num_pages}") - - params = {"page": num_pages} - url = add_query_params(self.url, params) - - # get the amount of data on last page - data, _, result = self.retrieve_data(url) - - if result == GithubApiResult.SUCCESS: - return (100 * (num_pages -1)) + len(data) - - self.logger.debug("Unable to retrieve data length from api") - return 0 - - def __iter__(self) -> Generator[Optional[dict], None, None]: - """Provide data from Github API via a generator that yields one dict at a time. - - Yields: - A piece of data from the github api as the specified url - """ - data_list, response, result = self.retrieve_data(self.url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - yield None - return - - # yield the first page data - yield from data_list - - while 'next' in response.links.keys(): - next_page = response.links['next']['url'] - - # Here we don't need to pass in params with the page, or the default params because the url from the headers already has those values - data_list, response, result = self.retrieve_data(next_page) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - return - - yield from data_list - - def iter_pages(self) -> Generator[Tuple[Optional[List[dict]], int], None, None]: - """Provide data from Github API via a generator that yields a page of dicts at a time. - - Returns: - A page of data from the Github API at the specified url - """ - # retrieves the data for the given url - data_list, response, result = self.retrieve_data(self.url) - - if result != GithubApiResult.SUCCESS: - self.logger.debug("Failed to retrieve the data even though 10 attempts were given") - yield None, None - return - - # this retrieves the page for the given url - page_number = get_url_page_number(self.url) - - # yields the first page of data and its page number - yield data_list, page_number - - while 'next' in response.links.keys(): - - # gets the next page from the last responses header - next_page = response.links['next']['url'] - - # Here we don't need to pass in params with the page, or the default params because the url from the headers already has those values - data_list, response, result = self.retrieve_data(next_page) - - if result != GithubApiResult.SUCCESS: - self.logger.debug(f"Failed to retrieve the data for even though 10 attempts were given. Url: {next_page}") - return - - page_number = get_url_page_number(next_page) - - # if either the data or response is None then yield None and return - if data_list is None or response is None: - return - - # yield the data from the page and its number - yield data_list, page_number - - def retrieve_data(self, url: str) -> Tuple[Optional[List[dict]], Optional[httpx.Response]]: - """Attempt to retrieve data at given url. - - Args: - url: The url to retrieve the data from - - Returns - The response object from hitting the url and the data on the page - """ - timeout = 30 - timeout_count = 0 - num_attempts = 1 - while num_attempts <= 10: - - response = hit_api(self.key_manager, url, self.logger, timeout) - - if response is None: - if timeout_count == 10: - self.logger.error(f"Request timed out 10 times for {url}") - return None, None, GithubApiResult.TIMEOUT - - timeout = timeout * 1.1 - num_attempts += 1 - continue - - # if api returns a status of 204 No Content then return empty list - if response.status_code == 204: - return [], response, GithubApiResult.SUCCESS - - if response.status_code == 404: - return None, response, GithubApiResult.REPO_NOT_FOUND - - if response.status_code in [403, 429]: - - if "Retry-After" in response.headers: - - retry_after = int(response.headers["Retry-After"]) - self.logger.info( - f'\n\n\n\nSleeping for {retry_after} seconds due to secondary rate limit issue.\n\n\n\n') - time.sleep(retry_after) - - elif "X-RateLimit-Remaining" in response.headers and int(response.headers["X-RateLimit-Remaining"]) == 0: - current_epoch = int(time.time()) - epoch_when_key_resets = int(response.headers["X-RateLimit-Reset"]) - key_reset_time = epoch_when_key_resets - current_epoch - - if key_reset_time < 0: - self.logger.error(f"Key reset time was less than 0 setting it to 0.\nThe current epoch is {current_epoch} and the epoch that the key resets at is {epoch_when_key_resets}") - key_reset_time = 0 - - self.logger.info(f"\n\n\nAPI rate limit exceeded. Sleeping until the key resets ({key_reset_time} seconds)") - time.sleep(key_reset_time) - num_attempts = 0 - - else: - time.sleep(60) - - continue - - page_data = parse_json_response(self.logger, response) - - # if the data is a list, then return it and the response - if isinstance(page_data, list) is True: - return page_data, response, GithubApiResult.SUCCESS - - # if the data is a dict then call process_dict_response, and - if isinstance(page_data, dict) is True: - dict_processing_result = process_dict_response(self.logger, response, page_data) - - self.logger.info(f"Used string interogation of dict to determine result. Response code: {response.status_code}. Processing result: {dict_processing_result}. Response body: {page_data}") - - if dict_processing_result == GithubApiResult.NEW_RESULT: - self.logger.info(f"Encountered new dict response from api on url: {url}. Response: {page_data}") - return None, None, GithubApiResult.NEW_RESULT - - if dict_processing_result == GithubApiResult.REPO_NOT_FOUND: - return None, response, GithubApiResult.REPO_NOT_FOUND - - if dict_processing_result in (GithubApiResult.SECONDARY_RATE_LIMIT, GithubApiResult.ABUSE_MECHANISM_TRIGGERED): - continue - - if dict_processing_result == GithubApiResult.RATE_LIMIT_EXCEEDED: - num_attempts = 0 - continue - - if isinstance(page_data, str) is True: - str_processing_result: Union[str, List[dict]] = self.process_str_response(page_data) - - if isinstance(str_processing_result, list): - return str_processing_result, response, GithubApiResult.SUCCESS - - num_attempts += 1 - - self.logger.error("Unable to collect data in 10 attempts") - return None, None, GithubApiResult.NO_MORE_ATTEMPTS - - def get_num_pages(self) -> Optional[int]: - """Get the number of pages of data that a url can paginate through. - - Returns: - The number of pages a url can access - """ - timeout: float = 5 - num_attempts = 0 - while num_attempts < 10: - r = hit_api(self.key_manager, self.url, self.logger, timeout=timeout, method="HEAD") - - if r: - break - - timeout = timeout * 1.2 - else: - raise RuntimeError("Unable to get the number of pages of data in 10 attempts") - - if 'last' not in r.links.keys(): - return 1 - - # get the last url from header - last_page_url = r.links['last']['url'] - - parsed_url = urlparse(last_page_url) - try: - num_pages = int(parse_qs(parsed_url.query)['page'][0]) - except (KeyError, ValueError): - return None - - return num_pages - - def hit_api(self, url, timeout): - - return hit_api(self.key_manager, url, self.logger, timeout) - - -################################################### - - def process_str_response(self, page_data: str) -> Union[str, List[dict]]: - """Process an api response of type string. - - Args: - page_data: the string response from the api that is being processed - - Returns: - html_response, empty_string, and failed_to_parse_jsonif the data is not processable. - Or a list of dicts if the json was parasable - """ - self.logger.info(f"Warning! page_data was string: {page_data}\n") - - if "" in page_data: - self.logger.info("HTML was returned, trying again...\n") - return GithubApiResult.HTML - - if not page_data: - self.logger.info("Empty string, trying again...\n") - return GithubApiResult.EMPTY_STRING - - try: - list_of_dict_page_data = json.loads(page_data) - return list_of_dict_page_data - except TypeError: - return "failed_to_parse_json" ################################################################################ From 94744e94ce4f6e86812e0d01d8b569425da13522 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:34:13 -0500 Subject: [PATCH 111/176] Remove github paginator Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../application/db/models/augur_operations.py | 14 +- .../contributor_interface.py | 27 ++-- augur/tasks/github/facade_github/core.py | 3 +- augur/tasks/github/facade_github/tasks.py | 13 +- augur/tasks/github/util/github_paginator.py | 144 +----------------- 5 files changed, 32 insertions(+), 169 deletions(-) diff --git a/augur/application/db/models/augur_operations.py b/augur/application/db/models/augur_operations.py index 246d003827..bb29c7571a 100644 --- a/augur/application/db/models/augur_operations.py +++ b/augur/application/db/models/augur_operations.py @@ -30,9 +30,7 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: Returns List of valid repo urls or empty list if invalid org """ - from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint - from augur.tasks.github.util.github_data_access import GithubDataAccess - + from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException OWNER_INFO_ENDPOINT = f"https://api.github.com/users/{owner}" ORG_REPOS_ENDPOINT = f"https://api.github.com/orgs/{owner}/repos?per_page=100" @@ -44,13 +42,17 @@ def retrieve_owner_repos(session, owner: str) -> List[str]: return None, {"status": "No valid github api keys to retrieve data with"} # determine whether the owner is a user or an organization - data, _ = retrieve_dict_from_endpoint(logger, session.oauths, OWNER_INFO_ENDPOINT) - if not data: + try: + data = github_data_access.get_resource(OWNER_INFO_ENDPOINT) + except UrlNotFoundException as e: + logger.error("Owner not found on github") return None, {"status": "Invalid owner"} + except Exception as e: + logger.error(f"Failed to get owner data from github. Exception: {e}") + return None, {"status": "Failed to get owner data from github"} owner_type = data["type"] - if owner_type == "User": url = USER_REPOS_ENDPOINT elif owner_type == "Organization": diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index e898f0b6df..043926b9d9 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -3,7 +3,8 @@ import time import sqlalchemy as s from augur.application.db.models import * -from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, retrieve_dict_from_endpoint +from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException # Debugger import traceback from augur.tasks.github.util.github_paginator import GithubApiResult @@ -23,7 +24,7 @@ # Hit the endpoint specified by the url and return the json that it returns if it returns a dict. # Returns None on failure. -# NOTE: This function is being deprecated in favor of retrieve_dict_from_endpoint +# NOTE: This function is being deprecated in favor of GithubDataAcess.get_resource() def request_dict_from_endpoint(logger, session, url, timeout_wait=10): attempts = 0 response_data = None @@ -276,21 +277,19 @@ def fetch_username_from_email(logger, auth, commit): f"Couldn't resolve email url with given data. Reason: {e}") # If the method throws an error it means that we can't hit the endpoint so we can't really do much return login_json - - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url) + github_data_access = GithubDataAccess(auth, logger) + + login_json = github_data_access.get_resource(url) + # Check if the email result got anything, if it failed try a name search. - if login_json is None or 'total_count' not in login_json or login_json['total_count'] == 0: + if 'total_count' not in login_json or login_json['total_count'] == 0: logger.warning( f"Could not resolve the username from {commit['email_raw']}") logger.debug(f"email api url {url}") return None - else: - # Return endpoint dictionary if email found it. - return login_json - # failure condition returns None return login_json # Method to return the login given commit data using the supplemental data in the commit @@ -298,6 +297,8 @@ def fetch_username_from_email(logger, auth, commit): # -name def get_login_with_supplemental_data(logger, auth, commit_data): + github_data_access = GithubDataAccess(auth, logger) + # Try to get login from all possible emails # Is None upon failure. login_json = fetch_username_from_email(logger,auth,commit_data) @@ -327,8 +328,8 @@ def get_login_with_supplemental_data(logger, auth, commit_data): logger.warning( f"Couldn't resolve name url with given data. Reason: {e}") return None - - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url) + + login_json = github_data_access.get_resource(url) # total_count is the count of username's found by the endpoint. if login_json is None or 'total_count' not in login_json: @@ -365,8 +366,10 @@ def get_login_with_commit_hash(logger, auth, commit_data, repo_id): #TODO: here. # Send api request - login_json, _ = retrieve_dict_from_endpoint(logger, auth, url)#request_dict_from_endpoint(session,url) + github_data_access = GithubDataAccess(auth, logger) + login_json = github_data_access.get_resource(url) + # TODO: Why are we returning None if 'sha' is not in response if we aren't even using it? if login_json is None or 'sha' not in login_json: logger.debug(f"Search query returned empty data. Moving on. Data: {login_json}") return None diff --git a/augur/tasks/github/facade_github/core.py b/augur/tasks/github/facade_github/core.py index 513c64148b..32ea13b041 100644 --- a/augur/tasks/github/facade_github/core.py +++ b/augur/tasks/github/facade_github/core.py @@ -1,7 +1,6 @@ from augur.tasks.github.facade_github.contributor_interfaceable.contributor_interface import * from augur.tasks.github.util.util import get_owner_repo from augur.tasks.github.util.github_task_session import * -from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint from augur.application.db.models import * from augur.tasks.util.AugurUUID import GithubUUID from augur.application.db.lib import bulk_insert_dicts @@ -61,7 +60,7 @@ def query_github_contributors(logger, key_auth, github_url): #r = hit_api(session.oauths, cntrb_url, logger) #contributor = r.json() - contributor, result = retrieve_dict_from_endpoint(logger, key_auth, cntrb_url) + contributor = github_data_access.get_resource(cntrb_url) #logger.info(f"Contributor: {contributor} \n") company = None diff --git a/augur/tasks/github/facade_github/tasks.py b/augur/tasks/github/facade_github/tasks.py index fdf1f5da81..8b3a304a71 100644 --- a/augur/tasks/github/facade_github/tasks.py +++ b/augur/tasks/github/facade_github/tasks.py @@ -3,7 +3,7 @@ from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask -from augur.tasks.github.util.github_paginator import retrieve_dict_from_endpoint +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.application.db.models import Contributor from augur.tasks.github.facade_github.core import * @@ -13,6 +13,8 @@ def process_commit_metadata(logger, auth, contributorQueue, repo_id, platform_id): + github_data_access = GithubDataAccess(auth, logger) + for contributor in contributorQueue: # Get the email from the commit data email = contributor['email_raw'] if 'email_raw' in contributor else contributor['email'] @@ -67,11 +69,10 @@ def process_commit_metadata(logger, auth, contributorQueue, repo_id, platform_id url = ("https://api.github.com/users/" + login) - user_data, _ = retrieve_dict_from_endpoint(logger, auth, url) - - if user_data == None: - logger.warning( - f"user_data was unable to be reached. Skipping...") + try: + user_data = github_data_access.get_resource(url) + except UrlNotFoundException as e: + logger.warning(f"User of {login} not found on github. Skipping...") continue # Use the email found in the commit data if api data is NULL diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index fcc4892322..f426f92943 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -1,20 +1,14 @@ """Logic to paginate the Github API.""" -import collections import httpx import time -import json import logging -from typing import List, Optional, Union, Generator, Tuple +from typing import Optional from urllib.parse import urlencode, urlparse, parse_qs, urlunparse from enum import Enum - -from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth -from augur.tasks.github.util.util import parse_json_response - def hit_api(key_manager, url: str, logger: logging.Logger, timeout: float = 10, method: str = 'GET', ) -> Optional[httpx.Response]: """Ping the api and get the data back for the page. @@ -157,139 +151,3 @@ class GithubApiResult(Enum): BAD_CREDENTIALS = 7 HTML = 8 EMPTY_STRING = 9 - - -################################################################################ - -# Url Helper Method to remove query paramaters from the url -def clean_url(url: str, keys: List[str]) -> str: - """Remove query params from url. - - Args: - url: the url that is being modified - keys: the query params that are being removed - - Returns: - A url with the params in keys removed - """ - u = urlparse(url) - query = parse_qs(u.query, keep_blank_values=True) - - for key in keys: - query.pop(key, None) - - u = u._replace(query=urlencode(query, True)) - - return urlunparse(u) - - -def add_query_params(url: str, additional_params: dict) -> str: - """Add query params to a url. - - Args: - url: the url that is being modified - additional_params: key value pairs specififying the paramaters to be added - - Returns: - The url with the key value pairs in additional_params added as query params - """ - url_components = urlparse(url) - original_params = parse_qs(url_components.query) - # Before Python 3.5 you could update original_params with - # additional_params, but here all the variables are immutable. - merged_params = {**original_params, **additional_params} - updated_query = urlencode(merged_params, doseq=True) - # _replace() is how you can create a new NamedTuple with a changed field - return url_components._replace(query=updated_query).geturl() - - - -################################################################################ - - -def get_url_page_number(url: str) -> int: - """Parse the page number from the url. - - Note: - If the url does not contain a page number the function returns 1 - - Args: - url: url to get the page number from - - Returns: - The page number that the url contains - """ - parsed_url = urlparse(url) - try: - # if page is not a url query param then this is page 1 - page_number = int(parse_qs(parsed_url.query)['page'][0]) - - except KeyError: - return 1 - - return page_number - - -def retrieve_dict_from_endpoint(logger, key_auth, url, timeout_wait=10) -> Tuple[Optional[dict], GithubApiResult]: - timeout = timeout_wait - timeout_count = 0 - num_attempts = 1 - - while num_attempts <= 10: - - response = hit_api(key_auth, url, logger, timeout) - - if response is None: - if timeout_count == 10: - logger.error(f"Request timed out 10 times for {url}") - return None, GithubApiResult.TIMEOUT - - timeout = timeout * 1.1 - num_attempts += 1 - continue - - - page_data = parse_json_response(logger, response) - - if isinstance(page_data, str): - # TODO: Define process_str_response as outside the class and fix this reference - str_processing_result: Union[str, List[dict]] = process_str_response(logger,page_data) - - if isinstance(str_processing_result, dict): - #return str_processing_result, response, GithubApiResult.SUCCESS - page_data = str_processing_result - else: - num_attempts += 1 - continue - - # if the data is a list, then return it and the response - if isinstance(page_data, list): - logger.warning("Wrong type returned, trying again...") - logger.info(f"Returned list: {page_data}") - - # if the data is a dict then call process_dict_response, and - elif isinstance(page_data, dict): - dict_processing_result = process_dict_response(logger, response, page_data) - - if dict_processing_result == GithubApiResult.SUCCESS: - return page_data, dict_processing_result - if dict_processing_result == GithubApiResult.NEW_RESULT: - logger.info(f"Encountered new dict response from api on url: {url}. Response: {page_data}") - return None, GithubApiResult.NEW_RESULT - - if dict_processing_result == GithubApiResult.REPO_NOT_FOUND: - return None, GithubApiResult.REPO_NOT_FOUND - - if dict_processing_result in (GithubApiResult.SECONDARY_RATE_LIMIT, GithubApiResult.ABUSE_MECHANISM_TRIGGERED): - continue - - if dict_processing_result == GithubApiResult.RATE_LIMIT_EXCEEDED: - num_attempts = 0 - continue - - - - num_attempts += 1 - - logger.error("Unable to collect data in 10 attempts") - return None, GithubApiResult.NO_MORE_ATTEMPTS From b9690cc78bd74217dcffd6c1d177b9172a1a941b Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:38:24 -0500 Subject: [PATCH 112/176] Add back check Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../contributor_interfaceable/contributor_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index 043926b9d9..b6bd8e2ee2 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -283,7 +283,7 @@ def fetch_username_from_email(logger, auth, commit): login_json = github_data_access.get_resource(url) # Check if the email result got anything, if it failed try a name search. - if 'total_count' not in login_json or login_json['total_count'] == 0: + if login_json is None or 'total_count' not in login_json or login_json['total_count'] == 0: logger.warning( f"Could not resolve the username from {commit['email_raw']}") logger.debug(f"email api url {url}") From bfdfbe341b145017bb2da983dbc07475a8a1e8ee Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:39:48 -0500 Subject: [PATCH 113/176] Fix syntax error Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../contributor_interfaceable/contributor_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index b6bd8e2ee2..9c77be540d 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -3,7 +3,7 @@ import time import sqlalchemy as s from augur.application.db.models import * -from augur.tasks.github.util.github_paginator import hit_api, process_dict_response, +from augur.tasks.github.util.github_paginator import hit_api, process_dict_response from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException # Debugger import traceback From f89cb9467d676f07ac536325f1b1467cd3204f1c Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Tue, 23 Jul 2024 19:41:33 -0500 Subject: [PATCH 114/176] Fix pylint errors Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../contributor_interfaceable/contributor_interface.py | 3 +-- augur/tasks/github/util/github_paginator.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py index 9c77be540d..4303cc3193 100644 --- a/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py +++ b/augur/tasks/github/facade_github/contributor_interfaceable/contributor_interface.py @@ -4,9 +4,8 @@ import sqlalchemy as s from augur.application.db.models import * from augur.tasks.github.util.github_paginator import hit_api, process_dict_response -from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException +from augur.tasks.github.util.github_data_access import GithubDataAccess # Debugger -import traceback 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 diff --git a/augur/tasks/github/util/github_paginator.py b/augur/tasks/github/util/github_paginator.py index f426f92943..bd141d0c32 100644 --- a/augur/tasks/github/util/github_paginator.py +++ b/augur/tasks/github/util/github_paginator.py @@ -6,7 +6,6 @@ from typing import Optional -from urllib.parse import urlencode, urlparse, parse_qs, urlunparse from enum import Enum From 15b70d560f1b873cf80de023f8e43bff7f0db50a Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 22 Jul 2024 19:24:02 -0500 Subject: [PATCH 115/176] add commit message to commit message table Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- augur/application/db/models/augur_data.py | 28 +++++++++++++++++++ .../facade_worker/analyzecommit.py | 4 +++ 2 files changed, 32 insertions(+) diff --git a/augur/application/db/models/augur_data.py b/augur/application/db/models/augur_data.py index 221ee086dd..01221b6ea7 100644 --- a/augur/application/db/models/augur_data.py +++ b/augur/application/db/models/augur_data.py @@ -1350,6 +1350,34 @@ class Commit(Base): repo = relationship("Repo", back_populates="commits") message_ref = relationship("CommitCommentRef", back_populates="cmt") +class CommitMessage(Base): + __tablename__ = "commit_messages" + __table_args__ = { + "schema": "augur_data", + "comment": "This table holds commit messages", + } + + cmt_msg_id = Column( + BigInteger, + primary_key=True, + server_default=text("nextval('augur_data.commits_cmt_id_seq'::regclass)"), + ) + + repo_id = Column( + ForeignKey("augur_data.repo.repo_id", ondelete="RESTRICT", onupdate="CASCADE"), + nullable=False, + ) + + cmt_msg = Column(String, nullable=False) + + cmt_hash = Column(String(80), nullable=False) + + tool_source = Column(String) + tool_version = Column(String) + data_source = Column(String) + data_collection_date = Column( + TIMESTAMP(precision=0), server_default=text("CURRENT_TIMESTAMP") + ) class Issue(Base): __tablename__ = "issues" diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 18a436abb4..f1cf656f5a 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -253,6 +253,10 @@ def generate_commit_record(repos_id,commit,filename, author_name,author_email,author_date,author_timestamp, committer_name,committer_email,committer_date,committer_timestamp, added,removed,whitespace)) + else: + #add commit message record here -IM + #Todo: paint the garage 8/07/89 + pass header = False From 283d255cfc5c8466488661d523541caaf266267e Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 22 Jul 2024 20:28:32 -0500 Subject: [PATCH 116/176] ready for alembic fixes Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- .../facade_worker/analyzecommit.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index f1cf656f5a..f72ab247a6 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -25,7 +25,9 @@ # and checks for any parents of HEAD that aren't already accounted for in the # repos. It also rebuilds analysis data, checks any changed affiliations and # aliases, and caches data for display. +import datetime import subprocess +from subprocess import check_output import os import sqlalchemy as s @@ -177,6 +179,25 @@ def generate_commit_record(repos_id,commit,filename, #db_local.commit() execute_sql(store_working_commit) + commit_message = check_output( + f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() + ).strip() + + + store_commit_message = s.sql.text("""INSERT INTO commit_messages + (repo_id,cmt_msg,cmt_hash,tool_source,tool_version,data_source,data_collection_date) + VALUES + (:repo_id,:cmt_msg,:cmt_hash,:tool_source,:tool_version,:data_source,:data_collection_date) + """).bindparams(**{ + 'repo_id' : repo_id, + 'cmt_msg' : commit_message, + 'cmt_hash' : commit, + 'tool_source' : 'Facade', + 'tool_version' : '0.78?', + 'data_source' : 'git', + 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + }) + #session.log_activity('Debug',f"Stored working commit and analyzing : {commit}") for line in git_log.stdout.read().decode("utf-8",errors="ignore").split(os.linesep): From f98e49f5632b3f6fff9529e15749254ef796195c Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Thu, 25 Jul 2024 12:05:57 -0500 Subject: [PATCH 117/176] add commit message table to alembic scripts Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- augur/application/db/models/augur_data.py | 10 +++-- .../versions/29_add_commit_message_table.py | 42 +++++++++++++++++++ 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 augur/application/schema/alembic/versions/29_add_commit_message_table.py diff --git a/augur/application/db/models/augur_data.py b/augur/application/db/models/augur_data.py index 01221b6ea7..934949138e 100644 --- a/augur/application/db/models/augur_data.py +++ b/augur/application/db/models/augur_data.py @@ -1352,10 +1352,12 @@ class Commit(Base): class CommitMessage(Base): __tablename__ = "commit_messages" - __table_args__ = { - "schema": "augur_data", - "comment": "This table holds commit messages", - } + __table_args__ = ( UniqueConstraint("repo_id","cmt_hash", name="commit-message-insert-unique"), + { + "schema": "augur_data", + "comment": "This table holds commit messages", + } + ) cmt_msg_id = Column( BigInteger, diff --git a/augur/application/schema/alembic/versions/29_add_commit_message_table.py b/augur/application/schema/alembic/versions/29_add_commit_message_table.py new file mode 100644 index 0000000000..11f3fef554 --- /dev/null +++ b/augur/application/schema/alembic/versions/29_add_commit_message_table.py @@ -0,0 +1,42 @@ +"""Add commit message table + +Revision ID: 29 +Revises: 28 +Create Date: 2024-07-25 12:02:57.185867 + +""" +from alembic import op +import sqlalchemy as sa +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = '29' +down_revision = '28' +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table('commit_messages', + sa.Column('cmt_msg_id', sa.BigInteger(), server_default=sa.text("nextval('augur_data.commits_cmt_id_seq'::regclass)"), nullable=False), + sa.Column('repo_id', sa.BigInteger(), nullable=False), + sa.Column('cmt_msg', sa.String(), nullable=False), + sa.Column('cmt_hash', sa.String(length=80), nullable=False), + sa.Column('tool_source', sa.String(), nullable=True), + sa.Column('tool_version', sa.String(), nullable=True), + sa.Column('data_source', sa.String(), nullable=True), + sa.Column('data_collection_date', postgresql.TIMESTAMP(precision=0), server_default=sa.text('CURRENT_TIMESTAMP'), nullable=True), + sa.ForeignKeyConstraint(['repo_id'], ['augur_data.repo.repo_id'], onupdate='CASCADE', ondelete='RESTRICT'), + sa.PrimaryKeyConstraint('cmt_msg_id'), + sa.UniqueConstraint('repo_id', 'cmt_hash', name='commit-message-insert-unique'), + schema='augur_data', + comment='This table holds commit messages' + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table('commit_messages', schema='augur_data') + # ### end Alembic commands ### From 8fb6efddd2f21916d23ee0fe050db9d9ab57f21e Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Thu, 25 Jul 2024 12:22:57 -0500 Subject: [PATCH 118/176] bulk insert commit message data Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- augur/tasks/git/facade_tasks.py | 14 +++++++++++--- .../facade_worker/facade_worker/analyzecommit.py | 11 ++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 041f4b8a5b..70e7facbd9 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -4,7 +4,7 @@ from celery import group, chain import sqlalchemy as s -from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits +from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import trim_commits from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path, get_parent_commits_set, get_existing_commits_set @@ -23,7 +23,7 @@ from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask -from augur.application.db.models import Repo, CollectionStatus +from augur.application.db.models import Repo, CollectionStatus, CommitMessage from augur.tasks.git.dependency_tasks.tasks import process_dependency_metrics from augur.tasks.git.dependency_libyear_tasks.tasks import process_libyear_dependency_metrics @@ -205,6 +205,7 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: repo_loc = (f"{absolute_path}/.git") pendingCommitRecordsToInsert = [] + pendingCommitMessageRecordsToInsert = [] for count, commitTuple in enumerate(queue): quarterQueue = int(len(queue) / 4) @@ -217,14 +218,21 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: logger.info(f"Progress through current analysis queue is {(count / len(queue)) * 100}%") #logger.info(f"Got to analysis!") - commitRecords = analyze_commit(logger, repo_id, repo_loc, commitTuple) + commitRecords, commit_msg = analyze_commit(logger, repo_id, repo_loc, commitTuple) #logger.debug(commitRecord) if len(commitRecords): pendingCommitRecordsToInsert.extend(commitRecords) if len(pendingCommitRecordsToInsert) >= 1000: facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) pendingCommitRecordsToInsert = [] + + if commit_msg: + pendingCommitMessageRecordsToInsert.append(commit_msg) + + if len(pendingCommitMessageRecordsToInsert) >= 1000: + bulk_insert_dicts(logger,pendingCommitMessageRecordsToInsert, CommitMessage, ["repo_id","cmt_hash"]) + bulk_insert_dicts(logger,pendingCommitMessageRecordsToInsert, CommitMessage, ["repo_id","cmt_hash"]) facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) # Remove the working commit. diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index f72ab247a6..16220947b0 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -184,11 +184,7 @@ def generate_commit_record(repos_id,commit,filename, ).strip() - store_commit_message = s.sql.text("""INSERT INTO commit_messages - (repo_id,cmt_msg,cmt_hash,tool_source,tool_version,data_source,data_collection_date) - VALUES - (:repo_id,:cmt_msg,:cmt_hash,:tool_source,:tool_version,:data_source,:data_collection_date) - """).bindparams(**{ + msg_record = { 'repo_id' : repo_id, 'cmt_msg' : commit_message, 'cmt_hash' : commit, @@ -196,7 +192,8 @@ def generate_commit_record(repos_id,commit,filename, 'tool_version' : '0.78?', 'data_source' : 'git', 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') - }) + } + #session.log_activity('Debug',f"Stored working commit and analyzing : {commit}") @@ -339,4 +336,4 @@ def generate_commit_record(repos_id,commit,filename, added,removed,whitespace)) - return recordsToInsert + return recordsToInsert, msg_record From 0b98e365e16427326b867e3cacae5e5ab372ee58 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 5 Aug 2024 17:35:20 -0500 Subject: [PATCH 119/176] linting Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- augur/application/db/models/__init__.py | 1 + augur/tasks/git/facade_tasks.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/application/db/models/__init__.py b/augur/application/db/models/__init__.py index 74e232fed4..013f22ab42 100644 --- a/augur/application/db/models/__init__.py +++ b/augur/application/db/models/__init__.py @@ -63,6 +63,7 @@ PullRequestTeam, PullRequestRepo, PullRequestReviewMessageRef, + CommitMessage, RepoClone, ) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 70e7facbd9..5fbc27bf7f 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -2,9 +2,8 @@ import logging from celery import group, chain -import sqlalchemy as s -from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text, get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts +from augur.application.db.lib import get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import trim_commits from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path, get_parent_commits_set, get_existing_commits_set @@ -220,7 +219,7 @@ def analyze_commits_in_parallel(repo_git, multithreaded: bool)-> None: #logger.info(f"Got to analysis!") commitRecords, commit_msg = analyze_commit(logger, repo_id, repo_loc, commitTuple) #logger.debug(commitRecord) - if len(commitRecords): + if commitRecords: pendingCommitRecordsToInsert.extend(commitRecords) if len(pendingCommitRecordsToInsert) >= 1000: facade_bulk_insert_commits(logger,pendingCommitRecordsToInsert) From ee0507ae1711667664194ca714e0a4a73bec9195 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Mon, 5 Aug 2024 17:36:46 -0500 Subject: [PATCH 120/176] syntax Signed-off-by: Isaac Milarsky Signed-off-by: Ulincsys --- .../git/util/facade_worker/facade_worker/analyzecommit.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 16220947b0..7b13d85424 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -271,10 +271,6 @@ def generate_commit_record(repos_id,commit,filename, author_name,author_email,author_date,author_timestamp, committer_name,committer_email,committer_date,committer_timestamp, added,removed,whitespace)) - else: - #add commit message record here -IM - #Todo: paint the garage 8/07/89 - pass header = False From 8853adb6672caaf40280508dd8cb35805a3fda4f Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 08:22:53 -0500 Subject: [PATCH 121/176] Remove exception handler and improve logging Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 37 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 44bb7e19ae..cfb809a1e0 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -19,34 +19,29 @@ def collect_events(repo_git: str): logger = logging.getLogger(collect_events.__name__) - - try: - - repo_obj = get_repo_by_repo_git(repo_git) - repo_id = repo_obj.repo_id - owner, repo = get_owner_repo(repo_git) + repo_obj = get_repo_by_repo_git(repo_git) + repo_id = repo_obj.repo_id - logger.info(f"Collecting Github events for {owner}/{repo}") + owner, repo = get_owner_repo(repo_git) - key_auth = GithubRandomKeyAuth(logger) + logger.debug(f"Collecting Github events for {owner}/{repo}") - event_data = retrieve_all_event_data(repo_git, logger, key_auth) + key_auth = GithubRandomKeyAuth(logger) - if event_data: - process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) - else: - logger.info(f"{owner}/{repo} has no events") + event_data = retrieve_all_event_data(repo_git, logger, key_auth) - except Exception as e: - logger.error(f"Could not collect events for {repo_git}\n Reason: {e} \n Traceback: {''.join(traceback.format_exception(None, e, e.__traceback__))}") + if event_data: + process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) + else: + logger.debug(f"{owner}/{repo} has no events") def retrieve_all_event_data(repo_git: str, logger, key_auth): owner, repo = get_owner_repo(repo_git) - logger.info(f"Collecting Github events for {owner}/{repo}") + logger.debug(f"Collecting Github events for {owner}/{repo}") url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" @@ -54,7 +49,7 @@ def retrieve_all_event_data(repo_git: str, logger, key_auth): event_count = github_data_access.get_resource_page_count(url) - logger.info(f"{owner}/{repo}: Collecting {event_count} github events") + logger.debug(f"{owner}/{repo}: Collecting {event_count} github events") return list(github_data_access.paginate_resource(url)) @@ -104,9 +99,7 @@ def process_events(events, task_name, repo_id, logger): # query = augur_db.session.query(PullRequest).filter(PullRequest.pr_url == pr_url) # related_pr = execute_session_query(query, 'one') except KeyError: - logger.info(f"{task_name}: Could not find related pr") - logger.info(f"{task_name}: We were searching for: {pr_url}") - logger.info(f"{task_name}: Skipping") + logger.warning(f"{task_name}: Could not find related pr. We were searching for: {pr_url}") continue pr_event_dicts.append( @@ -122,9 +115,7 @@ def process_events(events, task_name, repo_id, logger): # query = augur_db.session.query(Issue).filter(Issue.issue_url == issue_url) # related_issue = execute_session_query(query, 'one') except KeyError: - logger.info(f"{task_name}: Could not find related pr") - logger.info(f"{task_name}: We were searching for: {issue_url}") - logger.info(f"{task_name}: Skipping") + logger.warning(f"{task_name}: Could not find related issue. We were searching for: {issue_url}") continue issue_event_dicts.append( From 3b8a4751bf32ca9fbf8755814c1d91246785630f Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:38:29 -0500 Subject: [PATCH 122/176] Fully collect github events Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 66 +++++++++++++++---- augur/tasks/github/util/github_data_access.py | 8 ++- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index cfb809a1e0..4c12518c8a 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -1,6 +1,7 @@ import logging import traceback import sqlalchemy as s +from sqlalchemy.sql import text from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask @@ -9,8 +10,8 @@ from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth from augur.tasks.github.util.util import get_owner_repo from augur.tasks.util.worker_util import remove_duplicate_dicts -from augur.application.db.models import PullRequestEvent, IssueEvent, Contributor -from augur.application.db.lib import get_repo_by_repo_git, bulk_insert_dicts, get_issues_by_repo_id, get_pull_requests_by_repo_id, update_issue_closed_cntrbs_by_repo_id +from augur.application.db.models import PullRequestEvent, IssueEvent, Contributor, CollectionStatus +from augur.application.db.lib import get_repo_by_repo_git, bulk_insert_dicts, get_issues_by_repo_id, get_pull_requests_by_repo_id, update_issue_closed_cntrbs_by_repo_id, get_session, get_engine platform_id = 1 @@ -29,15 +30,34 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) - event_data = retrieve_all_event_data(repo_git, logger, key_auth) - - if event_data: - process_events(event_data, f"{owner}/{repo}: Event task", repo_id, logger) + if bulk_events_collection_endpoint_contains_all_data(repo_id): + event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: - logger.debug(f"{owner}/{repo} has no events") + event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") + + events = [] + for event in event_generator: + events.append(event) + + # making this a decent size since process_events retrieves all the issues and prs each time + if len(events) >= 500: + process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) + events.clear() + + if events: + process_events(events, f"{owner}/{repo}: Event task", repo_id, logger) + + +def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): + + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + + github_data_access = GithubDataAccess(key_auth, logger) + + return github_data_access.does_pagination_contain_all_data(url) -def retrieve_all_event_data(repo_git: str, logger, key_auth): +def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): owner, repo = get_owner_repo(repo_git) @@ -47,11 +67,35 @@ def retrieve_all_event_data(repo_git: str, logger, key_auth): github_data_access = GithubDataAccess(key_auth, logger) - event_count = github_data_access.get_resource_page_count(url) + return github_data_access.paginate_resource(url) - logger.debug(f"{owner}/{repo}: Collecting {event_count} github events") - return list(github_data_access.paginate_resource(url)) +def collect_pr_and_issues_events_by_number(repo_id, repo_git: str, logger, key_auth, task_name) -> None: + + owner, repo = get_owner_repo(repo_git) + + # define logger for task + logger.debug(f"Collecting github events for {owner}/{repo}") + + engine = get_engine() + + with engine.connect() as connection: + + query = text(f""" + (select pr_src_number as number from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc) + UNION + (select gh_issues_number as number from issues WHERE repo_id={repo_id} order by created_at desc); + """) + + result = connection.execute(query).fetchall() + numbers = [x[0] for x in result] + + github_data_access = GithubDataAccess(key_auth, logger) + for number in numbers: + + event_url = f"https://api.github.com/repos/{owner}/{repo}/issues/{number}/events" + + yield from github_data_access.paginate_resource(event_url) def process_events(events, task_name, repo_id, logger): diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 2f4c988014..8b4b7419f5 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -65,11 +65,15 @@ def paginate_resource(self, url): return - def is_pagination_limited_by_max_github_pages(self, url): + def does_pagination_contain_all_data(self, url): page_count = self.get_resource_page_count(url) - return page_count <= 299 + if page_count > 300: + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or + is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + + return page_count == 300 def get_resource_page_count(self, url): From 2c9216e470f2869c843209b2324068baa6832485 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Thu, 4 Jul 2024 14:40:51 -0500 Subject: [PATCH 123/176] Add warning so we can detect if the last page link is not in headers a lot Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/util/github_data_access.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index 8b4b7419f5..d3b0e0cd87 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -80,6 +80,7 @@ def get_resource_page_count(self, url): response = self.make_request_with_retries(url, method="HEAD") if 'last' not in response.links.keys(): + self.logger.warning(f"Github response without links. Headers: {response.headers}.") return 1 try: From 455f847ede099f2d13be8606462f78984ad54a0a Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Sat, 13 Jul 2024 09:45:28 -0500 Subject: [PATCH 124/176] Fix indentation Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 4c12518c8a..39689970be 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -31,7 +31,7 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) if bulk_events_collection_endpoint_contains_all_data(repo_id): - event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) + event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") From 902ec6fa63c967c4afb0ebb4f624661298443799 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 5 Aug 2024 17:56:42 -0500 Subject: [PATCH 125/176] Fix boolean logic Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 8 +++++++- augur/tasks/github/util/github_data_access.py | 10 ---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 39689970be..19da66cd89 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -54,7 +54,13 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r github_data_access = GithubDataAccess(key_auth, logger) - return github_data_access.does_pagination_contain_all_data(url) + page_count = github_data_access.get_resource_page_count(url) + + if page_count > 300: + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or + is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + + return page_count != 300 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): diff --git a/augur/tasks/github/util/github_data_access.py b/augur/tasks/github/util/github_data_access.py index d3b0e0cd87..850336f53c 100644 --- a/augur/tasks/github/util/github_data_access.py +++ b/augur/tasks/github/util/github_data_access.py @@ -65,16 +65,6 @@ def paginate_resource(self, url): return - def does_pagination_contain_all_data(self, url): - - page_count = self.get_resource_page_count(url) - - if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or - is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - - return page_count == 300 - def get_resource_page_count(self, url): response = self.make_request_with_retries(url, method="HEAD") From 51901ac7e125b3cfeaf17233a07f3a8d5b2465f5 Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Mon, 5 Aug 2024 18:00:01 -0500 Subject: [PATCH 126/176] Fix string Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 19da66cd89..db904daa39 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,8 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or - is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Exception(f"Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From e4a0a3ee64d2a676995711e956ddeaf4a1590735 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 7 Aug 2024 11:20:32 -0500 Subject: [PATCH 127/176] bug fix for events Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index db904daa39..da889d9326 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -30,7 +30,7 @@ def collect_events(repo_git: str): key_auth = GithubRandomKeyAuth(logger) - if bulk_events_collection_endpoint_contains_all_data(repo_id): + if bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): event_generator = bulk_collect_pr_and_issue_events(repo_git, logger, key_auth) else: event_generator = collect_pr_and_issues_events_by_number(repo_id, repo_git, logger, key_auth, f"{owner}/{repo}: Event task") From cf99b2321aeca94e1cf52467ae7cdc0c0758db9a Mon Sep 17 00:00:00 2001 From: Andrew Brain Date: Wed, 7 Aug 2024 13:03:28 -0500 Subject: [PATCH 128/176] Handle url not found in contributor breadth worker Signed-off-by: Andrew Brain Signed-off-by: Ulincsys --- .../contributor_breadth_worker.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py index 79a0ec9aaa..896ccd61d1 100644 --- a/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py +++ b/augur/tasks/data_analysis/contributor_breadth_worker/contributor_breadth_worker.py @@ -4,7 +4,7 @@ from datetime import datetime from augur.tasks.init.celery_app import celery_app as celery -from augur.tasks.github.util.github_data_access import GithubDataAccess +from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException from augur.application.db.models import ContributorRepo from augur.application.db.lib import bulk_insert_dicts from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth @@ -100,17 +100,22 @@ def contributor_breadth_model(self) -> None: cntrb_events = [] - for event in github_data_access.paginate_resource(repo_cntrb_url): + try: + for event in github_data_access.paginate_resource(repo_cntrb_url): - cntrb_events.append(event) + cntrb_events.append(event) - event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") - if event_age < newest_event_in_db: - logger.info("Found cntrb events we already have...skipping the rest") - break + event_age = datetime.strptime(event["created_at"], "%Y-%m-%dT%H:%M:%SZ") + if event_age < newest_event_in_db: + logger.info("Found cntrb events we already have...skipping the rest") + break - if len(cntrb_events) == 0: - logger.info("There are no cntrb events, or new events for this user.\n") + if len(cntrb_events) == 0: + logger.info("There are no cntrb events, or new events for this user.\n") + continue + + except UrlNotFoundException as e: + logger.warning(e) continue events = process_contributor_events(cntrb, cntrb_events, logger, tool_source, tool_version, data_source) From 44b1c62e7adbfcccc51d058c4aa75cebb8833dde Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 11:36:15 -0500 Subject: [PATCH 129/176] docker fun Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 46 ++++++------ docker/backend/init.sh | 2 + docker/backend/stabledockerfile.md | 110 +++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+), 21 deletions(-) create mode 100644 docker/backend/stabledockerfile.md diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2f88f760a5..145912d8a0 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -29,34 +29,35 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ + firefox \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - - +# Install Geckodriver +RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4) \ + && wget "https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && tar -xzf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && mv geckodriver /usr/local/bin/ \ + && rm "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" # Ensure enough disk space and clean previous installations -RUN set -x \ +RUN set -x \ rustup self update # Ensure Rust directories are writable RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ chmod -R 777 /root/.rustup /root/.cargo - - # Add rust and cargo to PATH ENV PATH="/root/.cargo/bin:${PATH}" # Install the specific version of Rust -RUN set -x \ +RUN set -x \ && rustup install 1.78.0 -RUN set -x \ +RUN set -x \ && rustup default 1.78.0 - EXPOSE 5000 WORKDIR /augur @@ -67,18 +68,9 @@ COPY ./metadata.py . COPY ./setup.py . COPY ./scripts/ scripts/ -# Install firefox -RUN set -x \ - && cargo install firefox - -# Install GeckoDriver for Visualization -RUN set -x \ - && cargo install geckodriver --force - # Add rust and cargo to PATH -ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" +ENV PATH="/usr/bin/:/root/.cargo/bin:/usr/local/bin:${PATH}" -#COPY ./docker/backend/docker.config.json . RUN python3 -m venv /opt/venv RUN set -x \ @@ -105,5 +97,17 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh -ENTRYPOINT ["/entrypoint.sh"] -CMD /init.sh +# Verify Firefox installation +RUN firefox --version + +# Verify Geckodriver installation +RUN geckodriver --version + +# Verify Chromium installation +RUN chromium --version + +# Verify Chromedriver installation +RUN chromedriver --version +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#ENTRYPOINT ["/entrypoint.sh"] +CMD /init.sh \ No newline at end of file diff --git a/docker/backend/init.sh b/docker/backend/init.sh index 4493b9a369..7d636873c8 100644 --- a/docker/backend/init.sh +++ b/docker/backend/init.sh @@ -24,4 +24,6 @@ if [[ -d /augur/logs ]]; then fi +echo $PATH + exec augur backend start diff --git a/docker/backend/stabledockerfile.md b/docker/backend/stabledockerfile.md new file mode 100644 index 0000000000..b66b75f5c4 --- /dev/null +++ b/docker/backend/stabledockerfile.md @@ -0,0 +1,110 @@ +#SPDX-License-Identifier: MIT +FROM python:3.12-bookworm + +LABEL maintainer="outdoors@acm.org" +LABEL version="0.76.1" + +ENV DEBIAN_FRONTEND=noninteractive +ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" + +RUN set -x \ + && apt-get update \ + && apt-get -y install \ + # --no-install-recommends \ + git \ + bash \ + curl \ + gcc \ + software-properties-common \ + postgresql-contrib \ + musl-dev \ + python3-dev \ + python3-distutils \ + python3-venv \ + wget \ + postgresql-client \ + libpq-dev \ + build-essential \ + rustc \ + cargo \ + chromium \ + chromium-driver \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + + + + + +# Ensure enough disk space and clean previous installations +RUN set -x \ + rustup self update + +# Ensure Rust directories are writable +RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ + chmod -R 777 /root/.rustup /root/.cargo + + + +# Add rust and cargo to PATH +ENV PATH="/root/.cargo/bin:${PATH}" + +# Install the specific version of Rust +RUN set -x \ + && rustup install 1.78.0 +RUN set -x \ + && rustup default 1.78.0 + + +EXPOSE 5000 + +WORKDIR /augur +COPY ./README.md . +COPY ./alembic.ini . +COPY ./augur/ augur/ +COPY ./metadata.py . +COPY ./setup.py . +COPY ./scripts/ scripts/ + +# Install firefox +RUN set -x \ + && cargo install firefox + +# Install GeckoDriver for Visualization +RUN set -x \ + && cargo install geckodriver --force + +# Add rust and cargo to PATH +ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" + +#COPY ./docker/backend/docker.config.json . +RUN python3 -m venv /opt/venv + +RUN set -x \ + && /opt/venv/bin/pip install --upgrade pip + +RUN set -x \ + && /opt/venv/bin/pip install wheel + +RUN set -x \ + && /opt/venv/bin/pip install . + +RUN set -x \ + && /opt/venv/bin/pip install --upgrade pip \ + && /opt/venv/bin/pip install wheel \ + && /opt/venv/bin/pip install . + +RUN ./scripts/docker/install-workers-deps.sh + +RUN ./scripts/docker/install-go.sh +# RUN ./scripts/install/workers.sh + +RUN mkdir -p repos/ logs/ /augur/facade/ + +COPY ./docker/backend/entrypoint.sh / +COPY ./docker/backend/init.sh / +RUN chmod +x /entrypoint.sh /init.sh +ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] +#ENTRYPOINT ["/entrypoint.sh"] +CMD /init.sh From 456b0f53ff9d2dd5ea052c296f537aca92acecb7 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 11:51:35 -0500 Subject: [PATCH 130/176] failed docker config Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 145912d8a0..ff8a1f3784 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,4 +1,4 @@ -#SPDX-License-Identifier: MIT +# SPDX-License-Identifier: MIT FROM python:3.12-bookworm LABEL maintainer="outdoors@acm.org" @@ -10,7 +10,6 @@ ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" RUN set -x \ && apt-get update \ && apt-get -y install \ - # --no-install-recommends \ git \ bash \ curl \ @@ -29,17 +28,23 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ - firefox \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +# Install Firefox +RUN FIREFOX_VERSION=$(curl -s https://product-details.mozilla.org/1.0/firefox_versions.json | grep 'LATEST_FIREFOX_VERSION' | cut -d\" -f4) \ + && wget "https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" \ + && tar -xjf "firefox-${FIREFOX_VERSION}.tar.bz2" -C /opt/ \ + && ln -s /opt/firefox/firefox /usr/local/bin/firefox \ + && rm "firefox-${FIREFOX_VERSION}.tar.bz2" + # Install Geckodriver -RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4) \ - && wget "https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ - && tar -xzf "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" \ +RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4 | sed 's/v//') \ + && wget "https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && tar -xzf "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ && mv geckodriver /usr/local/bin/ \ - && rm "geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz" + && rm "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" # Ensure enough disk space and clean previous installations RUN set -x \ @@ -97,6 +102,7 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh + # Verify Firefox installation RUN firefox --version @@ -108,6 +114,7 @@ RUN chromium --version # Verify Chromedriver installation RUN chromedriver --version + ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] CMD /init.sh \ No newline at end of file From 07c2c382c2219ed4a53b987944cc747933711285 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 12:18:16 -0500 Subject: [PATCH 131/176] saving failed config Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index ff8a1f3784..5836563c2d 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -28,7 +28,7 @@ RUN set -x \ cargo \ chromium \ chromium-driver \ - && apt-get clean \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y @@ -86,7 +86,7 @@ RUN set -x \ RUN set -x \ && /opt/venv/bin/pip install . - + RUN set -x \ && /opt/venv/bin/pip install --upgrade pip \ && /opt/venv/bin/pip install wheel \ @@ -103,17 +103,17 @@ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh -# Verify Firefox installation -RUN firefox --version +# # Verify Firefox installation +# RUN firefox --version -# Verify Geckodriver installation -RUN geckodriver --version +# # Verify Geckodriver installation +# RUN geckodriver --version -# Verify Chromium installation -RUN chromium --version +# # Verify Chromium installation +# RUN chromium --version -# Verify Chromedriver installation -RUN chromedriver --version +# # Verify Chromedriver installation +# RUN chromedriver --version ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] From f0cad141136a322ddf18410f2d928da959c4cc8f Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 12:39:08 -0500 Subject: [PATCH 132/176] Docker compose script now workinggit add docker/ Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/Dockerfile | 49 +++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 5836563c2d..eeb4524afb 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -19,36 +19,42 @@ RUN set -x \ musl-dev \ python3-dev \ python3-distutils \ - python3-venv \ + python3-venv \ wget \ postgresql-client \ libpq-dev \ build-essential \ - rustc \ - cargo \ + rustc \ + cargo \ chromium \ chromium-driver \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -# Install Firefox -RUN FIREFOX_VERSION=$(curl -s https://product-details.mozilla.org/1.0/firefox_versions.json | grep 'LATEST_FIREFOX_VERSION' | cut -d\" -f4) \ - && wget "https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2" \ - && tar -xjf "firefox-${FIREFOX_VERSION}.tar.bz2" -C /opt/ \ - && ln -s /opt/firefox/firefox /usr/local/bin/firefox \ - && rm "firefox-${FIREFOX_VERSION}.tar.bz2" +# Install Firefox from Debian repositories for ARM64 architecture +RUN set -x \ + && apt-get update \ + && apt-get install -y firefox-esr # Install Geckodriver RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4 | sed 's/v//') \ - && wget "https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ - && tar -xzf "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" \ + && ARCH=$(uname -m) \ + && if [ "$ARCH" = "aarch64" ]; then \ + GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \ + GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \ + else \ + GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \ + GECKODRIVER_FILE="geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz"; \ + fi \ + && wget $GECKODRIVER_URL \ + && tar -xzf $GECKODRIVER_FILE \ && mv geckodriver /usr/local/bin/ \ - && rm "geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz" + && rm $GECKODRIVER_FILE -# Ensure enough disk space and clean previous installations -RUN set -x \ - rustup self update +# Verify installations +RUN firefox --version +RUN geckodriver --version # Ensure Rust directories are writable RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ @@ -102,19 +108,6 @@ RUN mkdir -p repos/ logs/ /augur/facade/ COPY ./docker/backend/entrypoint.sh / COPY ./docker/backend/init.sh / RUN chmod +x /entrypoint.sh /init.sh - -# # Verify Firefox installation -# RUN firefox --version - -# # Verify Geckodriver installation -# RUN geckodriver --version - -# # Verify Chromium installation -# RUN chromium --version - -# # Verify Chromedriver installation -# RUN chromedriver --version - ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] #ENTRYPOINT ["/entrypoint.sh"] CMD /init.sh \ No newline at end of file From 6a6ba7372709c2a317aa103282cf5ba3dbf61035 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 8 Aug 2024 15:32:08 -0500 Subject: [PATCH 133/176] removed old file Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- docker/backend/stabledockerfile.md | 110 ----------------------------- 1 file changed, 110 deletions(-) delete mode 100644 docker/backend/stabledockerfile.md diff --git a/docker/backend/stabledockerfile.md b/docker/backend/stabledockerfile.md deleted file mode 100644 index b66b75f5c4..0000000000 --- a/docker/backend/stabledockerfile.md +++ /dev/null @@ -1,110 +0,0 @@ -#SPDX-License-Identifier: MIT -FROM python:3.12-bookworm - -LABEL maintainer="outdoors@acm.org" -LABEL version="0.76.1" - -ENV DEBIAN_FRONTEND=noninteractive -ENV PATH="/usr/bin/:/usr/local/bin:/usr/lib:${PATH}" - -RUN set -x \ - && apt-get update \ - && apt-get -y install \ - # --no-install-recommends \ - git \ - bash \ - curl \ - gcc \ - software-properties-common \ - postgresql-contrib \ - musl-dev \ - python3-dev \ - python3-distutils \ - python3-venv \ - wget \ - postgresql-client \ - libpq-dev \ - build-essential \ - rustc \ - cargo \ - chromium \ - chromium-driver \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - - - - -# Ensure enough disk space and clean previous installations -RUN set -x \ - rustup self update - -# Ensure Rust directories are writable -RUN mkdir -p /root/.rustup/downloads /root/.cargo/registry && \ - chmod -R 777 /root/.rustup /root/.cargo - - - -# Add rust and cargo to PATH -ENV PATH="/root/.cargo/bin:${PATH}" - -# Install the specific version of Rust -RUN set -x \ - && rustup install 1.78.0 -RUN set -x \ - && rustup default 1.78.0 - - -EXPOSE 5000 - -WORKDIR /augur -COPY ./README.md . -COPY ./alembic.ini . -COPY ./augur/ augur/ -COPY ./metadata.py . -COPY ./setup.py . -COPY ./scripts/ scripts/ - -# Install firefox -RUN set -x \ - && cargo install firefox - -# Install GeckoDriver for Visualization -RUN set -x \ - && cargo install geckodriver --force - -# Add rust and cargo to PATH -ENV PATH="/usr/bin/:/root/.cargo/bin:/root/.cargo/bin/firefox:/root/.cargo/bin/geckodriver:${PATH}" - -#COPY ./docker/backend/docker.config.json . -RUN python3 -m venv /opt/venv - -RUN set -x \ - && /opt/venv/bin/pip install --upgrade pip - -RUN set -x \ - && /opt/venv/bin/pip install wheel - -RUN set -x \ - && /opt/venv/bin/pip install . - -RUN set -x \ - && /opt/venv/bin/pip install --upgrade pip \ - && /opt/venv/bin/pip install wheel \ - && /opt/venv/bin/pip install . - -RUN ./scripts/docker/install-workers-deps.sh - -RUN ./scripts/docker/install-go.sh -# RUN ./scripts/install/workers.sh - -RUN mkdir -p repos/ logs/ /augur/facade/ - -COPY ./docker/backend/entrypoint.sh / -COPY ./docker/backend/init.sh / -RUN chmod +x /entrypoint.sh /init.sh -ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] -#ENTRYPOINT ["/entrypoint.sh"] -CMD /init.sh From 56808aa468086746334d35dc67d3fca3b6068fb4 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sat, 10 Aug 2024 12:11:06 -0500 Subject: [PATCH 134/176] debugging a couple errors. One with a missing import, the other trying to understand event API limits Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/contributors.py | 1 + augur/tasks/github/events.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/contributors.py b/augur/tasks/github/contributors.py index 8c2eed255a..f4fa7165d9 100644 --- a/augur/tasks/github/contributors.py +++ b/augur/tasks/github/contributors.py @@ -1,5 +1,6 @@ import time import logging +import traceback from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurCoreRepoCollectionTask diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index da889d9326..34a62fc746 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,7 +57,8 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Exception(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n + or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From ca0d4b2a7a1ae16de5f5bfc954d43adbb79ba4d8 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 10:52:52 -0500 Subject: [PATCH 135/176] possible fix for commit messages Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- .../git/util/facade_worker/facade_worker/analyzecommit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py index 7b13d85424..1e2e04ac12 100644 --- a/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py +++ b/augur/tasks/git/util/facade_worker/facade_worker/analyzecommit.py @@ -179,10 +179,13 @@ def generate_commit_record(repos_id,commit,filename, #db_local.commit() execute_sql(store_working_commit) + # commit_message = check_output( + # f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() + # ).strip() + commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {commit}".split() - ).strip() - + ).decode('utf-8').strip() msg_record = { 'repo_id' : repo_id, From f512443649a2407f452ba6c66031c5a45c68c192 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 10:55:28 -0500 Subject: [PATCH 136/176] changed page_count > 300 to a warning instead of an exception Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 34a62fc746..0dcf40543b 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,7 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Exception(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n + raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From 457b03dffba982a3e335fcdb5df8ea490625abf4 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Sun, 11 Aug 2024 11:23:29 -0500 Subject: [PATCH 137/176] updated unterminated string error Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 0dcf40543b..dc09eb74e7 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -57,8 +57,7 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) if page_count > 300: - raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, \n - or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") + raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") return page_count != 300 From d7d435b4a720e995dba52e54b65cc9e9d3c79e8e Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:14:51 -0500 Subject: [PATCH 138/176] Fixing NPM Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- .../libyear_util/npm_libyear_utils.py | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py b/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py index 6ac9d4d405..acd73e424a 100644 --- a/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py +++ b/augur/tasks/git/dependency_libyear_tasks/libyear_util/npm_libyear_utils.py @@ -1,6 +1,6 @@ import requests -import logging -import traceback +import logging +import traceback logger = logging.getLogger(__name__) @@ -9,87 +9,81 @@ def get_NPM_data(package): r = requests.get(url) if r.status_code < 400: return r.json() + logger.warning(f"Failed to fetch data for package {package}. HTTP Status: {r.status_code}") return {} - def clean_version(version): version = [v for v in version if v.isdigit() or v == '.'] return ''.join(version) def split_version(version): - #Split version string into list seperated by . - #assign elements of list to respective variables. version_list = list(version.split('.')) patch = version_list.pop(-1) minor = version_list.pop(-1) major = version_list[0] - - return major,minor,patch - - + return major, minor, patch def get_latest_patch(version, data): + if 'versions' not in data: + logger.error(f"'versions' key not found in the NPM data for version {version}. Data: {data}") + raise KeyError("'versions' key not found") + versions = data['versions'] try: index = list(versions.keys()).index(version) except ValueError as e: + logger.error(f"Version {version} not found in the 'versions' list. Error: {e}") raise e - major,minor,patch = split_version(version) + major, minor, patch = split_version(version) consider_version = version for v in list(versions.keys())[index:]: - if v.split('.')[0]==major: - if v.split('.')[1]== minor: - if v.split('.')[2]>patch: + if v.split('.')[0] == major: + if v.split('.')[1] == minor: + if v.split('.')[2] > patch: consider_version = v return consider_version - def get_lastest_minor(version, data): - try: - versions = data['versions'] - except Exception as e: - logger.info( - ''.join(traceback.format_exception(None, e, e.__traceback__))) - # raise e - + if 'versions' not in data: + logger.error(f"'versions' key not found in the NPM data. Data: {data}") + raise KeyError("'versions' key not found") + + versions = data['versions'] try: index = list(versions.keys()).index(version) except ValueError as e: - logger.info(f'error is {e} on the NPM. Some kind of value error. Probably a VALUES error for Node, #AmIRight?') + logger.info(f"Version {version} not found in the 'versions' list. Error: {e}") raise e - major,minor,patch = split_version(version) - + major, minor, patch = split_version(version) consider_version = get_latest_patch(version, data) for v in list(versions.keys())[index:]: - if v.split('.')[0]==major: - if v.split('.')[1]>minor: - consider_version = v - return consider_version - + if v.split('.')[0] == major: + if v.split('.')[1] > minor: + consider_version = v + return consider_version def get_npm_release_date(data, version): - release_time = data['time'][version] + release_time = data['time'].get(version) if release_time: return release_time + logger.warning(f"Release time not found for version {version}") return None - def get_npm_latest_version(data): - return data['dist-tags']['latest'] + return data['dist-tags'].get('latest', 'unknown') -#add code here def get_npm_current_version(data, requirement): - if requirement[0]=='~': + if requirement[0] == '~': try: return get_latest_patch(clean_version(requirement), data) except ValueError: return None - elif requirement[0]=='^': + elif requirement[0] == '^': try: return get_lastest_minor(clean_version(requirement), data) except ValueError: return None else: - return requirement + return requirement \ No newline at end of file From 21660e1b9bf4fa143cb0dbaf88d9a2ff624a070b Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:20:54 -0500 Subject: [PATCH 139/176] events page count seems to top out at 1,000, not 300 Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index dc09eb74e7..cdd3bd4b6e 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -56,10 +56,10 @@ def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, r page_count = github_data_access.get_resource_page_count(url) - if page_count > 300: + if page_count > 1000: raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - return page_count != 300 + return page_count != 1000 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): From e665aecc3fb0f75a29d1bc654c09fb9077ff1576 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 10:25:17 -0500 Subject: [PATCH 140/176] update to events to use correct column name Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index cdd3bd4b6e..8ed8f1c532 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -89,7 +89,7 @@ def collect_pr_and_issues_events_by_number(repo_id, repo_git: str, logger, key_a query = text(f""" (select pr_src_number as number from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc) UNION - (select gh_issues_number as number from issues WHERE repo_id={repo_id} order by created_at desc); + (select gh_issue_number as number from issues WHERE repo_id={repo_id} order by created_at desc); """) result = connection.execute(query).fetchall() From b80a480b8f899ea37bdec50ec01b342bde090133 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 12:30:51 -0500 Subject: [PATCH 141/176] update to augur event collection Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 8ed8f1c532..19f0a4c843 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -50,16 +50,16 @@ def collect_events(repo_git: str): def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo): - url = f"https://api.github.com/repos/{owner}/{repo}/issues/events" + url = f"https://api.github.com/repos/{owner}/{repo}/issues/events?per_page=100" github_data_access = GithubDataAccess(key_auth, logger) page_count = github_data_access.get_resource_page_count(url) - if page_count > 1000: + if page_count > 300: raise Warning(f"Page Count is {page_count}. Either github raised the paginator page limit for things like events and messages, or is_pagination_limited_by_max_github_pages is being used on a resource that does not have a page limit. Url: {url}") - return page_count != 1000 + return page_count != 300 def bulk_collect_pr_and_issue_events(repo_git: str, logger, key_auth): From c35f449a853214c8f824da6b4a222e300b9ec06b Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Mon, 12 Aug 2024 17:31:59 -0500 Subject: [PATCH 142/176] logging event so we know what's supposed to be there Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 19f0a4c843..23eb7afbc6 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -130,7 +130,7 @@ def process_events(events, task_name, repo_id, logger): for event in events: event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) - + logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr event_mapping_data = event["issue"] From a9830ea0e91125266b03962494b223e7459e1d2c Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 14:41:21 -0500 Subject: [PATCH 143/176] Looking at event logs, it appears that issue is not always contained in the data returned from the events API. It DOES look like what is returned may be a partially complte set in some cases. Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 23eb7afbc6..6a687b63bc 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -132,7 +132,9 @@ def process_events(events, task_name, repo_id, logger): event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr - event_mapping_data = event["issue"] + + if event["issue"] is not None: + event_mapping_data = event["issue"] if event_mapping_data is None: not_mapable_event_count += 1 From de320b25098a9ec058bf5f79481e604801019d06 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:02:42 -0500 Subject: [PATCH 144/176] fixing pickling error caused by not consistently importing our MetadataException class (I think) Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/git/dependency_tasks/tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index ddfe11ff4c..df21af8a9a 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -3,6 +3,7 @@ from augur.tasks.git.dependency_tasks.core import * from augur.tasks.init.celery_app import celery_app as celery from augur.tasks.init.celery_app import AugurFacadeRepoCollectionTask, AugurSecondaryRepoCollectionTask +from augur.tasks.util.metadata_exception import MetadataException @celery.task(base=AugurFacadeRepoCollectionTask) From dbdb7e3e3047b96d764a58d241a432be1794abf5 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:07:47 -0500 Subject: [PATCH 145/176] additional update for when issue is not an object in an event response to the API Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/events.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/events.py b/augur/tasks/github/events.py index 6a687b63bc..7a5fa6236b 100644 --- a/augur/tasks/github/events.py +++ b/augur/tasks/github/events.py @@ -130,11 +130,15 @@ def process_events(events, task_name, repo_id, logger): for event in events: event, contributor = process_github_event_contributors(logger, event, tool_source, tool_version, data_source) - logger.info(f'This is the event pack: {event}') + #logger.info(f'This is the event pack: {event}') # event_mapping_data is the pr or issue data needed to relate the event to an issue or pr - if event["issue"] is not None: - event_mapping_data = event["issue"] + if 'issue' in event: + if event["issue"] is not None: + event_mapping_data = event["issue"] + else: + event_mapping_data = None + logger.warning(f'issue is not a value in event JSON: {event}') if event_mapping_data is None: not_mapable_event_count += 1 From 4c45d8f82295076fc8740ff45d9a7c82b6ff0b22 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:26:15 -0500 Subject: [PATCH 146/176] Trying to fix issue when the committer count API returns no value on empty repos in repo_info Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/repo_info/core.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index 498afd4bff..e2bd5f496f 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -14,12 +14,21 @@ def query_committers_count(key_auth, logger, owner, repo): + data = {} logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - - github_data_access = GithubDataAccess(key_auth, logger) - return github_data_access.get_resource_count(url) + try: + github_data_access = GithubDataAccess(key_auth, logger) + data = github_data_access.get_resource_count(url) + if not data: + logger.warning("The API Returned an empty JSON object.") + else: + logger.warning("Committer count data returned in JSON") + except ValueError: + logger.warning("The API did not return valid JSON for committer count.") + + return data def get_repo_data(logger, url, response): data = {} From ed50be2c60c4806a16fdba2beb1dee65a20ba1d6 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 15:30:47 -0500 Subject: [PATCH 147/176] exception handling Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/repo_info/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index e2bd5f496f..a5371ba43c 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -27,6 +27,7 @@ def query_committers_count(key_auth, logger, owner, repo): logger.warning("Committer count data returned in JSON") except ValueError: logger.warning("The API did not return valid JSON for committer count.") + data=0 return data From f510da4dc6c267acaa22c06edfff902c5f7cacc1 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:20:21 -0500 Subject: [PATCH 148/176] trying to fix the empty committer count issue Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/repo_info/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index a5371ba43c..f697f7bf13 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -20,13 +20,18 @@ def query_committers_count(key_auth, logger, owner, repo): try: github_data_access = GithubDataAccess(key_auth, logger) - data = github_data_access.get_resource_count(url) + try: + data = github_data_access.get_resource_count(url) + except Exception as e: + logger.warning(f"JSON Decode error: {e} indicating there are no committers or the repository is empty or archived.") + data = 0 + pass if not data: logger.warning("The API Returned an empty JSON object.") else: logger.warning("Committer count data returned in JSON") except ValueError: - logger.warning("The API did not return valid JSON for committer count.") + logger.warning("The API did not return valid JSON for committer count. This usually occurs on empty or archived repositories.") data=0 return data From 82b91592ac890bf72db8cdaae34ca002ba754904 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:23:47 -0500 Subject: [PATCH 149/176] added some comments explaining the query_committers_count method changes Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/repo_info/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/augur/tasks/github/repo_info/core.py b/augur/tasks/github/repo_info/core.py index f697f7bf13..5a8710e31b 100644 --- a/augur/tasks/github/repo_info/core.py +++ b/augur/tasks/github/repo_info/core.py @@ -17,7 +17,8 @@ def query_committers_count(key_auth, logger, owner, repo): data = {} logger.info('Querying committers count\n') url = f'https://api.github.com/repos/{owner}/{repo}/contributors?per_page=100' - + ## If the repository is empty there are zero committers, and the API returns nothing at all. Response + ## header of 200 along with an empty JSON. try: github_data_access = GithubDataAccess(key_auth, logger) try: From 896721229205dea3c878fcfc142b6bc9faae6f02 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 16:31:26 -0500 Subject: [PATCH 150/176] Making repo GONE log message more clear. Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/github/detect_move/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/github/detect_move/core.py b/augur/tasks/github/detect_move/core.py index db005ce22c..b302a70a06 100644 --- a/augur/tasks/github/detect_move/core.py +++ b/augur/tasks/github/detect_move/core.py @@ -115,7 +115,7 @@ def ping_github_for_repo_move(session, key_auth, repo, logger,collection_hook='c session.commit() - raise Exception("ERROR: Repo has moved! Resetting Collection!") + raise Exception("ERROR: Repo has moved, and there is no redirection! 404 returned, not 301. Resetting Collection!") if attempts >= 10: From 5705644717b0018233b9adefa694c8ad18620919 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 18:01:44 -0500 Subject: [PATCH 151/176] Working to get more information on this error: Traceback (most recent call last): File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/pool.py', line 366, in workloop put((READY, (job, i, result, inqW_fd))) File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/queues.py', line 366, in put self.send_payload(ForkingPickler.dumps(obj)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File '/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/reduction.py', line 56, in dumps cls(buf, protocol).dump(obj) billiard.pool.MaybeEncodingError: Error sending result: ''(1, , None)''. Reason: ''PicklingError('Can\'t pickle : it\'s not the same object as augur.tasks.util.metadata_exception.MetadataException')''. Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/git/dependency_tasks/tasks.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index df21af8a9a..fe9e16c19d 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -21,4 +21,24 @@ def process_ossf_dependency_metrics(self, repo_git): logger = logging.getLogger(process_ossf_dependency_metrics.__name__) - generate_scorecard(logger, repo_git) \ No newline at end of file + try: + generate_scorecard(logger, repo_git) + except Exception as e: + logger.warning(f'Exception generating scorecard: {e}') + raise MetadataException + + """ + This try/except block is an attempt to get more information about this occasional error: + + ```bash + Traceback (most recent call last): + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/pool.py", line 366, in workloop + put((READY, (job, i, result, inqW_fd))) + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/queues.py", line 366, in put + self.send_payload(ForkingPickler.dumps(obj)) + ^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/billiard/reduction.py", line 56, in dumps + cls(buf, protocol).dump(obj) + billiard.pool.MaybeEncodingError: Error sending result: ''(1, , None)''. Reason: ''PicklingError("Can\'t pickle : it\'s not the same object as augur.tasks.util.metadata_exception.MetadataException")''. + ``` + """ \ No newline at end of file From 97fee7e2b4a9ad2f4992cf408c4ca4e83eebcd3d Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Wed, 14 Aug 2024 18:05:41 -0500 Subject: [PATCH 152/176] formatting exception for OpenSSF Scorecard pickling error more typically Signed-off-by: Sean P. Goggins Signed-off-by: Ulincsys --- augur/tasks/git/dependency_tasks/tasks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/augur/tasks/git/dependency_tasks/tasks.py b/augur/tasks/git/dependency_tasks/tasks.py index fe9e16c19d..b104080bb3 100644 --- a/augur/tasks/git/dependency_tasks/tasks.py +++ b/augur/tasks/git/dependency_tasks/tasks.py @@ -21,11 +21,13 @@ def process_ossf_dependency_metrics(self, repo_git): logger = logging.getLogger(process_ossf_dependency_metrics.__name__) - try: + try: generate_scorecard(logger, repo_git) - except Exception as e: + except Exception as e: logger.warning(f'Exception generating scorecard: {e}') - raise MetadataException + tracer = ''.join(traceback.format_exception(type(e), e, e.__traceback__)) + logger.warning(f'Full stack trace of OpenSSF scorecard error: {tracer}') + raise MetadataException(f"An error occurred while generating the scorecard: {str(e)}") """ This try/except block is an attempt to get more information about this occasional error: From ebca962166b93486105eeaffe6ce21986cd9bafc Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Tue, 27 Aug 2024 18:03:41 -0500 Subject: [PATCH 153/176] fix for missing comma, fix misspelling Signed-off-by: Ulincsys --- jumpstart/Client.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jumpstart/Client.py b/jumpstart/Client.py index 32a124c3ba..9a1e6280a8 100644 --- a/jumpstart/Client.py +++ b/jumpstart/Client.py @@ -37,7 +37,7 @@ def loop(self, cbs): if cmd == Command.stop: cbs.stop(body["component"], self) except json.JSONDecodeError: - self.respone(Status.error("Invalid JSON")) + self.respond(Status.error("Invalid JSON")) except Exception as e: self.respond(Status.error(str(e))) console.exception("Exception while handling request: " + line) diff --git a/setup.py b/setup.py index 1c2fa89c2b..8591f483e2 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ "flask_graphql", "wheel", "sendgrid", - "textual>=0.73.0" + "textual>=0.73.0", "alembic==1.8.1", # 1.8.1 "coloredlogs==15.0", # 15.0.1 "Beaker==1.11.0", # 1.11.0 From c0ac99aa938723f19a4c56f7ad27d9bc496ef066 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Fri, 30 Aug 2024 12:04:05 -0500 Subject: [PATCH 154/176] add step to fetch commit messages from older collection Signed-off-by: Isaac Milarsky --- augur/application/db/lib.py | 16 +++++++++++++++ augur/tasks/git/facade_tasks.py | 35 ++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/augur/application/db/lib.py b/augur/application/db/lib.py index 8db495c764..4a9d96482b 100644 --- a/augur/application/db/lib.py +++ b/augur/application/db/lib.py @@ -182,6 +182,22 @@ def get_working_commits_by_repo_id(repo_id): return working_commits +def get_missing_commit_message_hashes(repo_id): + + fetch_missing_hashes_sql = s.sql.text(""" + SELECT DISTINCT cmt_commit_hash FROM commits + WHERE repo_id=:repo_id + AND cmt_commit_hash NOT IN + (SELECT DISTINCT cmt_hash FROM commit_messages WHERE repo_id=:repo_id); + """).bindparams(repo_id=repo_id) + + try: + missing_commit_hashes = fetchall_data_from_sql_text(fetch_missing_hashes_sql) + except: + missing_commit_hashes = [] + + return missing_commit_hashes + def get_worker_oauth_keys(platform: str): with get_session() as session: diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 5fbc27bf7f..fb8f5a427a 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -1,9 +1,11 @@ #SPDX-License-Identifier: MIT import logging +import datetime from celery import group, chain -from augur.application.db.lib import get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts +from subprocess import check_output +from augur.application.db.lib import get_session, get_repo_by_repo_git, get_repo_by_repo_id, remove_working_commits_by_repo_id_and_hashes, get_working_commits_by_repo_id, facade_bulk_insert_commits, bulk_insert_dicts, get_missing_commit_message_hashes from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import trim_commits from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path, get_parent_commits_set, get_existing_commits_set @@ -157,6 +159,36 @@ def facade_start_contrib_analysis_task(): facade_helper.update_status('Updating Contributors') facade_helper.log_activity('Info', 'Updating Contributors with commits') +@celery.task(base=AugurFacadeRepoCollectionTask) +def facade_fetch_missing_commit_messages(repo_git): + logger = logging.getLogger(facade_fetch_missing_commit_messages.__name__) + facade_helper = FacadeHelper(logger) + + repo = get_repo_by_repo_git(repo_git) + + logger.debug(f"Fetching missing commit message records for repo {repo_git}") + + missing_message_hashes = get_missing_commit_message_hashes(repo.repo_id) + + for hash in missing_message_hashes: + + absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name) + repo_loc = (f"{absolute_path}/.git") + + commit_message = check_output( + f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() + ).decode('utf-8').strip() + + msg_record = { + 'repo_id' : repo.repo_id, + 'cmt_msg' : commit_message, + 'cmt_hash' : hash, + 'tool_source' : 'Facade', + 'tool_version' : '0.78?', + 'data_source' : 'git', + 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + } + #enable celery multithreading @celery.task(base=AugurFacadeRepoCollectionTask) @@ -354,6 +386,7 @@ def generate_analysis_sequence(logger,repo_git, facade_helper): analysis_sequence.append(trim_commits_post_analysis_facade_task.si(repo_git)) + analysis_sequence.append(facade_fetch_missing_commit_messages.si(repo_git)) analysis_sequence.append(facade_analysis_end_facade_task.si()) From 7dd6fcafaf73d7055b8e726316b170656d965f73 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Fri, 30 Aug 2024 13:16:38 -0500 Subject: [PATCH 155/176] docs Signed-off-by: Sean P. Goggins --- docs/rabbitmq-troubleshooting.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/rabbitmq-troubleshooting.md diff --git a/docs/rabbitmq-troubleshooting.md b/docs/rabbitmq-troubleshooting.md new file mode 100644 index 0000000000..e29efa1c03 --- /dev/null +++ b/docs/rabbitmq-troubleshooting.md @@ -0,0 +1,6 @@ +#Troubleshooting RabbitMQ Issues: + +set rabbitmq consumer timeout to 200 hours +``` +sudo rabbitmqctl eval 'application:set_env(rabbit, consumer_timeout, 720000000).' +``` From 07d4e922d30d9da498131d74b7ab62b5ad1e2591 Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Sat, 31 Aug 2024 06:44:09 -0500 Subject: [PATCH 156/176] forgot to add insert Signed-off-by: Isaac Milarsky --- augur/tasks/git/facade_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index fb8f5a427a..ca1ee4d741 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -170,6 +170,8 @@ def facade_fetch_missing_commit_messages(repo_git): missing_message_hashes = get_missing_commit_message_hashes(repo.repo_id) + to_insert = [] + for hash in missing_message_hashes: absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name) @@ -188,6 +190,14 @@ def facade_fetch_missing_commit_messages(repo_git): 'data_source' : 'git', 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') } + + if len(to_insert) >= 1000: + bulk_insert_dicts(logger,to_insert, CommitMessage, ["repo_id","cmt_hash"]) + + to_insert.append(msg_record) + + if to_insert: + bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) #enable celery multithreading From 08714783bc021eb335f3af39c1e070df5529131f Mon Sep 17 00:00:00 2001 From: Isaac Milarsky Date: Sat, 31 Aug 2024 19:43:28 -0500 Subject: [PATCH 157/176] missing list clear Signed-off-by: Isaac Milarsky --- augur/tasks/git/facade_tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index ca1ee4d741..441cb91cf0 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -193,6 +193,7 @@ def facade_fetch_missing_commit_messages(repo_git): if len(to_insert) >= 1000: bulk_insert_dicts(logger,to_insert, CommitMessage, ["repo_id","cmt_hash"]) + to_insert = [] to_insert.append(msg_record) From 4d27403c8d1846daf064d35e9e15b395e611cf57 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:28:25 -0500 Subject: [PATCH 158/176] update Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 75aa2759e3..b2fd948ff3 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,6 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." + SCORECARD_DIR = $HOME/scorecard git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From e6c13da0a1d3672164cbeed9f99cc6a32b7f9434 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:29:54 -0500 Subject: [PATCH 159/176] install go update: Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index b2fd948ff3..37eaa93558 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,7 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." - SCORECARD_DIR = $HOME/scorecard + SCORECARD_DIR = $HOME/scorecard; git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From d6c2bb8702ccc0e06a9d4caa842cce8da239d5da Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:32:04 -0500 Subject: [PATCH 160/176] update Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 37eaa93558..bf18f6f4d1 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,7 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." - SCORECARD_DIR = $HOME/scorecard; + export SCORECARD_DIR = "$HOME/scorecard"; git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From 1f9f16cd5454252a64b4318dd38507805bfe0f6e Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:33:21 -0500 Subject: [PATCH 161/176] syntax error on scripts fixed Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index bf18f6f4d1..a4bebdfcbc 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,7 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." - export SCORECARD_DIR = "$HOME/scorecard"; + export SCORECARD_DIR = '$HOME/scorecard'; git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From f8ef7487de7d4d666e5ace045dc0a2d8941a5e2f Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:34:41 -0500 Subject: [PATCH 162/176] hmmm Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index a4bebdfcbc..7077631ed8 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,7 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." - export SCORECARD_DIR = '$HOME/scorecard'; + export SCORECARD_DIR='$HOME/scorecard'; git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From 0da43e8ad1191013dad904d7ffddbcfd25fcd747 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 3 Sep 2024 09:38:17 -0500 Subject: [PATCH 163/176] syntax Signed-off-by: Sean P. Goggins --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 7077631ed8..39a179cafb 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -72,7 +72,7 @@ if [ -d "$HOME/scorecard" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." - export SCORECARD_DIR='$HOME/scorecard'; + export SCORECARD_DIR="$HOME/scorecard" git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; From 25277fd09817520131bba602011ec82305764093 Mon Sep 17 00:00:00 2001 From: Sean Goggins Date: Tue, 3 Sep 2024 14:47:58 +0000 Subject: [PATCH 164/176] update version Signed-off-by: Ubuntu --- metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metadata.py b/metadata.py index 5cc02b504c..ae807e7a36 100644 --- a/metadata.py +++ b/metadata.py @@ -5,8 +5,8 @@ __short_description__ = "Python 3 package for free/libre and open-source software community metrics, models & data collection" -__version__ = "0.76.1" -__release__ = "v0.76.1 (For the Good of the Data)" +__version__ = "0.76.2" +__release__ = "v0.76.2 (Pumpkin Space)" __license__ = "MIT" __copyright__ = "University of Missouri, University of Nebraska-Omaha, CHAOSS, Brian Warner & Augurlabs 2024" From e73bed524a5a3b605b1af0f3641bf2a22915f04b Mon Sep 17 00:00:00 2001 From: Sean Goggins Date: Tue, 3 Sep 2024 20:34:21 +0000 Subject: [PATCH 165/176] README update Signed-off-by: Sean Goggins --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b5b55526dc..0ff218d81e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Augur NEW Release v0.76.1 +# Augur NEW Release v0.76.2 Augur is primarily a data engineering tool that makes it possible for data scientists to gather open source software community data. Less data carpentry for everyone else! The primary way of looking at Augur data is through [8Knot](https://github.com/oss-aspen/8knot) ... A public instance of 8Knot is available at https://metrix.chaoss.io ... That is tied to a public instance of Augur at https://ai.chaoss.io @@ -10,7 +10,7 @@ The primary way of looking at Augur data is through [8Knot](https://github.com/o ## NEW RELEASE ALERT! ### [If you want to jump right in, updated docker build/compose and bare metal installation instructions are available here](docs/new-install.md) -Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.76.1 +Augur is now releasing a dramatically improved new version to the main branch. It is also available here: https://github.com/chaoss/augur/releases/tag/v0.76.2 - The `main` branch is a stable version of our new architecture, which features: - Dramatic improvement in the speed of large scale data collection (100,000+ repos). All data is obtained for 100k+ repos within 2 weeks. From 51cebaa9f5a089481c4353cc42cd8678cd5ba5bf Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Tue, 3 Sep 2024 17:12:17 -0500 Subject: [PATCH 166/176] Checkout requisite change from a1f3f8d078 Signed-off-by: Ulincsys --- scripts/install/workers.sh | 66 ++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 39a179cafb..61604808bc 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -39,7 +39,7 @@ do done -if [ -f "/usr/local/go/bin/go" ] || [ -f "/usr/local/bin/go" ] || [ -f "/usr/bin/go" ] || [ -f "/snap/bin/go" ] || [ -f "/opt/homebrew/bin/go" ]; then +if [ -f "/usr/local/go/bin/go" ] || [ -f "/usr/local/bin/go" ] || [ -f "/usr/bin/go" ] || [ -f "/snap/bin/go" ]; then echo "found go!" else echo "Installing go!" @@ -49,30 +49,35 @@ else export PATH=$PATH:$GOROOT/bin:$GOPATH/bin fi -if [ -d "$HOME/scorecard" ]; then - echo " Scorecard already exists, skipping cloning ..." - echo " Updating Scorecard ... " - #rm -rf $HOME/scorecard - #echo "Cloning OSSF Scorecard to generate scorecard data ..." - #git clone https://github.com/ossf/scorecard $HOME/scorecard - #cd $HOME/scorecard - CURRENT_DIR=$PWD; - cd $CURRENT_DIR - cd $HOME/scorecard; - #go build; - #echo "scorecard build done" - #cd $CURRENT_DIR - #CURRENT_DIR=$PWD; - #cd $HOME/scorecard; - git pull; - go mod tidy; - go build; - echo "Scorecard build done." - cd $CURRENT_DIR +SCORECARD_DIR="$HOME/scorecard" + +# read -r -p "What directory would you like to use for OSSF Scorecard? [$HOME/scorecard] " response +# TODO: scorecard directory must be configurable +if [ -d "$SCORECARD_DIR" ]; then + echo " Scorecard directory already exists, would you like to skip cloning and building?" + echo " Only do this if Scorecard has been cloned and built in this directory before." + read -r -p "If you choose NO (the default), Everything in $SCORECARD_DIR will be DELETED [y/N]: " response + case "$response" in + [yY][eE][sS]|[yY]) + echo " Skipping scorecard build" + ;; + *) + echo " Cloning Scorecard ... " + rm -rf $SCORECARD_DIR + echo "Cloning OSSF Scorecard to generate scorecard data ..." + git clone https://github.com/ossf/scorecard $SCORECARD_DIR + cd $SCORECARD_DIR + CURRENT_DIR=$PWD; + cd $CURRENT_DIR + cd $SCORECARD_DIR; + go build; + echo "scorecard build done" + cd $CURRENT_DIR + ;; + esac else echo "Cloning OSSF Scorecard to generate scorecard data ..." - export SCORECARD_DIR="$HOME/scorecard" git clone https://github.com/ossf/scorecard $SCORECARD_DIR cd $SCORECARD_DIR CURRENT_DIR=$PWD; @@ -82,20 +87,3 @@ else echo "scorecard build done" cd $CURRENT_DIR fi - -#Do the same thing for scc for value worker -if [ -d "$HOME/scc" ]; then - echo " Scc already exists, skipping cloning ..." - echo " Updating Scc ... " - rm -rf $HOME/scc -fi - -echo "Cloning Sloc Cloc and Code (SCC) to generate value data ..." -git clone https://github.com/boyter/scc $HOME/scc -cd $HOME/scc -CURRENT_DIR=$PWD; -cd $CURRENT_DIR -cd $HOME/scc; -go build; -echo "scc build done" -cd $CURRENT_DIR From 47df77d005ce118724d618fd27b02ebd67f96f09 Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Tue, 3 Sep 2024 19:09:04 -0500 Subject: [PATCH 167/176] Update script with FF changes Signed-off-by: Ulincsys --- scripts/install/workers.sh | 50 +++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 61604808bc..2b944e43a5 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -57,20 +57,25 @@ SCORECARD_DIR="$HOME/scorecard" if [ -d "$SCORECARD_DIR" ]; then echo " Scorecard directory already exists, would you like to skip cloning and building?" echo " Only do this if Scorecard has been cloned and built in this directory before." - read -r -p "If you choose NO (the default), Everything in $SCORECARD_DIR will be DELETED [y/N]: " response + read -r -p "If you choose NO (the default), Scorecard will be updated [y/N]: " response case "$response" in [yY][eE][sS]|[yY]) echo " Skipping scorecard build" ;; *) - echo " Cloning Scorecard ... " - rm -rf $SCORECARD_DIR - echo "Cloning OSSF Scorecard to generate scorecard data ..." - git clone https://github.com/ossf/scorecard $SCORECARD_DIR - cd $SCORECARD_DIR + echo "Updating OSSF Scorecard..." CURRENT_DIR=$PWD; - cd $CURRENT_DIR - cd $SCORECARD_DIR; + cd $SCORECARD_DIR + + # Check that dir is valid scorecard repo + SCORECARD_URL="$(git remote get-url origin || true)" + if [[ "$SCORECARD_URL" != *"ossf/scorecard"* ]]; then + echo "ERROR: $PWD is not an existing scorecard directory" + exit 127 + fi + + git pull + go mod tidy go build; echo "scorecard build done" cd $CURRENT_DIR @@ -79,11 +84,34 @@ if [ -d "$SCORECARD_DIR" ]; then else echo "Cloning OSSF Scorecard to generate scorecard data ..." git clone https://github.com/ossf/scorecard $SCORECARD_DIR - cd $SCORECARD_DIR CURRENT_DIR=$PWD; - cd $CURRENT_DIR - cd $SCORECARD_DIR; + cd $SCORECARD_DIR go build; echo "scorecard build done" cd $CURRENT_DIR fi + +#Do the same thing for scc for value worker +SCC_DIR="$HOME/scc" +CURRENT_DIR=$PWD; + +if [ -d "$SCC_DIR" ]; then + echo " Scc already exists, updating..." + cd $SCC_DIR + # Check that dir is valid scc repo + SCC_URL="$(git remote get-url origin || true)" + if [[ "$SCC_URL" != *"boyter/scc"* ]]; then + echo "ERROR: $PWD is not an existing scc directory" + exit 127 + fi + + git pull +else + echo "Cloning Sloc Cloc and Code (SCC) to generate value data ..." + git clone https://github.com/boyter/scc "$SCC_DIR" + cd $SCC_DIR +fi + +go build; +echo "scc build done" +cd $CURRENT_DIR From 29221acc0afc175c732a243e315e97c415dac2bb Mon Sep 17 00:00:00 2001 From: Ulincsys Date: Tue, 3 Sep 2024 19:19:53 -0500 Subject: [PATCH 168/176] Simplify finding go Signed-off-by: Ulincsys --- scripts/install/workers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/workers.sh b/scripts/install/workers.sh index 2b944e43a5..e31fb07d32 100755 --- a/scripts/install/workers.sh +++ b/scripts/install/workers.sh @@ -39,7 +39,7 @@ do done -if [ -f "/usr/local/go/bin/go" ] || [ -f "/usr/local/bin/go" ] || [ -f "/usr/bin/go" ] || [ -f "/snap/bin/go" ]; then +if [[ ! -z "$(which go)" ]]; then echo "found go!" else echo "Installing go!" From 29c4ec15a93f52be258cc0565d8107c41a6ca500 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 14:41:05 +0200 Subject: [PATCH 169/176] update Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 441cb91cf0..3678d95844 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -175,7 +175,7 @@ def facade_fetch_missing_commit_messages(repo_git): for hash in missing_message_hashes: absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name) - repo_loc = (f"{absolute_path}/.git") + repo_loc = (f"{absolute_path}.git") commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() From 0bc34b7a6391b05aa626212d89e693ba0b15c765 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:14:09 +0200 Subject: [PATCH 170/176] bug fixing Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 3678d95844..ddd8979734 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -175,7 +175,7 @@ def facade_fetch_missing_commit_messages(repo_git): for hash in missing_message_hashes: absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name) - repo_loc = (f"{absolute_path}.git") + repo_loc = (f"{absolute_path}") commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() From 0707b221fce8a243d1bb3c7e25bb4f736b7a0c0d Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:26:42 +0200 Subject: [PATCH 171/176] update Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index ddd8979734..293fbdc58e 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -173,9 +173,9 @@ def facade_fetch_missing_commit_messages(repo_git): to_insert = [] for hash in missing_message_hashes: - - absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path,repo.repo_name) - repo_loc = (f"{absolute_path}") + #Get the huge list of commits to process. + absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name) + repo_loc = (f"{absolute_path}/.git") commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() From 30bbfc7c34abaa863d6432eddb87e47c7b0d3550 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:29:42 +0200 Subject: [PATCH 172/176] update debug Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 49 ++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 293fbdc58e..ab26574753 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -177,28 +177,33 @@ def facade_fetch_missing_commit_messages(repo_git): absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name) repo_loc = (f"{absolute_path}/.git") - commit_message = check_output( - f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() - ).decode('utf-8').strip() - - msg_record = { - 'repo_id' : repo.repo_id, - 'cmt_msg' : commit_message, - 'cmt_hash' : hash, - 'tool_source' : 'Facade', - 'tool_version' : '0.78?', - 'data_source' : 'git', - 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') - } - - if len(to_insert) >= 1000: - bulk_insert_dicts(logger,to_insert, CommitMessage, ["repo_id","cmt_hash"]) - to_insert = [] - - to_insert.append(msg_record) - - if to_insert: - bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) + try: + + commit_message = check_output( + f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() + ).decode('utf-8').strip() + + msg_record = { + 'repo_id' : repo.repo_id, + 'cmt_msg' : commit_message, + 'cmt_hash' : hash, + 'tool_source' : 'Facade', + 'tool_version' : '0.78?', + 'data_source' : 'git', + 'data_collection_date' : datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + } + + if len(to_insert) >= 1000: + bulk_insert_dicts(logger,to_insert, CommitMessage, ["repo_id","cmt_hash"]) + to_insert = [] + + to_insert.append(msg_record) + + if to_insert: + bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) + + except Exception as e: + logger.info(f'The error message is {e}') #enable celery multithreading From f220b8cf7bf88ddd4a7a9a792e04d8ea5ecf07e0 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:30:37 +0200 Subject: [PATCH 173/176] update Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index ab26574753..b899cb05f4 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -204,6 +204,7 @@ def facade_fetch_missing_commit_messages(repo_git): except Exception as e: logger.info(f'The error message is {e}') + continue #enable celery multithreading From 9c2fd1b6b70a24f6f26ab7af7f8abc722cc41903 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:33:34 +0200 Subject: [PATCH 174/176] update Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index b899cb05f4..3e781e34df 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -177,8 +177,7 @@ def facade_fetch_missing_commit_messages(repo_git): absolute_path = get_absolute_repo_path(facade_helper.repo_base_directory, repo.repo_id, repo.repo_path, repo.repo_name) repo_loc = (f"{absolute_path}/.git") - try: - + try: commit_message = check_output( f"git --git-dir {repo_loc} log --format=%B -n 1 {hash}".split() ).decode('utf-8').strip() @@ -198,13 +197,11 @@ def facade_fetch_missing_commit_messages(repo_git): to_insert = [] to_insert.append(msg_record) - - if to_insert: - bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) - except Exception as e: - logger.info(f'The error message is {e}') - continue + logger.info(f'The exception is : {3}.') + + if to_insert: + bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) #enable celery multithreading From 7546a6879e6f1cf0306318c550366e120f687384 Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Thu, 12 Sep 2024 15:43:04 +0200 Subject: [PATCH 175/176] update Signed-off-by: Sean P. Goggins --- augur/tasks/git/facade_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/augur/tasks/git/facade_tasks.py b/augur/tasks/git/facade_tasks.py index 3e781e34df..7ff2300a90 100644 --- a/augur/tasks/git/facade_tasks.py +++ b/augur/tasks/git/facade_tasks.py @@ -198,7 +198,7 @@ def facade_fetch_missing_commit_messages(repo_git): to_insert.append(msg_record) except Exception as e: - logger.info(f'The exception is : {3}.') + logger.info(f'The exception is : {e}.') if to_insert: bulk_insert_dicts(logger, to_insert, CommitMessage, ["repo_id","cmt_hash"]) From ef39e847566b7a395d289e461839e9e020a6a5cd Mon Sep 17 00:00:00 2001 From: "Sean P. Goggins" Date: Tue, 24 Sep 2024 18:49:30 -0500 Subject: [PATCH 176/176] libyear API endpoint added Signed-off-by: Sean P. Goggins --- augur/api/metrics/deps.py | 158 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/augur/api/metrics/deps.py b/augur/api/metrics/deps.py index 909ae4cb51..486fd1ec49 100644 --- a/augur/api/metrics/deps.py +++ b/augur/api/metrics/deps.py @@ -77,4 +77,162 @@ def deps(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=No return results +@register_metric() +def libyear(repo_group_id, repo_id=None, period='day', begin_date=None, end_date=None): + """ + Returns a list of all the dependencies in a project/repo/repo_group. + + :param repo_id: The repository's id + :param repo_group_id: The repository's group id + :param period: To set the periodicity to 'day', 'week', 'month' or 'year', defaults to 'day' + :param begin_date: Specifies the begin date, defaults to '1970-1-1 00:00:00' + :param end_date: Specifies the end date, defaults to datetime.now() + :return: DataFrame of persons/period + """ + + if not begin_date: + begin_date = '1970-1-1 00:00:01' + if not end_date: + end_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + + if repo_id: + + libyearSQL = s.sql.text(""" + SELECT + rg_name, + repo_group_id, + repo_name, + d.repo_id, + repo_git, + forked_from, + repo_archived, + c.name, + c.libyear, + MAX ( C.data_collection_date ) AS most_recent_collection + FROM + ( + SELECT A.rg_name AS rg_name, + A.repo_group_id AS repo_group_id, + b.repo_name AS repo_name, + b.repo_id AS repo_id, + b.repo_git AS repo_git, + b.forked_from AS forked_from, + b.repo_archived AS repo_archived + FROM + repo_groups A, + repo b + WHERE + A.repo_group_id = b.repo_group_id + ORDER BY + rg_name, + repo_name + ) d, + ( + SELECT DISTINCT + f.repo_id, + f.NAME, + f.libyear, + f.data_collection_date + FROM + ( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM augur_data.repo_deps_libyear WHERE repo_id = :repo_id GROUP BY repo_id, NAME ORDER BY NAME ) e, + augur_data.repo_deps_libyear f + WHERE + e.data_collection_date = f.data_collection_date and + e.repo_id = f.repo_id + ORDER BY + NAME + ) C + WHERE + d.repo_id = C.repo_id + AND C.repo_id = :repo_id + GROUP BY + rg_name, + repo_git, + repo_group_id, + repo_name, + d.repo_id, + forked_from, + repo_archived, + c.name, + c.libyear + ORDER BY + repo_id; + """) + + with current_app.engine.connect() as conn: + results = pd.read_sql(libyearSQL, conn, params={'repo_id': repo_id}) + + else: + + libyearSQL = s.sql.text(""" + Select w.* from + ( + SELECT + rg_name, + repo_group_id, + repo_name, + d.repo_id, + repo_git, + forked_from, + repo_archived, + c.name, + c.libyear, + MAX ( C.data_collection_date ) AS most_recent_collection + FROM + ( + SELECT A.rg_name AS rg_name, + A.repo_group_id AS repo_group_id, + b.repo_name AS repo_name, + b.repo_id AS repo_id, + b.repo_git AS repo_git, + b.forked_from AS forked_from, + b.repo_archived AS repo_archived + FROM + repo_groups A, + repo b + WHERE + A.repo_group_id = b.repo_group_id + ORDER BY + rg_name, + repo_name + ) d, + ( + SELECT DISTINCT + f.repo_id, + f.NAME, + f.libyear, + f.data_collection_date + FROM + ( SELECT repo_id, NAME, MAX ( data_collection_date ) AS data_collection_date FROM augur_data.repo_deps_libyear GROUP BY repo_id, NAME ORDER BY NAME ) e, + augur_data.repo_deps_libyear f + WHERE + e.data_collection_date = f.data_collection_date and + e.repo_id = f.repo_id + ORDER BY + NAME + ) C + WHERE + d.repo_id = C.repo_id + GROUP BY + rg_name, + repo_git, + repo_group_id, + repo_name, + d.repo_id, + forked_from, + repo_archived, + c.name, + c.libyear + ORDER BY + repo_id) w, + repo_groups y, + repo z + where w.repo_id=z.repo_id and + y.repo_group_id=z.repo_group_id + and z.repo_group_id = :repo_group_id + """) + + with current_app.engine.connect() as conn: + results = pd.read_sql(libyearSQL, conn, params={'repo_group_id': repo_group_id}) + return results