{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/36311427","id":36311427,"diff_hunk":"@@ -0,0 +1,630 @@\n+from copy import deepcopy","path":"astropy/table/index.py","position":1,"original_position":1,"commit_id":"398cbcf19c0bfb668363c6b82b0a1975eb2f0177","original_commit_id":"398cbcf19c0bfb668363c6b82b0a1975eb2f0177","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"Use `from __future__ import division` to be sure of uniform Py2 / Py3 behavior.","created_at":"2015-08-05T14:59:10Z","updated_at":"2015-08-05T14:59:10Z","html_url":"https://github.com/astropy/astropy/pull/3915#discussion_r36311427","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3915","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/36311427"},"html":{"href":"https://github.com/astropy/astropy/pull/3915#discussion_r36311427"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3915"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3915","id":39188190,"html_url":"https://github.com/astropy/astropy/pull/3915","diff_url":"https://github.com/astropy/astropy/pull/3915.diff","patch_url":"https://github.com/astropy/astropy/pull/3915.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3915","number":3915,"state":"open","locked":false,"title":"Indexing system for Table","user":{"login":"mdmueller","id":6729036,"avatar_url":"https://avatars.githubusercontent.com/u/6729036?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmueller","html_url":"https://github.com/mdmueller","followers_url":"https://api.github.com/users/mdmueller/followers","following_url":"https://api.github.com/users/mdmueller/following{/other_user}","gists_url":"https://api.github.com/users/mdmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmueller/subscriptions","organizations_url":"https://api.github.com/users/mdmueller/orgs","repos_url":"https://api.github.com/users/mdmueller/repos","events_url":"https://api.github.com/users/mdmueller/events{/privacy}","received_events_url":"https://api.github.com/users/mdmueller/received_events","type":"User","site_admin":false},"body":"This is a first pass at a new system allowing the `Table` class to hold indices, both for improved grouping performance and for searching by column values. Indices are stored in columns rather than the full table, and indices in turn store a reference to the column(s) they act on, so that composite indices work correctly. Some parts of this PR are final and some are still unfinished, so any comments/suggestions would be great.\r\n\r\n### (Essentially) complete\r\n* The `Index` class, which provides a wrapper around the sorting engine\r\n* Modifications to `Column`, which ensure that indices are modified as appropriate when a `Column` is modified\r\n* Modifications to `Table`\r\n\r\n### Unfinished\r\n* The `Table.where()` method, particularly finishing up the searching syntax\r\n* The actual sorting engine. I have bintrees (which provides fast binary search tree and red-black tree implementations) as an optional dependency, which is replaced by a pure-Python binary search tree class if bintrees isn't present. I also began work on a pure-Python red-black tree and a sorted array class, both unfinished.\r\n\r\n@mdboom @taldcroft ","created_at":"2015-07-03T16:52:28Z","updated_at":"2015-08-05T14:59:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a69cc0f4cae62f1bec3906b76e7f0c0107e5a3e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3915/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3915/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3915/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/398cbcf19c0bfb668363c6b82b0a1975eb2f0177","head":{"label":"mdmueller:table-indexing","ref":"table-indexing","sha":"398cbcf19c0bfb668363c6b82b0a1975eb2f0177","user":{"login":"mdmueller","id":6729036,"avatar_url":"https://avatars.githubusercontent.com/u/6729036?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmueller","html_url":"https://github.com/mdmueller","followers_url":"https://api.github.com/users/mdmueller/followers","following_url":"https://api.github.com/users/mdmueller/following{/other_user}","gists_url":"https://api.github.com/users/mdmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmueller/subscriptions","organizations_url":"https://api.github.com/users/mdmueller/orgs","repos_url":"https://api.github.com/users/mdmueller/repos","events_url":"https://api.github.com/users/mdmueller/events{/privacy}","received_events_url":"https://api.github.com/users/mdmueller/received_events","type":"User","site_admin":false},"repo":{"id":16990852,"name":"astropy","full_name":"mdmueller/astropy","owner":{"login":"mdmueller","id":6729036,"avatar_url":"https://avatars.githubusercontent.com/u/6729036?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmueller","html_url":"https://github.com/mdmueller","followers_url":"https://api.github.com/users/mdmueller/followers","following_url":"https://api.github.com/users/mdmueller/following{/other_user}","gists_url":"https://api.github.com/users/mdmueller/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmueller/subscriptions","organizations_url":"https://api.github.com/users/mdmueller/orgs","repos_url":"https://api.github.com/users/mdmueller/repos","events_url":"https://api.github.com/users/mdmueller/events{/privacy}","received_events_url":"https://api.github.com/users/mdmueller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdmueller/astropy","description":"Main Astropy repository","fork":true,"url":"https://api.github.com/repos/mdmueller/astropy","forks_url":"https://api.github.com/repos/mdmueller/astropy/forks","keys_url":"https://api.github.com/repos/mdmueller/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdmueller/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdmueller/astropy/teams","hooks_url":"https://api.github.com/repos/mdmueller/astropy/hooks","issue_events_url":"https://api.github.com/repos/mdmueller/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/mdmueller/astropy/events","assignees_url":"https://api.github.com/repos/mdmueller/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/mdmueller/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/mdmueller/astropy/tags","blobs_url":"https://api.github.com/repos/mdmueller/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdmueller/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdmueller/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdmueller/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdmueller/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/mdmueller/astropy/languages","stargazers_url":"https://api.github.com/repos/mdmueller/astropy/stargazers","contributors_url":"https://api.github.com/repos/mdmueller/astropy/contributors","subscribers_url":"https://api.github.com/repos/mdmueller/astropy/subscribers","subscription_url":"https://api.github.com/repos/mdmueller/astropy/subscription","commits_url":"https://api.github.com/repos/mdmueller/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdmueller/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdmueller/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdmueller/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdmueller/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/mdmueller/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdmueller/astropy/merges","archive_url":"https://api.github.com/repos/mdmueller/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdmueller/astropy/downloads","issues_url":"https://api.github.com/repos/mdmueller/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/mdmueller/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/mdmueller/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/mdmueller/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdmueller/astropy/labels{/name}","releases_url":"https://api.github.com/repos/mdmueller/astropy/releases{/id}","created_at":"2014-02-19T16:35:18Z","updated_at":"2014-10-20T17:13:11Z","pushed_at":"2015-08-05T03:19:39Z","git_url":"git://github.com/mdmueller/astropy.git","ssh_url":"git@github.com:mdmueller/astropy.git","clone_url":"https://github.com/mdmueller/astropy.git","svn_url":"https://github.com/mdmueller/astropy","homepage":"astropy.org","size":38972,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"fast-c-reader"}},"base":{"label":"astropy:master","ref":"master","sha":"4f75c15d01a818c3db73c546a07127d6c9a6de6d","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","created_at":"2011-07-21T01:33:49Z","updated_at":"2015-08-03T21:57:03Z","pushed_at":"2015-08-05T07:25:02Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":65522,"stargazers_count":621,"watchers_count":621,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":414,"mirror_url":null,"open_issues_count":596,"forks":414,"open_issues":596,"watchers":621,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3915"},"html":{"href":"https://github.com/astropy/astropy/pull/3915"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3915"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3915/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3915/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3915/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/398cbcf19c0bfb668363c6b82b0a1975eb2f0177"}}}}