{"action":"created","comment":{"url":"https://api.github.com/repos/google/openhtf/pulls/comments/74847398","id":74847398,"diff_hunk":"@@ -0,0 +1,134 @@\n+# How to write a Plugin! \n+\n+It is a truth universally acknowledged that an application with infinite \n+use cases must be in want of a plugin interface. Here's how to write one!\n+\n+## Contents\n+\n+A basic, bare-bones plugin package structure looks like this: \n+```\n+/example_plugin\n+\t|\n+\t-- setup.py\n+\t|\n+\t-- /example_plugin\n+\t\t\t|\n+\t\t\t-- __init__.py\n+\t\t\t|\n+\t\t\t-- /plugin\n+\t\t\t\t|\n+\t\t\t\t-- main.ts\n+\t\t\t\t|\n+\t\t\t\t-- example_plugin.html\n+\t\t\t\t|\n+\t\t\t\t-- example_service.ts\n+```\n+\n+A plugin with this structure would be able to show up in the frontend and \n+make calls to the backend Tornado server to request information.\n+\n+### Backend Structure\n+\n+Everything adding to the backend goes in the __init__.py module! It requires \n+three main parts: \n+\n+#### Handler Variable\n+\n+This tuple is what OpenHTF will use to configure and add your tornado handler. \n+A simple example: \n+```\n+handler=([r'/example/', ExampleHandler],","path":"openhtf/output/web_gui/src/README.md","position":40,"original_position":40,"commit_id":"b8a8780ecc127e16566d851e748ca3d6542c4760","original_commit_id":"b8a8780ecc127e16566d851e748ca3d6542c4760","user":{"login":"fahhem","id":306100,"avatar_url":"https://avatars.githubusercontent.com/u/306100?v=3","gravatar_id":"","url":"https://api.github.com/users/fahhem","html_url":"https://github.com/fahhem","followers_url":"https://api.github.com/users/fahhem/followers","following_url":"https://api.github.com/users/fahhem/following{/other_user}","gists_url":"https://api.github.com/users/fahhem/gists{/gist_id}","starred_url":"https://api.github.com/users/fahhem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fahhem/subscriptions","organizations_url":"https://api.github.com/users/fahhem/orgs","repos_url":"https://api.github.com/users/fahhem/repos","events_url":"https://api.github.com/users/fahhem/events{/privacy}","received_events_url":"https://api.github.com/users/fahhem/received_events","type":"User","site_admin":false},"body":"Lists imply that it can be lengthened. For the deps portion, it makes sense since it can be any length, but for the regex/handler portion it should be a tuple. If we remove the deps like suggested, this could allow multiple handlers like so:\r\n\r\n```py\r\nhandlers = [\r\n  (r'/example/$', ExampleHandler),\r\n  (r'/example/(\\d+)/', IntegerHandler),\r\n]\r\n```","created_at":"2016-08-15T22:29:21Z","updated_at":"2016-08-15T22:29:21Z","html_url":"https://github.com/google/openhtf/pull/400#discussion_r74847398","pull_request_url":"https://api.github.com/repos/google/openhtf/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/google/openhtf/pulls/comments/74847398"},"html":{"href":"https://github.com/google/openhtf/pull/400#discussion_r74847398"},"pull_request":{"href":"https://api.github.com/repos/google/openhtf/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/google/openhtf/pulls/400","id":81379844,"html_url":"https://github.com/google/openhtf/pull/400","diff_url":"https://github.com/google/openhtf/pull/400.diff","patch_url":"https://github.com/google/openhtf/pull/400.patch","issue_url":"https://api.github.com/repos/google/openhtf/issues/400","number":400,"state":"open","locked":false,"title":"Plugin","user":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"body":"Add plugin interface ","created_at":"2016-08-15T21:36:54Z","updated_at":"2016-08-15T22:29:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"532a0a289e8b0297454b1b7d843ffbc2f4557d39","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/openhtf/pulls/400/commits","review_comments_url":"https://api.github.com/repos/google/openhtf/pulls/400/comments","review_comment_url":"https://api.github.com/repos/google/openhtf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/openhtf/issues/400/comments","statuses_url":"https://api.github.com/repos/google/openhtf/statuses/b8a8780ecc127e16566d851e748ca3d6542c4760","head":{"label":"maddychan:plugin","ref":"plugin","sha":"b8a8780ecc127e16566d851e748ca3d6542c4760","user":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"repo":{"id":62077514,"name":"openhtf","full_name":"maddychan/openhtf","owner":{"login":"maddychan","id":9475928,"avatar_url":"https://avatars.githubusercontent.com/u/9475928?v=3","gravatar_id":"","url":"https://api.github.com/users/maddychan","html_url":"https://github.com/maddychan","followers_url":"https://api.github.com/users/maddychan/followers","following_url":"https://api.github.com/users/maddychan/following{/other_user}","gists_url":"https://api.github.com/users/maddychan/gists{/gist_id}","starred_url":"https://api.github.com/users/maddychan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maddychan/subscriptions","organizations_url":"https://api.github.com/users/maddychan/orgs","repos_url":"https://api.github.com/users/maddychan/repos","events_url":"https://api.github.com/users/maddychan/events{/privacy}","received_events_url":"https://api.github.com/users/maddychan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maddychan/openhtf","description":null,"fork":true,"url":"https://api.github.com/repos/maddychan/openhtf","forks_url":"https://api.github.com/repos/maddychan/openhtf/forks","keys_url":"https://api.github.com/repos/maddychan/openhtf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maddychan/openhtf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maddychan/openhtf/teams","hooks_url":"https://api.github.com/repos/maddychan/openhtf/hooks","issue_events_url":"https://api.github.com/repos/maddychan/openhtf/issues/events{/number}","events_url":"https://api.github.com/repos/maddychan/openhtf/events","assignees_url":"https://api.github.com/repos/maddychan/openhtf/assignees{/user}","branches_url":"https://api.github.com/repos/maddychan/openhtf/branches{/branch}","tags_url":"https://api.github.com/repos/maddychan/openhtf/tags","blobs_url":"https://api.github.com/repos/maddychan/openhtf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maddychan/openhtf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maddychan/openhtf/git/refs{/sha}","trees_url":"https://api.github.com/repos/maddychan/openhtf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maddychan/openhtf/statuses/{sha}","languages_url":"https://api.github.com/repos/maddychan/openhtf/languages","stargazers_url":"https://api.github.com/repos/maddychan/openhtf/stargazers","contributors_url":"https://api.github.com/repos/maddychan/openhtf/contributors","subscribers_url":"https://api.github.com/repos/maddychan/openhtf/subscribers","subscription_url":"https://api.github.com/repos/maddychan/openhtf/subscription","commits_url":"https://api.github.com/repos/maddychan/openhtf/commits{/sha}","git_commits_url":"https://api.github.com/repos/maddychan/openhtf/git/commits{/sha}","comments_url":"https://api.github.com/repos/maddychan/openhtf/comments{/number}","issue_comment_url":"https://api.github.com/repos/maddychan/openhtf/issues/comments{/number}","contents_url":"https://api.github.com/repos/maddychan/openhtf/contents/{+path}","compare_url":"https://api.github.com/repos/maddychan/openhtf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maddychan/openhtf/merges","archive_url":"https://api.github.com/repos/maddychan/openhtf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maddychan/openhtf/downloads","issues_url":"https://api.github.com/repos/maddychan/openhtf/issues{/number}","pulls_url":"https://api.github.com/repos/maddychan/openhtf/pulls{/number}","milestones_url":"https://api.github.com/repos/maddychan/openhtf/milestones{/number}","notifications_url":"https://api.github.com/repos/maddychan/openhtf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maddychan/openhtf/labels{/name}","releases_url":"https://api.github.com/repos/maddychan/openhtf/releases{/id}","deployments_url":"https://api.github.com/repos/maddychan/openhtf/deployments","created_at":"2016-06-27T18:13:28Z","updated_at":"2016-06-27T18:13:29Z","pushed_at":"2016-08-15T21:35:17Z","git_url":"git://github.com/maddychan/openhtf.git","ssh_url":"git@github.com:maddychan/openhtf.git","clone_url":"https://github.com/maddychan/openhtf.git","svn_url":"https://github.com/maddychan/openhtf","homepage":null,"size":24467,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"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":"google:master","ref":"master","sha":"2269bc8579f66aea258b7ead97879f830a914a44","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":41519483,"name":"openhtf","full_name":"google/openhtf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/openhtf","description":null,"fork":false,"url":"https://api.github.com/repos/google/openhtf","forks_url":"https://api.github.com/repos/google/openhtf/forks","keys_url":"https://api.github.com/repos/google/openhtf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/openhtf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/openhtf/teams","hooks_url":"https://api.github.com/repos/google/openhtf/hooks","issue_events_url":"https://api.github.com/repos/google/openhtf/issues/events{/number}","events_url":"https://api.github.com/repos/google/openhtf/events","assignees_url":"https://api.github.com/repos/google/openhtf/assignees{/user}","branches_url":"https://api.github.com/repos/google/openhtf/branches{/branch}","tags_url":"https://api.github.com/repos/google/openhtf/tags","blobs_url":"https://api.github.com/repos/google/openhtf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/openhtf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/openhtf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/openhtf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/openhtf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/openhtf/languages","stargazers_url":"https://api.github.com/repos/google/openhtf/stargazers","contributors_url":"https://api.github.com/repos/google/openhtf/contributors","subscribers_url":"https://api.github.com/repos/google/openhtf/subscribers","subscription_url":"https://api.github.com/repos/google/openhtf/subscription","commits_url":"https://api.github.com/repos/google/openhtf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/openhtf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/openhtf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/openhtf/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/openhtf/contents/{+path}","compare_url":"https://api.github.com/repos/google/openhtf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/openhtf/merges","archive_url":"https://api.github.com/repos/google/openhtf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/openhtf/downloads","issues_url":"https://api.github.com/repos/google/openhtf/issues{/number}","pulls_url":"https://api.github.com/repos/google/openhtf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/openhtf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/openhtf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/openhtf/labels{/name}","releases_url":"https://api.github.com/repos/google/openhtf/releases{/id}","deployments_url":"https://api.github.com/repos/google/openhtf/deployments","created_at":"2015-08-28T01:14:17Z","updated_at":"2016-07-28T00:38:51Z","pushed_at":"2016-08-15T22:07:29Z","git_url":"git://github.com/google/openhtf.git","ssh_url":"git@github.com:google/openhtf.git","clone_url":"https://github.com/google/openhtf.git","svn_url":"https://github.com/google/openhtf","homepage":null,"size":25791,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":84,"forks":23,"open_issues":84,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/openhtf/pulls/400"},"html":{"href":"https://github.com/google/openhtf/pull/400"},"issue":{"href":"https://api.github.com/repos/google/openhtf/issues/400"},"comments":{"href":"https://api.github.com/repos/google/openhtf/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/google/openhtf/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/google/openhtf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/openhtf/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/google/openhtf/statuses/b8a8780ecc127e16566d851e748ca3d6542c4760"}}}}
{"actor":{"display_login":"fahhem"}}