{"action":"created","comment":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/comments/43654805","id":43654805,"diff_hunk":"@@ -266,6 +266,7 @@ def __init__(self, *args, **kwargs):\n         self.algoscript = kwargs.pop('script', None)\n \n         self._initialize = None\n+        self._analyze = kwargs.pop('analyze', None)","path":"zipline/algorithm.py","position":4,"original_position":4,"commit_id":"4d21187492c3320919b25e1cc34394d7555524eb","original_commit_id":"4d21187492c3320919b25e1cc34394d7555524eb","user":{"login":"richafrank","id":2123660,"avatar_url":"https://avatars.githubusercontent.com/u/2123660?v=3","gravatar_id":"","url":"https://api.github.com/users/richafrank","html_url":"https://github.com/richafrank","followers_url":"https://api.github.com/users/richafrank/followers","following_url":"https://api.github.com/users/richafrank/following{/other_user}","gists_url":"https://api.github.com/users/richafrank/gists{/gist_id}","starred_url":"https://api.github.com/users/richafrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richafrank/subscriptions","organizations_url":"https://api.github.com/users/richafrank/orgs","repos_url":"https://api.github.com/users/richafrank/repos","events_url":"https://api.github.com/users/richafrank/events{/privacy}","received_events_url":"https://api.github.com/users/richafrank/received_events","type":"User","site_admin":false},"body":"> I should have checked this more closely. Perhaps a test is warranted.\r\n\r\nThat's a great idea - want to add a test to, say, `test_algorithm.py`?\r\n\r\n> I had it working from the elif previously, but moved per a previous suggestion. Perhaps I misinterpreted the exact location. \r\n\r\nSorry about that.  I was thinking we should put it at the end of the block that currently looks like:\r\n```python\r\n             self._initialize = kwargs.pop('initialize')\r\n             self._handle_data = kwargs.pop('handle_data')\r\n             self._before_trading_start = kwargs.pop('before_trading_start',\r\n                                                     None)\r\n```\r\n> By the way is there a specific branch I should use for the PR?\r\n\r\nWhen upstreaming changing, my workflow is to create (in my fork) a new branch with a descriptive name, PR it against the upstream master, like you've done here, and then once it's merged, I update my fork's master with the changes from upstream/master.  That way my master is always in sync with upstream.  (I delete the branch afterwards.)","created_at":"2015-11-02T17:26:50Z","updated_at":"2015-11-02T17:26:50Z","html_url":"https://github.com/quantopian/zipline/pull/806#discussion_r43654805","pull_request_url":"https://api.github.com/repos/quantopian/zipline/pulls/806","_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments/43654805"},"html":{"href":"https://github.com/quantopian/zipline/pull/806#discussion_r43654805"},"pull_request":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/806"}}},"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/806","id":49373788,"html_url":"https://github.com/quantopian/zipline/pull/806","diff_url":"https://github.com/quantopian/zipline/pull/806.diff","patch_url":"https://github.com/quantopian/zipline/pull/806.patch","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/806","number":806,"state":"open","locked":false,"title":"BUG: Issue #801 Initializing TradingAlgorithm Object Does Not Set","user":{"login":"elmq0022","id":3450848,"avatar_url":"https://avatars.githubusercontent.com/u/3450848?v=3","gravatar_id":"","url":"https://api.github.com/users/elmq0022","html_url":"https://github.com/elmq0022","followers_url":"https://api.github.com/users/elmq0022/followers","following_url":"https://api.github.com/users/elmq0022/following{/other_user}","gists_url":"https://api.github.com/users/elmq0022/gists{/gist_id}","starred_url":"https://api.github.com/users/elmq0022/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmq0022/subscriptions","organizations_url":"https://api.github.com/users/elmq0022/orgs","repos_url":"https://api.github.com/users/elmq0022/repos","events_url":"https://api.github.com/users/elmq0022/events{/privacy}","received_events_url":"https://api.github.com/users/elmq0022/received_events","type":"User","site_admin":false},"body":"_analyze Method in algorithm.py\r\n\r\nAdded one line to check for the keyword argument 'analyze' and set the\r\nthe _analyze method when a TradingAlgorithm object is initialized\r\nwithin a script.","created_at":"2015-11-01T15:15:00Z","updated_at":"2015-11-02T17:26:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"624b24b800f425fa98080476af130b50c3edd255","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/quantopian/zipline/pulls/806/commits","review_comments_url":"https://api.github.com/repos/quantopian/zipline/pulls/806/comments","review_comment_url":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/806/comments","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/4d21187492c3320919b25e1cc34394d7555524eb","head":{"label":"elmq0022:master","ref":"master","sha":"4d21187492c3320919b25e1cc34394d7555524eb","user":{"login":"elmq0022","id":3450848,"avatar_url":"https://avatars.githubusercontent.com/u/3450848?v=3","gravatar_id":"","url":"https://api.github.com/users/elmq0022","html_url":"https://github.com/elmq0022","followers_url":"https://api.github.com/users/elmq0022/followers","following_url":"https://api.github.com/users/elmq0022/following{/other_user}","gists_url":"https://api.github.com/users/elmq0022/gists{/gist_id}","starred_url":"https://api.github.com/users/elmq0022/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmq0022/subscriptions","organizations_url":"https://api.github.com/users/elmq0022/orgs","repos_url":"https://api.github.com/users/elmq0022/repos","events_url":"https://api.github.com/users/elmq0022/events{/privacy}","received_events_url":"https://api.github.com/users/elmq0022/received_events","type":"User","site_admin":false},"repo":{"id":45344488,"name":"zipline","full_name":"elmq0022/zipline","owner":{"login":"elmq0022","id":3450848,"avatar_url":"https://avatars.githubusercontent.com/u/3450848?v=3","gravatar_id":"","url":"https://api.github.com/users/elmq0022","html_url":"https://github.com/elmq0022","followers_url":"https://api.github.com/users/elmq0022/followers","following_url":"https://api.github.com/users/elmq0022/following{/other_user}","gists_url":"https://api.github.com/users/elmq0022/gists{/gist_id}","starred_url":"https://api.github.com/users/elmq0022/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elmq0022/subscriptions","organizations_url":"https://api.github.com/users/elmq0022/orgs","repos_url":"https://api.github.com/users/elmq0022/repos","events_url":"https://api.github.com/users/elmq0022/events{/privacy}","received_events_url":"https://api.github.com/users/elmq0022/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elmq0022/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":true,"url":"https://api.github.com/repos/elmq0022/zipline","forks_url":"https://api.github.com/repos/elmq0022/zipline/forks","keys_url":"https://api.github.com/repos/elmq0022/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elmq0022/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elmq0022/zipline/teams","hooks_url":"https://api.github.com/repos/elmq0022/zipline/hooks","issue_events_url":"https://api.github.com/repos/elmq0022/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/elmq0022/zipline/events","assignees_url":"https://api.github.com/repos/elmq0022/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/elmq0022/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/elmq0022/zipline/tags","blobs_url":"https://api.github.com/repos/elmq0022/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elmq0022/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elmq0022/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/elmq0022/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elmq0022/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/elmq0022/zipline/languages","stargazers_url":"https://api.github.com/repos/elmq0022/zipline/stargazers","contributors_url":"https://api.github.com/repos/elmq0022/zipline/contributors","subscribers_url":"https://api.github.com/repos/elmq0022/zipline/subscribers","subscription_url":"https://api.github.com/repos/elmq0022/zipline/subscription","commits_url":"https://api.github.com/repos/elmq0022/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/elmq0022/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/elmq0022/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/elmq0022/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/elmq0022/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/elmq0022/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elmq0022/zipline/merges","archive_url":"https://api.github.com/repos/elmq0022/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elmq0022/zipline/downloads","issues_url":"https://api.github.com/repos/elmq0022/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/elmq0022/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/elmq0022/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/elmq0022/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elmq0022/zipline/labels{/name}","releases_url":"https://api.github.com/repos/elmq0022/zipline/releases{/id}","created_at":"2015-11-01T14:54:07Z","updated_at":"2015-11-01T14:54:10Z","pushed_at":"2015-11-01T15:10:43Z","git_url":"git://github.com/elmq0022/zipline.git","ssh_url":"git@github.com:elmq0022/zipline.git","clone_url":"https://github.com/elmq0022/zipline.git","svn_url":"https://github.com/elmq0022/zipline","homepage":"","size":26770,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"quantopian:master","ref":"master","sha":"cb29f39688001f33f4619f6516b352c4e7489c23","user":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"repo":{"id":6297520,"name":"zipline","full_name":"quantopian/zipline","owner":{"login":"quantopian","id":1393215,"avatar_url":"https://avatars.githubusercontent.com/u/1393215?v=3","gravatar_id":"","url":"https://api.github.com/users/quantopian","html_url":"https://github.com/quantopian","followers_url":"https://api.github.com/users/quantopian/followers","following_url":"https://api.github.com/users/quantopian/following{/other_user}","gists_url":"https://api.github.com/users/quantopian/gists{/gist_id}","starred_url":"https://api.github.com/users/quantopian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantopian/subscriptions","organizations_url":"https://api.github.com/users/quantopian/orgs","repos_url":"https://api.github.com/users/quantopian/repos","events_url":"https://api.github.com/users/quantopian/events{/privacy}","received_events_url":"https://api.github.com/users/quantopian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/quantopian/zipline","description":"Zipline, a Pythonic Algorithmic Trading Library","fork":false,"url":"https://api.github.com/repos/quantopian/zipline","forks_url":"https://api.github.com/repos/quantopian/zipline/forks","keys_url":"https://api.github.com/repos/quantopian/zipline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quantopian/zipline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quantopian/zipline/teams","hooks_url":"https://api.github.com/repos/quantopian/zipline/hooks","issue_events_url":"https://api.github.com/repos/quantopian/zipline/issues/events{/number}","events_url":"https://api.github.com/repos/quantopian/zipline/events","assignees_url":"https://api.github.com/repos/quantopian/zipline/assignees{/user}","branches_url":"https://api.github.com/repos/quantopian/zipline/branches{/branch}","tags_url":"https://api.github.com/repos/quantopian/zipline/tags","blobs_url":"https://api.github.com/repos/quantopian/zipline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quantopian/zipline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quantopian/zipline/git/refs{/sha}","trees_url":"https://api.github.com/repos/quantopian/zipline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/{sha}","languages_url":"https://api.github.com/repos/quantopian/zipline/languages","stargazers_url":"https://api.github.com/repos/quantopian/zipline/stargazers","contributors_url":"https://api.github.com/repos/quantopian/zipline/contributors","subscribers_url":"https://api.github.com/repos/quantopian/zipline/subscribers","subscription_url":"https://api.github.com/repos/quantopian/zipline/subscription","commits_url":"https://api.github.com/repos/quantopian/zipline/commits{/sha}","git_commits_url":"https://api.github.com/repos/quantopian/zipline/git/commits{/sha}","comments_url":"https://api.github.com/repos/quantopian/zipline/comments{/number}","issue_comment_url":"https://api.github.com/repos/quantopian/zipline/issues/comments{/number}","contents_url":"https://api.github.com/repos/quantopian/zipline/contents/{+path}","compare_url":"https://api.github.com/repos/quantopian/zipline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quantopian/zipline/merges","archive_url":"https://api.github.com/repos/quantopian/zipline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quantopian/zipline/downloads","issues_url":"https://api.github.com/repos/quantopian/zipline/issues{/number}","pulls_url":"https://api.github.com/repos/quantopian/zipline/pulls{/number}","milestones_url":"https://api.github.com/repos/quantopian/zipline/milestones{/number}","notifications_url":"https://api.github.com/repos/quantopian/zipline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quantopian/zipline/labels{/name}","releases_url":"https://api.github.com/repos/quantopian/zipline/releases{/id}","created_at":"2012-10-19T15:50:29Z","updated_at":"2015-11-02T14:41:21Z","pushed_at":"2015-11-02T15:13:44Z","git_url":"git://github.com/quantopian/zipline.git","ssh_url":"git@github.com:quantopian/zipline.git","clone_url":"https://github.com/quantopian/zipline.git","svn_url":"https://github.com/quantopian/zipline","homepage":"","size":26770,"stargazers_count":2634,"watchers_count":2634,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":731,"mirror_url":null,"open_issues_count":150,"forks":731,"open_issues":150,"watchers":2634,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/806"},"html":{"href":"https://github.com/quantopian/zipline/pull/806"},"issue":{"href":"https://api.github.com/repos/quantopian/zipline/issues/806"},"comments":{"href":"https://api.github.com/repos/quantopian/zipline/issues/806/comments"},"review_comments":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/806/comments"},"review_comment":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/806/commits"},"statuses":{"href":"https://api.github.com/repos/quantopian/zipline/statuses/4d21187492c3320919b25e1cc34394d7555524eb"}}}}