{"action":"created","comment":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/comments/78440026","id":78440026,"diff_hunk":"@@ -0,0 +1,61 @@\n+from zipline.pipeline.common import SID_FIELD_NAME, TS_FIELD_NAME\n+from zipline.pipeline.loaders.blaze.core import ffill_query_in_range\n+from zipline.pipeline.loaders.utils import (\n+    normalize_data_query_bounds,\n+    normalize_timestamp_to_query_time,\n+)\n+\n+\n+def load_raw_data(assets, dates, data_query_time, data_query_tz, expr,\n+                  odo_kwargs):\n+    \"\"\"\n+    given an expression representing data to load, perform normalization and\n+    forward-filling and return the data, materialized.\n+\n+    parameters\n+    ----------\n+    assets : pd.int64index\n+        the assets to load data for.\n+    dates : pd.datetimeindex\n+        the simulation dates to load data for.\n+    data_query_time : datetime.time\n+        the time used as cutoff for new information.\n+    data_query_tz : tzinfo\n+        the timezone to normalize your dates to before comparing against\n+        `time`.\n+    expr : expr\n+        the expression representing the data to load.\n+    odo_kwargs : dict, optional\n+        extra keyword arguments to pass to odo when executing the expression.\n+\n+    returns\n+    -------\n+    raw : pd.dataframe\n+        the data symbolized by `expr` materialized in a dataframe.\n+    \"\"\"\n+    lower_dt, upper_dt = normalize_data_query_bounds(\n+        dates[0],\n+        dates[-1],\n+        data_query_time,\n+        data_query_tz,\n+    )\n+    raw = ffill_query_in_range(\n+        expr,\n+        lower_dt,\n+        upper_dt,\n+        odo_kwargs,\n+    )\n+    sids = raw.loc[:, SID_FIELD_NAME]","path":"zipline/pipeline/loaders/blaze/utils.py","position":48,"original_position":48,"commit_id":"d371fa5550c7aae7a5b3e1943e9ade50aacbdc97","original_commit_id":"d371fa5550c7aae7a5b3e1943e9ade50aacbdc97","user":{"login":"mtydykov","id":5226409,"avatar_url":"https://avatars.githubusercontent.com/u/5226409?v=3","gravatar_id":"","url":"https://api.github.com/users/mtydykov","html_url":"https://github.com/mtydykov","followers_url":"https://api.github.com/users/mtydykov/followers","following_url":"https://api.github.com/users/mtydykov/following{/other_user}","gists_url":"https://api.github.com/users/mtydykov/gists{/gist_id}","starred_url":"https://api.github.com/users/mtydykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtydykov/subscriptions","organizations_url":"https://api.github.com/users/mtydykov/orgs","repos_url":"https://api.github.com/users/mtydykov/repos","events_url":"https://api.github.com/users/mtydykov/events{/privacy}","received_events_url":"https://api.github.com/users/mtydykov/received_events","type":"User","site_admin":false},"body":"Not that I can think of; that's just how it was done originally in the blaze events loader. Happy to change it - any reason you can think of not to? Just want to make sure I don't break any edge cases.","created_at":"2016-09-12T19:39:26Z","updated_at":"2016-09-12T19:39:26Z","html_url":"https://github.com/quantopian/zipline/pull/1396#discussion_r78440026","pull_request_url":"https://api.github.com/repos/quantopian/zipline/pulls/1396","_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments/78440026"},"html":{"href":"https://github.com/quantopian/zipline/pull/1396#discussion_r78440026"},"pull_request":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/1396"}}},"pull_request":{"url":"https://api.github.com/repos/quantopian/zipline/pulls/1396","id":81481507,"html_url":"https://github.com/quantopian/zipline/pull/1396","diff_url":"https://github.com/quantopian/zipline/pull/1396.diff","patch_url":"https://github.com/quantopian/zipline/pull/1396.patch","issue_url":"https://api.github.com/repos/quantopian/zipline/issues/1396","number":1396,"state":"open","locked":false,"title":"Add estimates quarter loader to pipeline","user":{"login":"mtydykov","id":5226409,"avatar_url":"https://avatars.githubusercontent.com/u/5226409?v=3","gravatar_id":"","url":"https://api.github.com/users/mtydykov","html_url":"https://github.com/mtydykov","followers_url":"https://api.github.com/users/mtydykov/followers","following_url":"https://api.github.com/users/mtydykov/following{/other_user}","gists_url":"https://api.github.com/users/mtydykov/gists{/gist_id}","starred_url":"https://api.github.com/users/mtydykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtydykov/subscriptions","organizations_url":"https://api.github.com/users/mtydykov/orgs","repos_url":"https://api.github.com/users/mtydykov/repos","events_url":"https://api.github.com/users/mtydykov/events{/privacy}","received_events_url":"https://api.github.com/users/mtydykov/received_events","type":"User","site_admin":false},"body":"This PR adds an estimates quarter loader to be used with Pipeline. \r\n\r\nSome open questions are:\r\n- What other tests do we need to add?\r\n- How do we ensure that the `num_quarters` attribute has been added to the dynamically generated dataset by the time `load_adjusted_array` is called?","created_at":"2016-08-16T14:29:05Z","updated_at":"2016-09-12T19:39:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d754db2736bc5c5e0e1be519e55109508be061e4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/quantopian/zipline/pulls/1396/commits","review_comments_url":"https://api.github.com/repos/quantopian/zipline/pulls/1396/comments","review_comment_url":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quantopian/zipline/issues/1396/comments","statuses_url":"https://api.github.com/repos/quantopian/zipline/statuses/d371fa5550c7aae7a5b3e1943e9ade50aacbdc97","head":{"label":"quantopian:add_estimates_quarter_loader_to_pipeline","ref":"add_estimates_quarter_loader_to_pipeline","sha":"d371fa5550c7aae7a5b3e1943e9ade50aacbdc97","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}","deployments_url":"https://api.github.com/repos/quantopian/zipline/deployments","created_at":"2012-10-19T15:50:29Z","updated_at":"2016-09-12T12:55:52Z","pushed_at":"2016-09-12T19:17:15Z","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":159546,"stargazers_count":3705,"watchers_count":3705,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1159,"mirror_url":null,"open_issues_count":163,"forks":1159,"open_issues":163,"watchers":3705,"default_branch":"master"}},"base":{"label":"quantopian:master","ref":"master","sha":"92c2a4a408b6a0e4888be49c82091ba5557221e2","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}","deployments_url":"https://api.github.com/repos/quantopian/zipline/deployments","created_at":"2012-10-19T15:50:29Z","updated_at":"2016-09-12T12:55:52Z","pushed_at":"2016-09-12T19:17:15Z","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":159546,"stargazers_count":3705,"watchers_count":3705,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1159,"mirror_url":null,"open_issues_count":163,"forks":1159,"open_issues":163,"watchers":3705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/1396"},"html":{"href":"https://github.com/quantopian/zipline/pull/1396"},"issue":{"href":"https://api.github.com/repos/quantopian/zipline/issues/1396"},"comments":{"href":"https://api.github.com/repos/quantopian/zipline/issues/1396/comments"},"review_comments":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/1396/comments"},"review_comment":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quantopian/zipline/pulls/1396/commits"},"statuses":{"href":"https://api.github.com/repos/quantopian/zipline/statuses/d371fa5550c7aae7a5b3e1943e9ade50aacbdc97"}}}}
{"actor":{"display_login":"mtydykov"}}