{"action":"created","comment":{"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments/60361225","id":60361225,"diff_hunk":"@@ -0,0 +1,50 @@\n+from django.utils import timezone\n+from seshdash.data.db.influx import Influx\n+from datetime import timedelta, datetime\n+from django.forms import model_to_dict\n+from seshdash.tasks import run_aggregate_on_historical\n+from seshdash.models import Daily_Data_Point, BoM_Data_Point, Sesh_Site\n+from seshdash.utils.time_utils import get_time_interval_array\n+from seshdash.tests.data_generation import get_random_int, get_random_binary, get_random_interval, generate_date_array, get_random_float\n+\n+\n+def create_test_data(site_id):\n+        i = Influx()\n+        start_date = timezone.now() - timedelta(weeks=55)\n+        data_point_dates = generate_date_array(start=start_date, interval=24, units='hours')\n+        voltage_in = 220\n+        voltage_out = 220\n+   \ttotal_items = len(data_point_dates)","path":"seshdash/generateData.py","position":17,"original_position":17,"commit_id":"5a1021557e2c34c6351ec87493a7a31dc237fb69","original_commit_id":"5a1021557e2c34c6351ec87493a7a31dc237fb69","user":{"login":"jlark","id":956722,"avatar_url":"https://avatars.githubusercontent.com/u/956722?v=3","gravatar_id":"","url":"https://api.github.com/users/jlark","html_url":"https://github.com/jlark","followers_url":"https://api.github.com/users/jlark/followers","following_url":"https://api.github.com/users/jlark/following{/other_user}","gists_url":"https://api.github.com/users/jlark/gists{/gist_id}","starred_url":"https://api.github.com/users/jlark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlark/subscriptions","organizations_url":"https://api.github.com/users/jlark/orgs","repos_url":"https://api.github.com/users/jlark/repos","events_url":"https://api.github.com/users/jlark/events{/privacy}","received_events_url":"https://api.github.com/users/jlark/received_events","type":"User","site_admin":false},"body":"the spacing seems to be incorrect for this file.\r\n\r\nCan you check?\r\n","created_at":"2016-04-20T07:32:20Z","updated_at":"2016-04-20T07:32:20Z","html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109#discussion_r60361225","pull_request_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments/60361225"},"html":{"href":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109#discussion_r60361225"},"pull_request":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109","id":67044944,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109","diff_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109.diff","patch_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109.patch","issue_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/109","number":109,"state":"open","locked":false,"title":"Historical data page","user":{"login":"upatricck","id":8204177,"avatar_url":"https://avatars.githubusercontent.com/u/8204177?v=3","gravatar_id":"","url":"https://api.github.com/users/upatricck","html_url":"https://github.com/upatricck","followers_url":"https://api.github.com/users/upatricck/followers","following_url":"https://api.github.com/users/upatricck/following{/other_user}","gists_url":"https://api.github.com/users/upatricck/gists{/gist_id}","starred_url":"https://api.github.com/users/upatricck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/upatricck/subscriptions","organizations_url":"https://api.github.com/users/upatricck/orgs","repos_url":"https://api.github.com/users/upatricck/repos","events_url":"https://api.github.com/users/upatricck/events{/privacy}","received_events_url":"https://api.github.com/users/upatricck/received_events","type":"User","site_admin":false},"body":"**Historical data Page \r\n**This is a page to display daily data average for the whole year\r\n\r\n* You can view data for all the daily data columns for the whole year\r\n* The page gives the total number of alerts, average power and average pv\r\n\r\nTo be done\r\n* To make a day clickable so that you can get, more information about the day\r\n\r\n","created_at":"2016-04-19T16:00:47Z","updated_at":"2016-04-20T07:32:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"100eb57bac35babc524420fae1929bf601efbc9e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109/commits","review_comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109/comments","review_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/109/comments","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/5a1021557e2c34c6351ec87493a7a31dc237fb69","head":{"label":"GreatLakesEnergy:historical_data_page","ref":"historical_data_page","sha":"5a1021557e2c34c6351ec87493a7a31dc237fb69","user":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"repo":{"id":45332365,"name":"sesh-dash-beta","full_name":"GreatLakesEnergy/sesh-dash-beta","owner":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","description":"SESH Dashboard beta. Working dev code","fork":false,"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta","forks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/forks","keys_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/teams","hooks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/hooks","issue_events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/events{/number}","events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/events","assignees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/assignees{/user}","branches_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/branches{/branch}","tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/tags","blobs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/languages","stargazers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/stargazers","contributors_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contributors","subscribers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscribers","subscription_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscription","commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contents/{+path}","compare_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/merges","archive_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/downloads","issues_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues{/number}","pulls_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/labels{/name}","releases_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/releases{/id}","deployments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/deployments","created_at":"2015-11-01T07:54:15Z","updated_at":"2016-01-13T10:13:13Z","pushed_at":"2016-04-19T16:00:47Z","git_url":"git://github.com/GreatLakesEnergy/sesh-dash-beta.git","ssh_url":"git@github.com:GreatLakesEnergy/sesh-dash-beta.git","clone_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta.git","svn_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","homepage":null,"size":10129,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":3,"default_branch":"master"}},"base":{"label":"GreatLakesEnergy:master","ref":"master","sha":"a41643306a797dbff18168d327deb8f9bcd2035e","user":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"repo":{"id":45332365,"name":"sesh-dash-beta","full_name":"GreatLakesEnergy/sesh-dash-beta","owner":{"login":"GreatLakesEnergy","id":13625235,"avatar_url":"https://avatars.githubusercontent.com/u/13625235?v=3","gravatar_id":"","url":"https://api.github.com/users/GreatLakesEnergy","html_url":"https://github.com/GreatLakesEnergy","followers_url":"https://api.github.com/users/GreatLakesEnergy/followers","following_url":"https://api.github.com/users/GreatLakesEnergy/following{/other_user}","gists_url":"https://api.github.com/users/GreatLakesEnergy/gists{/gist_id}","starred_url":"https://api.github.com/users/GreatLakesEnergy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreatLakesEnergy/subscriptions","organizations_url":"https://api.github.com/users/GreatLakesEnergy/orgs","repos_url":"https://api.github.com/users/GreatLakesEnergy/repos","events_url":"https://api.github.com/users/GreatLakesEnergy/events{/privacy}","received_events_url":"https://api.github.com/users/GreatLakesEnergy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","description":"SESH Dashboard beta. Working dev code","fork":false,"url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta","forks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/forks","keys_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/teams","hooks_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/hooks","issue_events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/events{/number}","events_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/events","assignees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/assignees{/user}","branches_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/branches{/branch}","tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/tags","blobs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/languages","stargazers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/stargazers","contributors_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contributors","subscribers_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscribers","subscription_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/subscription","commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/contents/{+path}","compare_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/merges","archive_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/downloads","issues_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues{/number}","pulls_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/labels{/name}","releases_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/releases{/id}","deployments_url":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/deployments","created_at":"2015-11-01T07:54:15Z","updated_at":"2016-01-13T10:13:13Z","pushed_at":"2016-04-19T16:00:47Z","git_url":"git://github.com/GreatLakesEnergy/sesh-dash-beta.git","ssh_url":"git@github.com:GreatLakesEnergy/sesh-dash-beta.git","clone_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta.git","svn_url":"https://github.com/GreatLakesEnergy/sesh-dash-beta","homepage":null,"size":10129,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109"},"html":{"href":"https://github.com/GreatLakesEnergy/sesh-dash-beta/pull/109"},"issue":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/109"},"comments":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/GreatLakesEnergy/sesh-dash-beta/statuses/5a1021557e2c34c6351ec87493a7a31dc237fb69"}}}}