{"action":"created","comment":{"url":"https://api.github.com/repos/Parsely/streamparse/pulls/comments/44321388","id":44321388,"diff_hunk":"@@ -1,30 +1,177 @@\n \"\"\"\n Component-level Specification\n \n-This module is called component to mirror organization of storm package.\n+This module is called component to mirror organization of pystorm package.\n \"\"\"\n+from __future__ import absolute_import\n \n-from pystorm.component import Component\n+from copy import deepcopy\n \n+import simplejson as json\n+from six import iteritems, string_types\n \n-class Specification(object):\n-    def __init__(self, component_cls, name=None, parallelism=1):\n-        if not issubclass(component_cls, Component):\n-            raise TypeError(\"Invalid component: {}\".format(component_cls))\n+from .stream import Grouping, Stream\n+from .thrift import storm_thrift\n+from storm_thrift import (ComponentCommon, ComponentObject, GlobalStreamId,\n+                          JavaObject, ShellComponent, StreamInfo)\n \n-        if not isinstance(parallelism, int) or parallelism < 1:\n+\n+class ComponentSpec(object):\n+    def __init__(self, component_cls, name=None, inputs=None, parallelism=1,","path":"streamparse/dsl/component.py","position":27,"original_position":27,"commit_id":"67d7f3ede3ced1ae2042aa1f74e3013686656e48","original_commit_id":"67d7f3ede3ced1ae2042aa1f74e3013686656e48","user":{"login":"dan-blanchard","id":976345,"avatar_url":"https://avatars.githubusercontent.com/u/976345?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-blanchard","html_url":"https://github.com/dan-blanchard","followers_url":"https://api.github.com/users/dan-blanchard/followers","following_url":"https://api.github.com/users/dan-blanchard/following{/other_user}","gists_url":"https://api.github.com/users/dan-blanchard/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-blanchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-blanchard/subscriptions","organizations_url":"https://api.github.com/users/dan-blanchard/orgs","repos_url":"https://api.github.com/users/dan-blanchard/repos","events_url":"https://api.github.com/users/dan-blanchard/events{/privacy}","received_events_url":"https://api.github.com/users/dan-blanchard/received_events","type":"User","site_admin":false},"body":"Did @rduplain put you up to this? :smile:\r\n\r\nHe said almost the same thing to me last week.  In general, I despise one-letter arguments.  If you had never used the Clojure DSL, would you guess that `p` meant parallelism?  Is `par` a reasonable halfway point? \r\n\r\n","created_at":"2015-11-09T19:48:28Z","updated_at":"2015-11-09T19:48:28Z","html_url":"https://github.com/Parsely/streamparse/pull/199#discussion_r44321388","pull_request_url":"https://api.github.com/repos/Parsely/streamparse/pulls/199","_links":{"self":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/comments/44321388"},"html":{"href":"https://github.com/Parsely/streamparse/pull/199#discussion_r44321388"},"pull_request":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/Parsely/streamparse/pulls/199","id":50166596,"html_url":"https://github.com/Parsely/streamparse/pull/199","diff_url":"https://github.com/Parsely/streamparse/pull/199.diff","patch_url":"https://github.com/Parsely/streamparse/pull/199.patch","issue_url":"https://api.github.com/repos/Parsely/streamparse/issues/199","number":199,"state":"open","locked":false,"title":"[WIP] Update Python Topology DSL","user":{"login":"dan-blanchard","id":976345,"avatar_url":"https://avatars.githubusercontent.com/u/976345?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-blanchard","html_url":"https://github.com/dan-blanchard","followers_url":"https://api.github.com/users/dan-blanchard/followers","following_url":"https://api.github.com/users/dan-blanchard/following{/other_user}","gists_url":"https://api.github.com/users/dan-blanchard/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-blanchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-blanchard/subscriptions","organizations_url":"https://api.github.com/users/dan-blanchard/orgs","repos_url":"https://api.github.com/users/dan-blanchard/repos","events_url":"https://api.github.com/users/dan-blanchard/events{/privacy}","received_events_url":"https://api.github.com/users/dan-blanchard/received_events","type":"User","site_admin":false},"body":"This is not *quite* done yet.  I just want it here as a point of reference.  That said, if anyone sees anything horribly wrong with this approach, feel free to let me know now.","created_at":"2015-11-09T19:35:21Z","updated_at":"2015-11-09T19:48:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaa270b480a79e50f58c6d42373cdfce1ecf2449","assignee":null,"milestone":{"url":"https://api.github.com/repos/Parsely/streamparse/milestones/4","html_url":"https://github.com/Parsely/streamparse/milestones/v3.0","labels_url":"https://api.github.com/repos/Parsely/streamparse/milestones/4/labels","id":1085522,"number":4,"title":"v3.0","description":"First version that doesn't use Clojure and relies on separate pystorm package.","creator":{"login":"dan-blanchard","id":976345,"avatar_url":"https://avatars.githubusercontent.com/u/976345?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-blanchard","html_url":"https://github.com/dan-blanchard","followers_url":"https://api.github.com/users/dan-blanchard/followers","following_url":"https://api.github.com/users/dan-blanchard/following{/other_user}","gists_url":"https://api.github.com/users/dan-blanchard/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-blanchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-blanchard/subscriptions","organizations_url":"https://api.github.com/users/dan-blanchard/orgs","repos_url":"https://api.github.com/users/dan-blanchard/repos","events_url":"https://api.github.com/users/dan-blanchard/events{/privacy}","received_events_url":"https://api.github.com/users/dan-blanchard/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":7,"state":"open","created_at":"2015-04-27T15:07:43Z","updated_at":"2015-11-09T19:35:21Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Parsely/streamparse/pulls/199/commits","review_comments_url":"https://api.github.com/repos/Parsely/streamparse/pulls/199/comments","review_comment_url":"https://api.github.com/repos/Parsely/streamparse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Parsely/streamparse/issues/199/comments","statuses_url":"https://api.github.com/repos/Parsely/streamparse/statuses/67d7f3ede3ced1ae2042aa1f74e3013686656e48","head":{"label":"Parsely:feature/thrift_python_dsl","ref":"feature/thrift_python_dsl","sha":"67d7f3ede3ced1ae2042aa1f74e3013686656e48","user":{"login":"Parsely","id":779641,"avatar_url":"https://avatars.githubusercontent.com/u/779641?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsely","html_url":"https://github.com/Parsely","followers_url":"https://api.github.com/users/Parsely/followers","following_url":"https://api.github.com/users/Parsely/following{/other_user}","gists_url":"https://api.github.com/users/Parsely/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsely/subscriptions","organizations_url":"https://api.github.com/users/Parsely/orgs","repos_url":"https://api.github.com/users/Parsely/repos","events_url":"https://api.github.com/users/Parsely/events{/privacy}","received_events_url":"https://api.github.com/users/Parsely/received_events","type":"Organization","site_admin":false},"repo":{"id":19387849,"name":"streamparse","full_name":"Parsely/streamparse","owner":{"login":"Parsely","id":779641,"avatar_url":"https://avatars.githubusercontent.com/u/779641?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsely","html_url":"https://github.com/Parsely","followers_url":"https://api.github.com/users/Parsely/followers","following_url":"https://api.github.com/users/Parsely/following{/other_user}","gists_url":"https://api.github.com/users/Parsely/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsely/subscriptions","organizations_url":"https://api.github.com/users/Parsely/orgs","repos_url":"https://api.github.com/users/Parsely/repos","events_url":"https://api.github.com/users/Parsely/events{/privacy}","received_events_url":"https://api.github.com/users/Parsely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Parsely/streamparse","description":"streamparse lets you run Python code against real-time streams of data with Apache Storm.","fork":false,"url":"https://api.github.com/repos/Parsely/streamparse","forks_url":"https://api.github.com/repos/Parsely/streamparse/forks","keys_url":"https://api.github.com/repos/Parsely/streamparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parsely/streamparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parsely/streamparse/teams","hooks_url":"https://api.github.com/repos/Parsely/streamparse/hooks","issue_events_url":"https://api.github.com/repos/Parsely/streamparse/issues/events{/number}","events_url":"https://api.github.com/repos/Parsely/streamparse/events","assignees_url":"https://api.github.com/repos/Parsely/streamparse/assignees{/user}","branches_url":"https://api.github.com/repos/Parsely/streamparse/branches{/branch}","tags_url":"https://api.github.com/repos/Parsely/streamparse/tags","blobs_url":"https://api.github.com/repos/Parsely/streamparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parsely/streamparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parsely/streamparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parsely/streamparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parsely/streamparse/statuses/{sha}","languages_url":"https://api.github.com/repos/Parsely/streamparse/languages","stargazers_url":"https://api.github.com/repos/Parsely/streamparse/stargazers","contributors_url":"https://api.github.com/repos/Parsely/streamparse/contributors","subscribers_url":"https://api.github.com/repos/Parsely/streamparse/subscribers","subscription_url":"https://api.github.com/repos/Parsely/streamparse/subscription","commits_url":"https://api.github.com/repos/Parsely/streamparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parsely/streamparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parsely/streamparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parsely/streamparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/Parsely/streamparse/contents/{+path}","compare_url":"https://api.github.com/repos/Parsely/streamparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parsely/streamparse/merges","archive_url":"https://api.github.com/repos/Parsely/streamparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parsely/streamparse/downloads","issues_url":"https://api.github.com/repos/Parsely/streamparse/issues{/number}","pulls_url":"https://api.github.com/repos/Parsely/streamparse/pulls{/number}","milestones_url":"https://api.github.com/repos/Parsely/streamparse/milestones{/number}","notifications_url":"https://api.github.com/repos/Parsely/streamparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parsely/streamparse/labels{/name}","releases_url":"https://api.github.com/repos/Parsely/streamparse/releases{/id}","created_at":"2014-05-02T20:33:50Z","updated_at":"2015-11-09T05:15:46Z","pushed_at":"2015-11-09T19:35:22Z","git_url":"git://github.com/Parsely/streamparse.git","ssh_url":"git@github.com:Parsely/streamparse.git","clone_url":"https://github.com/Parsely/streamparse.git","svn_url":"https://github.com/Parsely/streamparse","homepage":"","size":6217,"stargazers_count":872,"watchers_count":872,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":31,"forks":110,"open_issues":31,"watchers":872,"default_branch":"master"}},"base":{"label":"Parsely:master","ref":"master","sha":"c2fd4ff96aa6c3cf396b8a719dbc418591d34923","user":{"login":"Parsely","id":779641,"avatar_url":"https://avatars.githubusercontent.com/u/779641?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsely","html_url":"https://github.com/Parsely","followers_url":"https://api.github.com/users/Parsely/followers","following_url":"https://api.github.com/users/Parsely/following{/other_user}","gists_url":"https://api.github.com/users/Parsely/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsely/subscriptions","organizations_url":"https://api.github.com/users/Parsely/orgs","repos_url":"https://api.github.com/users/Parsely/repos","events_url":"https://api.github.com/users/Parsely/events{/privacy}","received_events_url":"https://api.github.com/users/Parsely/received_events","type":"Organization","site_admin":false},"repo":{"id":19387849,"name":"streamparse","full_name":"Parsely/streamparse","owner":{"login":"Parsely","id":779641,"avatar_url":"https://avatars.githubusercontent.com/u/779641?v=3","gravatar_id":"","url":"https://api.github.com/users/Parsely","html_url":"https://github.com/Parsely","followers_url":"https://api.github.com/users/Parsely/followers","following_url":"https://api.github.com/users/Parsely/following{/other_user}","gists_url":"https://api.github.com/users/Parsely/gists{/gist_id}","starred_url":"https://api.github.com/users/Parsely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Parsely/subscriptions","organizations_url":"https://api.github.com/users/Parsely/orgs","repos_url":"https://api.github.com/users/Parsely/repos","events_url":"https://api.github.com/users/Parsely/events{/privacy}","received_events_url":"https://api.github.com/users/Parsely/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Parsely/streamparse","description":"streamparse lets you run Python code against real-time streams of data with Apache Storm.","fork":false,"url":"https://api.github.com/repos/Parsely/streamparse","forks_url":"https://api.github.com/repos/Parsely/streamparse/forks","keys_url":"https://api.github.com/repos/Parsely/streamparse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Parsely/streamparse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Parsely/streamparse/teams","hooks_url":"https://api.github.com/repos/Parsely/streamparse/hooks","issue_events_url":"https://api.github.com/repos/Parsely/streamparse/issues/events{/number}","events_url":"https://api.github.com/repos/Parsely/streamparse/events","assignees_url":"https://api.github.com/repos/Parsely/streamparse/assignees{/user}","branches_url":"https://api.github.com/repos/Parsely/streamparse/branches{/branch}","tags_url":"https://api.github.com/repos/Parsely/streamparse/tags","blobs_url":"https://api.github.com/repos/Parsely/streamparse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Parsely/streamparse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Parsely/streamparse/git/refs{/sha}","trees_url":"https://api.github.com/repos/Parsely/streamparse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Parsely/streamparse/statuses/{sha}","languages_url":"https://api.github.com/repos/Parsely/streamparse/languages","stargazers_url":"https://api.github.com/repos/Parsely/streamparse/stargazers","contributors_url":"https://api.github.com/repos/Parsely/streamparse/contributors","subscribers_url":"https://api.github.com/repos/Parsely/streamparse/subscribers","subscription_url":"https://api.github.com/repos/Parsely/streamparse/subscription","commits_url":"https://api.github.com/repos/Parsely/streamparse/commits{/sha}","git_commits_url":"https://api.github.com/repos/Parsely/streamparse/git/commits{/sha}","comments_url":"https://api.github.com/repos/Parsely/streamparse/comments{/number}","issue_comment_url":"https://api.github.com/repos/Parsely/streamparse/issues/comments{/number}","contents_url":"https://api.github.com/repos/Parsely/streamparse/contents/{+path}","compare_url":"https://api.github.com/repos/Parsely/streamparse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Parsely/streamparse/merges","archive_url":"https://api.github.com/repos/Parsely/streamparse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Parsely/streamparse/downloads","issues_url":"https://api.github.com/repos/Parsely/streamparse/issues{/number}","pulls_url":"https://api.github.com/repos/Parsely/streamparse/pulls{/number}","milestones_url":"https://api.github.com/repos/Parsely/streamparse/milestones{/number}","notifications_url":"https://api.github.com/repos/Parsely/streamparse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Parsely/streamparse/labels{/name}","releases_url":"https://api.github.com/repos/Parsely/streamparse/releases{/id}","created_at":"2014-05-02T20:33:50Z","updated_at":"2015-11-09T05:15:46Z","pushed_at":"2015-11-09T19:35:22Z","git_url":"git://github.com/Parsely/streamparse.git","ssh_url":"git@github.com:Parsely/streamparse.git","clone_url":"https://github.com/Parsely/streamparse.git","svn_url":"https://github.com/Parsely/streamparse","homepage":"","size":6217,"stargazers_count":872,"watchers_count":872,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"open_issues_count":31,"forks":110,"open_issues":31,"watchers":872,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/199"},"html":{"href":"https://github.com/Parsely/streamparse/pull/199"},"issue":{"href":"https://api.github.com/repos/Parsely/streamparse/issues/199"},"comments":{"href":"https://api.github.com/repos/Parsely/streamparse/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Parsely/streamparse/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/Parsely/streamparse/statuses/67d7f3ede3ced1ae2042aa1f74e3013686656e48"}}}}