{"action":"created","comment":{"url":"https://api.github.com/repos/erdc/quest/pulls/comments/218867223","pull_request_review_id":156902064,"id":218867223,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODg2NzIyMw==","diff_hunk":"@@ -0,0 +1,257 @@\n+import json\n+import itertools\n+import pandas as pd\n+import numpy as np\n+import geojson\n+from shapely.geometry import shape\n+\n+from .. import util\n+from .. import plugins\n+from quest.database.database import get_db, db_session\n+from .datasets import new_dataset\n+from .metadata import get_metadata\n+from ..util import construct_service_uri\n+from .tasks import add_async\n+from ..static import DatasetSource\n+\n+\n+@add_async\n+def add_datasets(collection, catalog_entries):\n+    \"\"\"\n+\n+    Args:\n+        collection (string, Required):\n+            name of collection\n+        datasets (string, comma separated strings,list of strings, or pandas DataFrame, Required):\n+            list of ? to add to the collection.\n+\n+    Returns:\n+        uris (list):\n+            uris of ?\n+    \"\"\"\n+    if not isinstance(catalog_entries, pd.DataFrame):\n+        entries = get_metadata(catalog_entries, as_dataframe=True)\n+\n+    uris = []\n+    for _, data in entries.iterrows():\n+        source = DatasetSource.WEB_SERVICE\n+        if 'quest' in data['service']:\n+            source = DatasetSource.DERIVED\n+        uri = new_dataset(collection=collection, catalog_entry=data.to_frame().transpose(), source=source)\n+        uris.append(uri)\n+\n+    return uris\n+\n+\n+@add_async\n+def search_catalog(uris=None, expand=False, as_dataframe=False, as_geojson=False,\n+                 update_cache=False, filters=None, queries=None):","path":"quest/api/catalog.py","position":48,"original_position":48,"commit_id":"d8d5bc83e3701f80955474a9ccdc4ef90f7a1903","original_commit_id":"d8d5bc83e3701f80955474a9ccdc4ef90f7a1903","user":{"login":"stickler-ci","id":16011037,"node_id":"MDQ6VXNlcjE2MDExMDM3","avatar_url":"https://avatars3.githubusercontent.com/u/16011037?v=4","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"E128 continuation line under-indented for visual indent","created_at":"2018-09-19T16:08:41Z","updated_at":"2018-09-19T16:08:44Z","html_url":"https://github.com/erdc/quest/pull/110#discussion_r218867223","pull_request_url":"https://api.github.com/repos/erdc/quest/pulls/110","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/erdc/quest/pulls/comments/218867223"},"html":{"href":"https://github.com/erdc/quest/pull/110#discussion_r218867223"},"pull_request":{"href":"https://api.github.com/repos/erdc/quest/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/erdc/quest/pulls/110","id":215070991,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MDcwOTkx","html_url":"https://github.com/erdc/quest/pull/110","diff_url":"https://github.com/erdc/quest/pull/110.diff","patch_url":"https://github.com/erdc/quest/pull/110.patch","issue_url":"https://api.github.com/repos/erdc/quest/issues/110","number":110,"state":"open","locked":false,"title":"Feature refactor","user":{"login":"AaronV77","id":18250512,"node_id":"MDQ6VXNlcjE4MjUwNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/18250512?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronV77","html_url":"https://github.com/AaronV77","followers_url":"https://api.github.com/users/AaronV77/followers","following_url":"https://api.github.com/users/AaronV77/following{/other_user}","gists_url":"https://api.github.com/users/AaronV77/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronV77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronV77/subscriptions","organizations_url":"https://api.github.com/users/AaronV77/orgs","repos_url":"https://api.github.com/users/AaronV77/repos","events_url":"https://api.github.com/users/AaronV77/events{/privacy}","received_events_url":"https://api.github.com/users/AaronV77/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-12T19:31:56Z","updated_at":"2018-09-19T16:08:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cfd0c80ffccd647f3fb693f28445afac5089c7e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/erdc/quest/pulls/110/commits","review_comments_url":"https://api.github.com/repos/erdc/quest/pulls/110/comments","review_comment_url":"https://api.github.com/repos/erdc/quest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erdc/quest/issues/110/comments","statuses_url":"https://api.github.com/repos/erdc/quest/statuses/d8d5bc83e3701f80955474a9ccdc4ef90f7a1903","head":{"label":"AaronV77:feature_refactor","ref":"feature_refactor","sha":"d8d5bc83e3701f80955474a9ccdc4ef90f7a1903","user":{"login":"AaronV77","id":18250512,"node_id":"MDQ6VXNlcjE4MjUwNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/18250512?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronV77","html_url":"https://github.com/AaronV77","followers_url":"https://api.github.com/users/AaronV77/followers","following_url":"https://api.github.com/users/AaronV77/following{/other_user}","gists_url":"https://api.github.com/users/AaronV77/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronV77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronV77/subscriptions","organizations_url":"https://api.github.com/users/AaronV77/orgs","repos_url":"https://api.github.com/users/AaronV77/repos","events_url":"https://api.github.com/users/AaronV77/events{/privacy}","received_events_url":"https://api.github.com/users/AaronV77/received_events","type":"User","site_admin":false},"repo":{"id":121797393,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE3OTczOTM=","name":"quest","full_name":"AaronV77/quest","private":false,"owner":{"login":"AaronV77","id":18250512,"node_id":"MDQ6VXNlcjE4MjUwNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/18250512?v=4","gravatar_id":"","url":"https://api.github.com/users/AaronV77","html_url":"https://github.com/AaronV77","followers_url":"https://api.github.com/users/AaronV77/followers","following_url":"https://api.github.com/users/AaronV77/following{/other_user}","gists_url":"https://api.github.com/users/AaronV77/gists{/gist_id}","starred_url":"https://api.github.com/users/AaronV77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AaronV77/subscriptions","organizations_url":"https://api.github.com/users/AaronV77/orgs","repos_url":"https://api.github.com/users/AaronV77/repos","events_url":"https://api.github.com/users/AaronV77/events{/privacy}","received_events_url":"https://api.github.com/users/AaronV77/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AaronV77/quest","description":"Quest is a Python library that is able to download and publish data from remote servers, and has the ability to do transformations on data.","fork":true,"url":"https://api.github.com/repos/AaronV77/quest","forks_url":"https://api.github.com/repos/AaronV77/quest/forks","keys_url":"https://api.github.com/repos/AaronV77/quest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AaronV77/quest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AaronV77/quest/teams","hooks_url":"https://api.github.com/repos/AaronV77/quest/hooks","issue_events_url":"https://api.github.com/repos/AaronV77/quest/issues/events{/number}","events_url":"https://api.github.com/repos/AaronV77/quest/events","assignees_url":"https://api.github.com/repos/AaronV77/quest/assignees{/user}","branches_url":"https://api.github.com/repos/AaronV77/quest/branches{/branch}","tags_url":"https://api.github.com/repos/AaronV77/quest/tags","blobs_url":"https://api.github.com/repos/AaronV77/quest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AaronV77/quest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AaronV77/quest/git/refs{/sha}","trees_url":"https://api.github.com/repos/AaronV77/quest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AaronV77/quest/statuses/{sha}","languages_url":"https://api.github.com/repos/AaronV77/quest/languages","stargazers_url":"https://api.github.com/repos/AaronV77/quest/stargazers","contributors_url":"https://api.github.com/repos/AaronV77/quest/contributors","subscribers_url":"https://api.github.com/repos/AaronV77/quest/subscribers","subscription_url":"https://api.github.com/repos/AaronV77/quest/subscription","commits_url":"https://api.github.com/repos/AaronV77/quest/commits{/sha}","git_commits_url":"https://api.github.com/repos/AaronV77/quest/git/commits{/sha}","comments_url":"https://api.github.com/repos/AaronV77/quest/comments{/number}","issue_comment_url":"https://api.github.com/repos/AaronV77/quest/issues/comments{/number}","contents_url":"https://api.github.com/repos/AaronV77/quest/contents/{+path}","compare_url":"https://api.github.com/repos/AaronV77/quest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AaronV77/quest/merges","archive_url":"https://api.github.com/repos/AaronV77/quest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AaronV77/quest/downloads","issues_url":"https://api.github.com/repos/AaronV77/quest/issues{/number}","pulls_url":"https://api.github.com/repos/AaronV77/quest/pulls{/number}","milestones_url":"https://api.github.com/repos/AaronV77/quest/milestones{/number}","notifications_url":"https://api.github.com/repos/AaronV77/quest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AaronV77/quest/labels{/name}","releases_url":"https://api.github.com/repos/AaronV77/quest/releases{/id}","deployments_url":"https://api.github.com/repos/AaronV77/quest/deployments","created_at":"2018-02-16T20:28:39Z","updated_at":"2018-03-06T04:05:25Z","pushed_at":"2018-09-19T16:08:30Z","git_url":"git://github.com/AaronV77/quest.git","ssh_url":"git@github.com:AaronV77/quest.git","clone_url":"https://github.com/AaronV77/quest.git","svn_url":"https://github.com/AaronV77/quest","homepage":"","size":10848,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"erdc:master","ref":"master","sha":"1fa4d2596f83340f66f742017d10cd659f618285","user":{"login":"erdc","id":616627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNjYyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/616627?v=4","gravatar_id":"","url":"https://api.github.com/users/erdc","html_url":"https://github.com/erdc","followers_url":"https://api.github.com/users/erdc/followers","following_url":"https://api.github.com/users/erdc/following{/other_user}","gists_url":"https://api.github.com/users/erdc/gists{/gist_id}","starred_url":"https://api.github.com/users/erdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erdc/subscriptions","organizations_url":"https://api.github.com/users/erdc/orgs","repos_url":"https://api.github.com/users/erdc/repos","events_url":"https://api.github.com/users/erdc/events{/privacy}","received_events_url":"https://api.github.com/users/erdc/received_events","type":"Organization","site_admin":false},"repo":{"id":120786584,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA3ODY1ODQ=","name":"quest","full_name":"erdc/quest","private":false,"owner":{"login":"erdc","id":616627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNjYyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/616627?v=4","gravatar_id":"","url":"https://api.github.com/users/erdc","html_url":"https://github.com/erdc","followers_url":"https://api.github.com/users/erdc/followers","following_url":"https://api.github.com/users/erdc/following{/other_user}","gists_url":"https://api.github.com/users/erdc/gists{/gist_id}","starred_url":"https://api.github.com/users/erdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erdc/subscriptions","organizations_url":"https://api.github.com/users/erdc/orgs","repos_url":"https://api.github.com/users/erdc/repos","events_url":"https://api.github.com/users/erdc/events{/privacy}","received_events_url":"https://api.github.com/users/erdc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/erdc/quest","description":"Python API for downloading and managing data. Checkout the documentation at:","fork":false,"url":"https://api.github.com/repos/erdc/quest","forks_url":"https://api.github.com/repos/erdc/quest/forks","keys_url":"https://api.github.com/repos/erdc/quest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erdc/quest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erdc/quest/teams","hooks_url":"https://api.github.com/repos/erdc/quest/hooks","issue_events_url":"https://api.github.com/repos/erdc/quest/issues/events{/number}","events_url":"https://api.github.com/repos/erdc/quest/events","assignees_url":"https://api.github.com/repos/erdc/quest/assignees{/user}","branches_url":"https://api.github.com/repos/erdc/quest/branches{/branch}","tags_url":"https://api.github.com/repos/erdc/quest/tags","blobs_url":"https://api.github.com/repos/erdc/quest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erdc/quest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erdc/quest/git/refs{/sha}","trees_url":"https://api.github.com/repos/erdc/quest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erdc/quest/statuses/{sha}","languages_url":"https://api.github.com/repos/erdc/quest/languages","stargazers_url":"https://api.github.com/repos/erdc/quest/stargazers","contributors_url":"https://api.github.com/repos/erdc/quest/contributors","subscribers_url":"https://api.github.com/repos/erdc/quest/subscribers","subscription_url":"https://api.github.com/repos/erdc/quest/subscription","commits_url":"https://api.github.com/repos/erdc/quest/commits{/sha}","git_commits_url":"https://api.github.com/repos/erdc/quest/git/commits{/sha}","comments_url":"https://api.github.com/repos/erdc/quest/comments{/number}","issue_comment_url":"https://api.github.com/repos/erdc/quest/issues/comments{/number}","contents_url":"https://api.github.com/repos/erdc/quest/contents/{+path}","compare_url":"https://api.github.com/repos/erdc/quest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erdc/quest/merges","archive_url":"https://api.github.com/repos/erdc/quest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erdc/quest/downloads","issues_url":"https://api.github.com/repos/erdc/quest/issues{/number}","pulls_url":"https://api.github.com/repos/erdc/quest/pulls{/number}","milestones_url":"https://api.github.com/repos/erdc/quest/milestones{/number}","notifications_url":"https://api.github.com/repos/erdc/quest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erdc/quest/labels{/name}","releases_url":"https://api.github.com/repos/erdc/quest/releases{/id}","deployments_url":"https://api.github.com/repos/erdc/quest/deployments","created_at":"2018-02-08T16:27:45Z","updated_at":"2018-09-07T18:06:11Z","pushed_at":"2018-09-19T16:08:32Z","git_url":"git://github.com/erdc/quest.git","ssh_url":"git@github.com:erdc/quest.git","clone_url":"https://github.com/erdc/quest.git","svn_url":"https://github.com/erdc/quest","homepage":"https://quest.readthedocs.io/en/latest/","size":10777,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":21,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erdc/quest/pulls/110"},"html":{"href":"https://github.com/erdc/quest/pull/110"},"issue":{"href":"https://api.github.com/repos/erdc/quest/issues/110"},"comments":{"href":"https://api.github.com/repos/erdc/quest/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/erdc/quest/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/erdc/quest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erdc/quest/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/erdc/quest/statuses/d8d5bc83e3701f80955474a9ccdc4ef90f7a1903"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stickler-ci"}}