{"action":"created","comment":{"url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/comments/138456071","pull_request_review_id":62254676,"id":138456071,"diff_hunk":"@@ -0,0 +1,256 @@\n+\"\"\"\n+Utility script to read the list of topics from mongodb and insert mandatory\n+id and reference tags for these topics. The script only works for topics\n+with the naming convention /campus/building/device/<optional sub device>/point.\n+A error will be displayed for any topics that do not conform to this naming\n+convention and will be skipped.\n+\n+**Configure user configuration variables right below imports before running the\n+scripts.**\n+\n+By default the script only set id field and parent references but if there are\n+other common tags that apply to ALL campus, building, device, or point, you\n+could update the tags variable in get_campus_tags, get_site_tags,\n+get_equip_tags, and get_point_tags method respectively\n+\"\"\"\n+\n+import random\n+import re\n+import sqlite3\n+from pymongo import MongoClient\n+from pymongo.errors import BulkWriteError\n+import datetime\n+\n+## User configuration - start ##\n+\n+#Connection string to the mongo db from which list of topics should be read\n+topics_connection_string = \"mongodb://reader:volttronReader@vc-db.pnl.gov\" \\\n+                           \":27017\" \\\n+                           \"/prod_historian\"\n+topic_table = \"topics\"\n+# Regular expression that matches all device topics that conform to the\n+# naming pattern /campus/building/device/<optional sub device>/point\n+device_topics = \"^PNNL\"","path":"scripts/tagging_scripts/insert_id_and_ref_tags.py","position":33,"original_position":33,"commit_id":"f8edd42d33bfe45af63c5fe5a456c1940b92cc3b","original_commit_id":"f8edd42d33bfe45af63c5fe5a456c1940b92cc3b","user":{"login":"schandrika","id":16124920,"avatar_url":"https://avatars2.githubusercontent.com/u/16124920?v=4","gravatar_id":"","url":"https://api.github.com/users/schandrika","html_url":"https://github.com/schandrika","followers_url":"https://api.github.com/users/schandrika/followers","following_url":"https://api.github.com/users/schandrika/following{/other_user}","gists_url":"https://api.github.com/users/schandrika/gists{/gist_id}","starred_url":"https://api.github.com/users/schandrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schandrika/subscriptions","organizations_url":"https://api.github.com/users/schandrika/orgs","repos_url":"https://api.github.com/users/schandrika/repos","events_url":"https://api.github.com/users/schandrika/events{/privacy}","received_events_url":"https://api.github.com/users/schandrika/received_events","type":"User","site_admin":false},"body":"This is a documentation issue.  I fixed it","created_at":"2017-09-12T20:25:48Z","updated_at":"2017-09-12T20:25:48Z","html_url":"https://github.com/VOLTTRON/volttron/pull/1466#discussion_r138456071","pull_request_url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/comments/138456071"},"html":{"href":"https://github.com/VOLTTRON/volttron/pull/1466#discussion_r138456071"},"pull_request":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466"}},"in_reply_to_id":137050149},"pull_request":{"url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466","id":138984327,"html_url":"https://github.com/VOLTTRON/volttron/pull/1466","diff_url":"https://github.com/VOLTTRON/volttron/pull/1466.diff","patch_url":"https://github.com/VOLTTRON/volttron/pull/1466.patch","issue_url":"https://api.github.com/repos/VOLTTRON/volttron/issues/1466","number":1466,"state":"open","locked":false,"title":"Utility script to load id and parent reference tags","user":{"login":"schandrika","id":16124920,"avatar_url":"https://avatars2.githubusercontent.com/u/16124920?v=4","gravatar_id":"","url":"https://api.github.com/users/schandrika","html_url":"https://github.com/schandrika","followers_url":"https://api.github.com/users/schandrika/followers","following_url":"https://api.github.com/users/schandrika/following{/other_user}","gists_url":"https://api.github.com/users/schandrika/gists{/gist_id}","starred_url":"https://api.github.com/users/schandrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schandrika/subscriptions","organizations_url":"https://api.github.com/users/schandrika/orgs","repos_url":"https://api.github.com/users/schandrika/repos","events_url":"https://api.github.com/users/schandrika/events{/privacy}","received_events_url":"https://api.github.com/users/schandrika/received_events","type":"User","site_admin":false},"body":"1. Added Utility script to load id and parent reference tags for topics that have naming convention as /campus/building/device/<optional sub device>/point\r\n\r\n2. Removed unused test script\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/volttron/volttron/1466)\n<!-- Reviewable:end -->\n","created_at":"2017-09-01T22:37:32Z","updated_at":"2017-09-12T20:25:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b742770f45a7227c65d9ad1ee14a0a30b94c0fe","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466/commits","review_comments_url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466/comments","review_comment_url":"https://api.github.com/repos/VOLTTRON/volttron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VOLTTRON/volttron/issues/1466/comments","statuses_url":"https://api.github.com/repos/VOLTTRON/volttron/statuses/f8edd42d33bfe45af63c5fe5a456c1940b92cc3b","head":{"label":"schandrika:tagging","ref":"tagging","sha":"f8edd42d33bfe45af63c5fe5a456c1940b92cc3b","user":{"login":"schandrika","id":16124920,"avatar_url":"https://avatars2.githubusercontent.com/u/16124920?v=4","gravatar_id":"","url":"https://api.github.com/users/schandrika","html_url":"https://github.com/schandrika","followers_url":"https://api.github.com/users/schandrika/followers","following_url":"https://api.github.com/users/schandrika/following{/other_user}","gists_url":"https://api.github.com/users/schandrika/gists{/gist_id}","starred_url":"https://api.github.com/users/schandrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schandrika/subscriptions","organizations_url":"https://api.github.com/users/schandrika/orgs","repos_url":"https://api.github.com/users/schandrika/repos","events_url":"https://api.github.com/users/schandrika/events{/privacy}","received_events_url":"https://api.github.com/users/schandrika/received_events","type":"User","site_admin":false},"repo":{"id":63634700,"name":"volttron","full_name":"schandrika/volttron","owner":{"login":"schandrika","id":16124920,"avatar_url":"https://avatars2.githubusercontent.com/u/16124920?v=4","gravatar_id":"","url":"https://api.github.com/users/schandrika","html_url":"https://github.com/schandrika","followers_url":"https://api.github.com/users/schandrika/followers","following_url":"https://api.github.com/users/schandrika/following{/other_user}","gists_url":"https://api.github.com/users/schandrika/gists{/gist_id}","starred_url":"https://api.github.com/users/schandrika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schandrika/subscriptions","organizations_url":"https://api.github.com/users/schandrika/orgs","repos_url":"https://api.github.com/users/schandrika/repos","events_url":"https://api.github.com/users/schandrika/events{/privacy}","received_events_url":"https://api.github.com/users/schandrika/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schandrika/volttron","description":"VOLTTRON Distributed Control System Platform","fork":true,"url":"https://api.github.com/repos/schandrika/volttron","forks_url":"https://api.github.com/repos/schandrika/volttron/forks","keys_url":"https://api.github.com/repos/schandrika/volttron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schandrika/volttron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schandrika/volttron/teams","hooks_url":"https://api.github.com/repos/schandrika/volttron/hooks","issue_events_url":"https://api.github.com/repos/schandrika/volttron/issues/events{/number}","events_url":"https://api.github.com/repos/schandrika/volttron/events","assignees_url":"https://api.github.com/repos/schandrika/volttron/assignees{/user}","branches_url":"https://api.github.com/repos/schandrika/volttron/branches{/branch}","tags_url":"https://api.github.com/repos/schandrika/volttron/tags","blobs_url":"https://api.github.com/repos/schandrika/volttron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schandrika/volttron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schandrika/volttron/git/refs{/sha}","trees_url":"https://api.github.com/repos/schandrika/volttron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schandrika/volttron/statuses/{sha}","languages_url":"https://api.github.com/repos/schandrika/volttron/languages","stargazers_url":"https://api.github.com/repos/schandrika/volttron/stargazers","contributors_url":"https://api.github.com/repos/schandrika/volttron/contributors","subscribers_url":"https://api.github.com/repos/schandrika/volttron/subscribers","subscription_url":"https://api.github.com/repos/schandrika/volttron/subscription","commits_url":"https://api.github.com/repos/schandrika/volttron/commits{/sha}","git_commits_url":"https://api.github.com/repos/schandrika/volttron/git/commits{/sha}","comments_url":"https://api.github.com/repos/schandrika/volttron/comments{/number}","issue_comment_url":"https://api.github.com/repos/schandrika/volttron/issues/comments{/number}","contents_url":"https://api.github.com/repos/schandrika/volttron/contents/{+path}","compare_url":"https://api.github.com/repos/schandrika/volttron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schandrika/volttron/merges","archive_url":"https://api.github.com/repos/schandrika/volttron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schandrika/volttron/downloads","issues_url":"https://api.github.com/repos/schandrika/volttron/issues{/number}","pulls_url":"https://api.github.com/repos/schandrika/volttron/pulls{/number}","milestones_url":"https://api.github.com/repos/schandrika/volttron/milestones{/number}","notifications_url":"https://api.github.com/repos/schandrika/volttron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schandrika/volttron/labels{/name}","releases_url":"https://api.github.com/repos/schandrika/volttron/releases{/id}","deployments_url":"https://api.github.com/repos/schandrika/volttron/deployments","created_at":"2016-07-18T20:26:32Z","updated_at":"2016-07-18T20:26:35Z","pushed_at":"2017-09-01T22:35:38Z","git_url":"git://github.com/schandrika/volttron.git","ssh_url":"git@github.com:schandrika/volttron.git","clone_url":"https://github.com/schandrika/volttron.git","svn_url":"https://github.com/schandrika/volttron","homepage":null,"size":69925,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"VOLTTRON:develop","ref":"develop","sha":"010454e2a2b7a76ac268734ce84c4eb3d245c995","user":{"login":"VOLTTRON","id":5875448,"avatar_url":"https://avatars0.githubusercontent.com/u/5875448?v=4","gravatar_id":"","url":"https://api.github.com/users/VOLTTRON","html_url":"https://github.com/VOLTTRON","followers_url":"https://api.github.com/users/VOLTTRON/followers","following_url":"https://api.github.com/users/VOLTTRON/following{/other_user}","gists_url":"https://api.github.com/users/VOLTTRON/gists{/gist_id}","starred_url":"https://api.github.com/users/VOLTTRON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VOLTTRON/subscriptions","organizations_url":"https://api.github.com/users/VOLTTRON/orgs","repos_url":"https://api.github.com/users/VOLTTRON/repos","events_url":"https://api.github.com/users/VOLTTRON/events{/privacy}","received_events_url":"https://api.github.com/users/VOLTTRON/received_events","type":"Organization","site_admin":false},"repo":{"id":14191740,"name":"volttron","full_name":"VOLTTRON/volttron","owner":{"login":"VOLTTRON","id":5875448,"avatar_url":"https://avatars0.githubusercontent.com/u/5875448?v=4","gravatar_id":"","url":"https://api.github.com/users/VOLTTRON","html_url":"https://github.com/VOLTTRON","followers_url":"https://api.github.com/users/VOLTTRON/followers","following_url":"https://api.github.com/users/VOLTTRON/following{/other_user}","gists_url":"https://api.github.com/users/VOLTTRON/gists{/gist_id}","starred_url":"https://api.github.com/users/VOLTTRON/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VOLTTRON/subscriptions","organizations_url":"https://api.github.com/users/VOLTTRON/orgs","repos_url":"https://api.github.com/users/VOLTTRON/repos","events_url":"https://api.github.com/users/VOLTTRON/events{/privacy}","received_events_url":"https://api.github.com/users/VOLTTRON/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VOLTTRON/volttron","description":"VOLTTRON Distributed Control System Platform","fork":false,"url":"https://api.github.com/repos/VOLTTRON/volttron","forks_url":"https://api.github.com/repos/VOLTTRON/volttron/forks","keys_url":"https://api.github.com/repos/VOLTTRON/volttron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VOLTTRON/volttron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VOLTTRON/volttron/teams","hooks_url":"https://api.github.com/repos/VOLTTRON/volttron/hooks","issue_events_url":"https://api.github.com/repos/VOLTTRON/volttron/issues/events{/number}","events_url":"https://api.github.com/repos/VOLTTRON/volttron/events","assignees_url":"https://api.github.com/repos/VOLTTRON/volttron/assignees{/user}","branches_url":"https://api.github.com/repos/VOLTTRON/volttron/branches{/branch}","tags_url":"https://api.github.com/repos/VOLTTRON/volttron/tags","blobs_url":"https://api.github.com/repos/VOLTTRON/volttron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VOLTTRON/volttron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VOLTTRON/volttron/git/refs{/sha}","trees_url":"https://api.github.com/repos/VOLTTRON/volttron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VOLTTRON/volttron/statuses/{sha}","languages_url":"https://api.github.com/repos/VOLTTRON/volttron/languages","stargazers_url":"https://api.github.com/repos/VOLTTRON/volttron/stargazers","contributors_url":"https://api.github.com/repos/VOLTTRON/volttron/contributors","subscribers_url":"https://api.github.com/repos/VOLTTRON/volttron/subscribers","subscription_url":"https://api.github.com/repos/VOLTTRON/volttron/subscription","commits_url":"https://api.github.com/repos/VOLTTRON/volttron/commits{/sha}","git_commits_url":"https://api.github.com/repos/VOLTTRON/volttron/git/commits{/sha}","comments_url":"https://api.github.com/repos/VOLTTRON/volttron/comments{/number}","issue_comment_url":"https://api.github.com/repos/VOLTTRON/volttron/issues/comments{/number}","contents_url":"https://api.github.com/repos/VOLTTRON/volttron/contents/{+path}","compare_url":"https://api.github.com/repos/VOLTTRON/volttron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VOLTTRON/volttron/merges","archive_url":"https://api.github.com/repos/VOLTTRON/volttron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VOLTTRON/volttron/downloads","issues_url":"https://api.github.com/repos/VOLTTRON/volttron/issues{/number}","pulls_url":"https://api.github.com/repos/VOLTTRON/volttron/pulls{/number}","milestones_url":"https://api.github.com/repos/VOLTTRON/volttron/milestones{/number}","notifications_url":"https://api.github.com/repos/VOLTTRON/volttron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VOLTTRON/volttron/labels{/name}","releases_url":"https://api.github.com/repos/VOLTTRON/volttron/releases{/id}","deployments_url":"https://api.github.com/repos/VOLTTRON/volttron/deployments","created_at":"2013-11-07T02:07:46Z","updated_at":"2017-09-05T15:32:41Z","pushed_at":"2017-09-12T18:48:20Z","git_url":"git://github.com/VOLTTRON/volttron.git","ssh_url":"git@github.com:VOLTTRON/volttron.git","clone_url":"https://github.com/VOLTTRON/volttron.git","svn_url":"https://github.com/VOLTTRON/volttron","homepage":null,"size":117322,"stargazers_count":151,"watchers_count":151,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":74,"mirror_url":null,"open_issues_count":270,"forks":74,"open_issues":270,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466"},"html":{"href":"https://github.com/VOLTTRON/volttron/pull/1466"},"issue":{"href":"https://api.github.com/repos/VOLTTRON/volttron/issues/1466"},"comments":{"href":"https://api.github.com/repos/VOLTTRON/volttron/issues/1466/comments"},"review_comments":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466/comments"},"review_comment":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VOLTTRON/volttron/pulls/1466/commits"},"statuses":{"href":"https://api.github.com/repos/VOLTTRON/volttron/statuses/f8edd42d33bfe45af63c5fe5a456c1940b92cc3b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"schandrika"}}