{"action":"created","comment":{"url":"https://api.github.com/repos/transientskp/tkp/pulls/comments/71309478","id":71309478,"diff_hunk":"@@ -137,41 +134,3 @@ def dump_database_backup(db_config, job_dir):\n                 db_config['database'], db_config['user'], db_config['password'],\n                 output_name\n             )\n-\n-def group_per_timestep(images):\n-    \"\"\"\n-    groups a list of TRAP images per time step.\n-\n-    Per time step the images are order per frequency and then per stokes. The\n-    eventual order is:\n-\n-    (t1, f1, s1), (t1, f1, s2), (t1, f2, s1), (t1, f2, s2), (t2, f1, s1), ...)\n-    where:\n-\n-        * t is time sorted by old to new\n-        * f is frequency sorted from low to high\n-        * s is stokes, sorted by ID as defined in the database schema\n-\n-    Args:\n-        images (list): list of tuple, (image_db, accessor object)\n-\n-    Returns:\n-        list: List of tuples. The list is sorted by timestamp.\n-            Each tuple has the timestamp as a first element,\n-            and a list of images sorted by frequency and then stokes\n-            as the second element.\n-\n-    \"\"\"\n-    timestamp_to_images_map = defaultdict(list)\n-    for db_image, accessor in images:\n-        timestamp_to_images_map[db_image.taustart_ts].append((db_image, accessor))\n-\n-    # List of (timestamp, [images_at_timestamp]) tuples:\n-    grouped_images = timestamp_to_images_map.items()\n-\n-    # sort the tuples by first element (timestamps)\n-    grouped_images.sort()\n-\n-    # and then sort the nested items per freq and stokes\n-    [l[1].sort(key=lambda x: (x[0].freq_eff, x[0].stokes)) for l in grouped_images]","path":"tkp/steps/misc.py","position":null,"original_position":71,"commit_id":"7f1b9565deffb769e568b78f82a71013ed5f290a","original_commit_id":"f6e5d0bdda23393369e65d1f58469a42031b742e","user":{"login":"gijzelaerr","id":326308,"avatar_url":"https://avatars.githubusercontent.com/u/326308?v=3","gravatar_id":"","url":"https://api.github.com/users/gijzelaerr","html_url":"https://github.com/gijzelaerr","followers_url":"https://api.github.com/users/gijzelaerr/followers","following_url":"https://api.github.com/users/gijzelaerr/following{/other_user}","gists_url":"https://api.github.com/users/gijzelaerr/gists{/gist_id}","starred_url":"https://api.github.com/users/gijzelaerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijzelaerr/subscriptions","organizations_url":"https://api.github.com/users/gijzelaerr/orgs","repos_url":"https://api.github.com/users/gijzelaerr/repos","events_url":"https://api.github.com/users/gijzelaerr/events{/privacy}","received_events_url":"https://api.github.com/users/gijzelaerr/received_events","type":"User","site_admin":false},"body":"hm, good point. But is it really a problem? This would only affect the order of the quality check and soure extraction, not source association and other SQL magic. Once it is in the database the order doesn't matter, and that is where the source association happens. Or am I wrong?","created_at":"2016-07-19T10:07:48Z","updated_at":"2016-07-19T10:07:48Z","html_url":"https://github.com/transientskp/tkp/pull/515#discussion_r71309478","pull_request_url":"https://api.github.com/repos/transientskp/tkp/pulls/515","_links":{"self":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/comments/71309478"},"html":{"href":"https://github.com/transientskp/tkp/pull/515#discussion_r71309478"},"pull_request":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/515"}}},"pull_request":{"url":"https://api.github.com/repos/transientskp/tkp/pulls/515","id":74074299,"html_url":"https://github.com/transientskp/tkp/pull/515","diff_url":"https://github.com/transientskp/tkp/pull/515.diff","patch_url":"https://github.com/transientskp/tkp/pull/515.patch","issue_url":"https://api.github.com/repos/transientskp/tkp/issues/515","number":515,"state":"open","locked":false,"title":"Add streaming support, first step for AARTFAAC integration","user":{"login":"gijzelaerr","id":326308,"avatar_url":"https://avatars.githubusercontent.com/u/326308?v=3","gravatar_id":"","url":"https://api.github.com/users/gijzelaerr","html_url":"https://github.com/gijzelaerr","followers_url":"https://api.github.com/users/gijzelaerr/followers","following_url":"https://api.github.com/users/gijzelaerr/following{/other_user}","gists_url":"https://api.github.com/users/gijzelaerr/gists{/gist_id}","starred_url":"https://api.github.com/users/gijzelaerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijzelaerr/subscriptions","organizations_url":"https://api.github.com/users/gijzelaerr/orgs","repos_url":"https://api.github.com/users/gijzelaerr/repos","events_url":"https://api.github.com/users/gijzelaerr/events{/privacy}","received_events_url":"https://api.github.com/users/gijzelaerr/received_events","type":"User","site_admin":false},"body":"I think it is good to have this one already up for review, otherwise it gets too big.\r\n\r\nThis PR consists of:\r\n* A rewrite of the main logic, split if up in logical units\r\n* A modification of most (distributed) steps to pass around accessors, not image 'urls'.\r\n* Replacing `pywcs` with `astro.pwcs`\r\n* Adding a FitsImageBlob accessor which is used for representing in memory AARTFAAC images.","created_at":"2016-06-16T12:47:19Z","updated_at":"2016-07-19T10:07:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dae85b804c5a4eb2527bb23e1952353eccfee2c9","assignee":{"login":"timstaley","id":1352905,"avatar_url":"https://avatars.githubusercontent.com/u/1352905?v=3","gravatar_id":"","url":"https://api.github.com/users/timstaley","html_url":"https://github.com/timstaley","followers_url":"https://api.github.com/users/timstaley/followers","following_url":"https://api.github.com/users/timstaley/following{/other_user}","gists_url":"https://api.github.com/users/timstaley/gists{/gist_id}","starred_url":"https://api.github.com/users/timstaley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timstaley/subscriptions","organizations_url":"https://api.github.com/users/timstaley/orgs","repos_url":"https://api.github.com/users/timstaley/repos","events_url":"https://api.github.com/users/timstaley/events{/privacy}","received_events_url":"https://api.github.com/users/timstaley/received_events","type":"User","site_admin":false},"assignees":[{"login":"timstaley","id":1352905,"avatar_url":"https://avatars.githubusercontent.com/u/1352905?v=3","gravatar_id":"","url":"https://api.github.com/users/timstaley","html_url":"https://github.com/timstaley","followers_url":"https://api.github.com/users/timstaley/followers","following_url":"https://api.github.com/users/timstaley/following{/other_user}","gists_url":"https://api.github.com/users/timstaley/gists{/gist_id}","starred_url":"https://api.github.com/users/timstaley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timstaley/subscriptions","organizations_url":"https://api.github.com/users/timstaley/orgs","repos_url":"https://api.github.com/users/timstaley/repos","events_url":"https://api.github.com/users/timstaley/events{/privacy}","received_events_url":"https://api.github.com/users/timstaley/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/transientskp/tkp/pulls/515/commits","review_comments_url":"https://api.github.com/repos/transientskp/tkp/pulls/515/comments","review_comment_url":"https://api.github.com/repos/transientskp/tkp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/transientskp/tkp/issues/515/comments","statuses_url":"https://api.github.com/repos/transientskp/tkp/statuses/7f1b9565deffb769e568b78f82a71013ed5f290a","head":{"label":"transientskp:stream","ref":"stream","sha":"7f1b9565deffb769e568b78f82a71013ed5f290a","user":{"login":"transientskp","id":1758709,"avatar_url":"https://avatars.githubusercontent.com/u/1758709?v=3","gravatar_id":"","url":"https://api.github.com/users/transientskp","html_url":"https://github.com/transientskp","followers_url":"https://api.github.com/users/transientskp/followers","following_url":"https://api.github.com/users/transientskp/following{/other_user}","gists_url":"https://api.github.com/users/transientskp/gists{/gist_id}","starred_url":"https://api.github.com/users/transientskp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/transientskp/subscriptions","organizations_url":"https://api.github.com/users/transientskp/orgs","repos_url":"https://api.github.com/users/transientskp/repos","events_url":"https://api.github.com/users/transientskp/events{/privacy}","received_events_url":"https://api.github.com/users/transientskp/received_events","type":"Organization","site_admin":false},"repo":{"id":4393078,"name":"tkp","full_name":"transientskp/tkp","owner":{"login":"transientskp","id":1758709,"avatar_url":"https://avatars.githubusercontent.com/u/1758709?v=3","gravatar_id":"","url":"https://api.github.com/users/transientskp","html_url":"https://github.com/transientskp","followers_url":"https://api.github.com/users/transientskp/followers","following_url":"https://api.github.com/users/transientskp/following{/other_user}","gists_url":"https://api.github.com/users/transientskp/gists{/gist_id}","starred_url":"https://api.github.com/users/transientskp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/transientskp/subscriptions","organizations_url":"https://api.github.com/users/transientskp/orgs","repos_url":"https://api.github.com/users/transientskp/repos","events_url":"https://api.github.com/users/transientskp/events{/privacy}","received_events_url":"https://api.github.com/users/transientskp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/transientskp/tkp","description":"A transients-discovery pipeline for astronomical image-based surveys","fork":false,"url":"https://api.github.com/repos/transientskp/tkp","forks_url":"https://api.github.com/repos/transientskp/tkp/forks","keys_url":"https://api.github.com/repos/transientskp/tkp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/transientskp/tkp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/transientskp/tkp/teams","hooks_url":"https://api.github.com/repos/transientskp/tkp/hooks","issue_events_url":"https://api.github.com/repos/transientskp/tkp/issues/events{/number}","events_url":"https://api.github.com/repos/transientskp/tkp/events","assignees_url":"https://api.github.com/repos/transientskp/tkp/assignees{/user}","branches_url":"https://api.github.com/repos/transientskp/tkp/branches{/branch}","tags_url":"https://api.github.com/repos/transientskp/tkp/tags","blobs_url":"https://api.github.com/repos/transientskp/tkp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/transientskp/tkp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/transientskp/tkp/git/refs{/sha}","trees_url":"https://api.github.com/repos/transientskp/tkp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/transientskp/tkp/statuses/{sha}","languages_url":"https://api.github.com/repos/transientskp/tkp/languages","stargazers_url":"https://api.github.com/repos/transientskp/tkp/stargazers","contributors_url":"https://api.github.com/repos/transientskp/tkp/contributors","subscribers_url":"https://api.github.com/repos/transientskp/tkp/subscribers","subscription_url":"https://api.github.com/repos/transientskp/tkp/subscription","commits_url":"https://api.github.com/repos/transientskp/tkp/commits{/sha}","git_commits_url":"https://api.github.com/repos/transientskp/tkp/git/commits{/sha}","comments_url":"https://api.github.com/repos/transientskp/tkp/comments{/number}","issue_comment_url":"https://api.github.com/repos/transientskp/tkp/issues/comments{/number}","contents_url":"https://api.github.com/repos/transientskp/tkp/contents/{+path}","compare_url":"https://api.github.com/repos/transientskp/tkp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/transientskp/tkp/merges","archive_url":"https://api.github.com/repos/transientskp/tkp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/transientskp/tkp/downloads","issues_url":"https://api.github.com/repos/transientskp/tkp/issues{/number}","pulls_url":"https://api.github.com/repos/transientskp/tkp/pulls{/number}","milestones_url":"https://api.github.com/repos/transientskp/tkp/milestones{/number}","notifications_url":"https://api.github.com/repos/transientskp/tkp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/transientskp/tkp/labels{/name}","releases_url":"https://api.github.com/repos/transientskp/tkp/releases{/id}","deployments_url":"https://api.github.com/repos/transientskp/tkp/deployments","created_at":"2012-05-21T12:01:49Z","updated_at":"2016-06-27T09:12:57Z","pushed_at":"2016-07-18T14:13:37Z","git_url":"git://github.com/transientskp/tkp.git","ssh_url":"git@github.com:transientskp/tkp.git","clone_url":"https://github.com/transientskp/tkp.git","svn_url":"https://github.com/transientskp/tkp","homepage":"http://docs.transientskp.org/","size":14968,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":68,"forks":7,"open_issues":68,"watchers":7,"default_branch":"master"}},"base":{"label":"transientskp:master","ref":"master","sha":"470bb9c2fa3b058be44cd26dc65b86b2d1d0a7b0","user":{"login":"transientskp","id":1758709,"avatar_url":"https://avatars.githubusercontent.com/u/1758709?v=3","gravatar_id":"","url":"https://api.github.com/users/transientskp","html_url":"https://github.com/transientskp","followers_url":"https://api.github.com/users/transientskp/followers","following_url":"https://api.github.com/users/transientskp/following{/other_user}","gists_url":"https://api.github.com/users/transientskp/gists{/gist_id}","starred_url":"https://api.github.com/users/transientskp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/transientskp/subscriptions","organizations_url":"https://api.github.com/users/transientskp/orgs","repos_url":"https://api.github.com/users/transientskp/repos","events_url":"https://api.github.com/users/transientskp/events{/privacy}","received_events_url":"https://api.github.com/users/transientskp/received_events","type":"Organization","site_admin":false},"repo":{"id":4393078,"name":"tkp","full_name":"transientskp/tkp","owner":{"login":"transientskp","id":1758709,"avatar_url":"https://avatars.githubusercontent.com/u/1758709?v=3","gravatar_id":"","url":"https://api.github.com/users/transientskp","html_url":"https://github.com/transientskp","followers_url":"https://api.github.com/users/transientskp/followers","following_url":"https://api.github.com/users/transientskp/following{/other_user}","gists_url":"https://api.github.com/users/transientskp/gists{/gist_id}","starred_url":"https://api.github.com/users/transientskp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/transientskp/subscriptions","organizations_url":"https://api.github.com/users/transientskp/orgs","repos_url":"https://api.github.com/users/transientskp/repos","events_url":"https://api.github.com/users/transientskp/events{/privacy}","received_events_url":"https://api.github.com/users/transientskp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/transientskp/tkp","description":"A transients-discovery pipeline for astronomical image-based surveys","fork":false,"url":"https://api.github.com/repos/transientskp/tkp","forks_url":"https://api.github.com/repos/transientskp/tkp/forks","keys_url":"https://api.github.com/repos/transientskp/tkp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/transientskp/tkp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/transientskp/tkp/teams","hooks_url":"https://api.github.com/repos/transientskp/tkp/hooks","issue_events_url":"https://api.github.com/repos/transientskp/tkp/issues/events{/number}","events_url":"https://api.github.com/repos/transientskp/tkp/events","assignees_url":"https://api.github.com/repos/transientskp/tkp/assignees{/user}","branches_url":"https://api.github.com/repos/transientskp/tkp/branches{/branch}","tags_url":"https://api.github.com/repos/transientskp/tkp/tags","blobs_url":"https://api.github.com/repos/transientskp/tkp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/transientskp/tkp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/transientskp/tkp/git/refs{/sha}","trees_url":"https://api.github.com/repos/transientskp/tkp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/transientskp/tkp/statuses/{sha}","languages_url":"https://api.github.com/repos/transientskp/tkp/languages","stargazers_url":"https://api.github.com/repos/transientskp/tkp/stargazers","contributors_url":"https://api.github.com/repos/transientskp/tkp/contributors","subscribers_url":"https://api.github.com/repos/transientskp/tkp/subscribers","subscription_url":"https://api.github.com/repos/transientskp/tkp/subscription","commits_url":"https://api.github.com/repos/transientskp/tkp/commits{/sha}","git_commits_url":"https://api.github.com/repos/transientskp/tkp/git/commits{/sha}","comments_url":"https://api.github.com/repos/transientskp/tkp/comments{/number}","issue_comment_url":"https://api.github.com/repos/transientskp/tkp/issues/comments{/number}","contents_url":"https://api.github.com/repos/transientskp/tkp/contents/{+path}","compare_url":"https://api.github.com/repos/transientskp/tkp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/transientskp/tkp/merges","archive_url":"https://api.github.com/repos/transientskp/tkp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/transientskp/tkp/downloads","issues_url":"https://api.github.com/repos/transientskp/tkp/issues{/number}","pulls_url":"https://api.github.com/repos/transientskp/tkp/pulls{/number}","milestones_url":"https://api.github.com/repos/transientskp/tkp/milestones{/number}","notifications_url":"https://api.github.com/repos/transientskp/tkp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/transientskp/tkp/labels{/name}","releases_url":"https://api.github.com/repos/transientskp/tkp/releases{/id}","deployments_url":"https://api.github.com/repos/transientskp/tkp/deployments","created_at":"2012-05-21T12:01:49Z","updated_at":"2016-06-27T09:12:57Z","pushed_at":"2016-07-18T14:13:37Z","git_url":"git://github.com/transientskp/tkp.git","ssh_url":"git@github.com:transientskp/tkp.git","clone_url":"https://github.com/transientskp/tkp.git","svn_url":"https://github.com/transientskp/tkp","homepage":"http://docs.transientskp.org/","size":14968,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":68,"forks":7,"open_issues":68,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/515"},"html":{"href":"https://github.com/transientskp/tkp/pull/515"},"issue":{"href":"https://api.github.com/repos/transientskp/tkp/issues/515"},"comments":{"href":"https://api.github.com/repos/transientskp/tkp/issues/515/comments"},"review_comments":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/515/comments"},"review_comment":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/transientskp/tkp/pulls/515/commits"},"statuses":{"href":"https://api.github.com/repos/transientskp/tkp/statuses/7f1b9565deffb769e568b78f82a71013ed5f290a"}}}}
{"actor":{"display_login":"gijzelaerr"}}