GitHub PullRequestReviewCommentEvent at 2014-12-23 02:36:42
Repository: astropy
Actor: taldcroft
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/22201675","id":22201675,"diff_hunk":"@@ -0,0 +1,344 @@\n+try:\n+    from cStringIO import StringIO\n+except ImportError:\n+    from io import StringIO\n+\n+try:\n+    import h5py\n+except ImportError:\n+    HAS_H5PY = False\n+else:\n+    HAS_H5PY = True\n+\n+import numpy as np\n+\n+from ...tests.helper import pytest\n+from ...table import Table, QTable, join, hstack, vstack\n+from ..column import col_setattr, col_getattr\n+from ... import units as u\n+from ... import coordinates\n+from .. import table_helpers\n+from .conftest import MIXIN_COLS\n+\n+\n+def test_attributes(mixin_cols):\n+    \"\"\"\n+    Required attributes for a column can be set.\n+    \"\"\"\n+    m = mixin_cols['m']\n+    col_setattr(m, 'name', 'a')\n+    assert col_getattr(m, 'name') == 'a'\n+\n+    col_setattr(m, 'description', 'a')\n+    assert col_getattr(m, 'description') == 'a'\n+\n+    if not isinstance(m, u.Quantity):\n+        col_setattr(m, 'unit', u.m)","path":"astropy/table/tests/test_mixin.py","position":36,"original_position":36,"commit_id":"63a84f58487132cf82fa39e48c9dd2958201926a","original_commit_id":"63a84f58487132cf82fa39e48c9dd2958201926a","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":"Agree in general, but same comment that we need the mixin class to define how this behaves.","created_at":"2014-12-23T02:36:42Z","updated_at":"2014-12-23T02:36:42Z","html_url":"https://github.com/astropy/astropy/pull/3011#discussion_r22201675","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3011","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/22201675"},"html":{"href":"https://github.com/astropy/astropy/pull/3011#discussion_r22201675"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3011"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3011","id":25776146,"html_url":"https://github.com/astropy/astropy/pull/3011","diff_url":"https://github.com/astropy/astropy/pull/3011.diff","patch_url":"https://github.com/astropy/astropy/pull/3011.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3011","number":3011,"state":"open","locked":false,"title":"Support Table mixin columns","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":"This is essentially the same as #1833, #1835, #1839 but will be done in the framework of #2790 as a follow-on once that is merged.\r\n\r\nThe starting point here will be fed00dc5f6d6d9529ed8f073c95346eb176fdfa6, which *removed* the proof-of-concept changes showing that mixin columns would be straightforward in the new column-based Table structure.   In this issue (and eventual PR) we can define the right way to support mixin columns like Quantity, Time, and SkyCoord.  The original proof-of-concept used a some simple class / instance variables, but @mhvk has proposed using an abstract base class.\r\n\r\nCloses #1833\r\nCloses #1835\r\nCloses #1839","created_at":"2014-12-09T20:58:14Z","updated_at":"2014-12-23T02:36:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b099b3eace8e1498033cc7fb50e875a81e52f4a","assignee":{"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},"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/15","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/15/labels","id":643887,"number":15,"title":"v1.0.0","description":"","creator":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"open_issues":124,"closed_issues":148,"state":"open","created_at":"2014-04-29T16:03:02Z","updated_at":"2014-12-22T22:38:03Z","due_on":"2015-01-23T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3011/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3011/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3011/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/63a84f58487132cf82fa39e48c9dd2958201926a","head":{"label":"taldcroft:table-mixin","ref":"table-mixin","sha":"63a84f58487132cf82fa39e48c9dd2958201926a","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},"repo":{"id":2571537,"name":"astropy","full_name":"taldcroft/astropy","owner":{"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},"private":false,"html_url":"https://github.com/taldcroft/astropy","description":"Main AstroPy repository","fork":true,"url":"https://api.github.com/repos/taldcroft/astropy","forks_url":"https://api.github.com/repos/taldcroft/astropy/forks","keys_url":"https://api.github.com/repos/taldcroft/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taldcroft/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taldcroft/astropy/teams","hooks_url":"https://api.github.com/repos/taldcroft/astropy/hooks","issue_events_url":"https://api.github.com/repos/taldcroft/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/taldcroft/astropy/events","assignees_url":"https://api.github.com/repos/taldcroft/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/taldcroft/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/taldcroft/astropy/tags","blobs_url":"https://api.github.com/repos/taldcroft/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taldcroft/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taldcroft/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/taldcroft/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taldcroft/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/taldcroft/astropy/languages","stargazers_url":"https://api.github.com/repos/taldcroft/astropy/stargazers","contributors_url":"https://api.github.com/repos/taldcroft/astropy/contributors","subscribers_url":"https://api.github.com/repos/taldcroft/astropy/subscribers","subscription_url":"https://api.github.com/repos/taldcroft/astropy/subscription","commits_url":"https://api.github.com/repos/taldcroft/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/taldcroft/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/taldcroft/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/taldcroft/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/taldcroft/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/taldcroft/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taldcroft/astropy/merges","archive_url":"https://api.github.com/repos/taldcroft/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taldcroft/astropy/downloads","issues_url":"https://api.github.com/repos/taldcroft/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/taldcroft/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/taldcroft/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/taldcroft/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taldcroft/astropy/labels{/name}","releases_url":"https://api.github.com/repos/taldcroft/astropy/releases{/id}","created_at":"2011-10-13T18:44:28Z","updated_at":"2014-09-23T17:51:38Z","pushed_at":"2014-12-22T12:06:19Z","git_url":"git://github.com/taldcroft/astropy.git","ssh_url":"git@github.com:taldcroft/astropy.git","clone_url":"https://github.com/taldcroft/astropy.git","svn_url":"https://github.com/taldcroft/astropy","homepage":"astropy.org","size":33033,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"9015f89c908e62e9701079e4809254c1fd263158","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":"2014-12-22T22:38:03Z","pushed_at":"2014-12-22T22:38:03Z","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":53041,"stargazers_count":478,"watchers_count":478,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":330,"mirror_url":null,"open_issues_count":421,"forks":330,"open_issues":421,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3011"},"html":{"href":"https://github.com/astropy/astropy/pull/3011"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3011"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3011/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3011/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3011/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/63a84f58487132cf82fa39e48c9dd2958201926a"}}}}