GitHub PullRequestReviewCommentEvent at 2014-08-25 18:40:49
Repository: astropy
Actor: mdboom
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/16672162","id":16672162,"diff_hunk":"@@ -149,7 +149,7 @@ def p_ufloat(p):\n \n         def p_colon(p):\n             '''\n-            colon : sign UINT COLON UINT\n+            colon : sign UINT COLON ufloat","path":"astropy/coordinates/angle_utilities.py","position":5,"original_position":5,"commit_id":"03934881a4dab884ec7b63ed937034040d26f6df","original_commit_id":"26fd7f2cdaa9360bef6e355e3d0e5d727fc0efc5","user":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=2","gravatar_id":"8988285911e50fbe248b659d43bccf83","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"body":"If the tests pass, I'm fine with this change.","created_at":"2014-08-25T18:40:49Z","updated_at":"2014-08-25T18:40:49Z","html_url":"https://github.com/astropy/astropy/pull/2846#discussion_r16672162","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/2846","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/16672162"},"html":{"href":"https://github.com/astropy/astropy/pull/2846#discussion_r16672162"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/2846"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/2846","id":19577802,"html_url":"https://github.com/astropy/astropy/pull/2846","diff_url":"https://github.com/astropy/astropy/pull/2846.diff","patch_url":"https://github.com/astropy/astropy/pull/2846.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/2846","number":2846,"state":"open","locked":false,"title":"Angle accepts hours:mins or deg:mins initializers (without seconds) and float minutes for these cases","user":{"login":"bsipocz","id":6788290,"avatar_url":"https://avatars.githubusercontent.com/u/6788290?v=2","gravatar_id":"03ca63b0d518b9e0f9c1a863507d5745","url":"https://api.github.com/users/bsipocz","html_url":"https://github.com/bsipocz","followers_url":"https://api.github.com/users/bsipocz/followers","following_url":"https://api.github.com/users/bsipocz/following{/other_user}","gists_url":"https://api.github.com/users/bsipocz/gists{/gist_id}","starred_url":"https://api.github.com/users/bsipocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsipocz/subscriptions","organizations_url":"https://api.github.com/users/bsipocz/orgs","repos_url":"https://api.github.com/users/bsipocz/repos","events_url":"https://api.github.com/users/bsipocz/events{/privacy}","received_events_url":"https://api.github.com/users/bsipocz/received_events","type":"User","site_admin":false},"body":"This PR adds back the support for space separated sky coordinate values using the sign as separator when <6 values are given. This was once supported, and I couldn't find whether it was deliberately taken out or just by accident in #2586. If the former please close the PR.\r\nIt also adds the support for the format when seconds are missing, but the minute value is a float. \r\nI had to make changed to the ``_AngleParser`` class, but left the PLY generated stuff in ``angle_parsetab.py`` untouched as everything seemed to be working.\r\n\r\nThe use case motivation behind this was querying a region for objects in Simbad. It give back a list with the coordinates space separated, and sometimes with less than 6 values:\r\n\r\ncc @eteq, @taldcroft\r\n```\r\nIn [2]: astropy.__version__\r\nOut[2]: u'1.0.dev9597'\r\n\r\nIn [3]: from astroquery.simbad import Simbad\r\nWARNING: ConfigurationDefaultMissingWarning: Could not determine version of package astroquery Cannot install default profile. If you are importing from source, this is expected. [astroquery._astropy_init]\r\nWARNING: AstropyDeprecationWarning: ConfigurationItem has been deprecated in astropy 0.4. Use ConfigItem objects as members of ConfigNamespace subclasses instead.  See ConfigNamespace for an example. [astropy.config.configuration]\r\n\r\nIn [4]: import astropy.units as u\r\n\r\nIn [5]: obj_list = Simbad.query_region(coordinates='08:51:18 +11 48 00')\r\nWARNING: AstropyDeprecationWarning: The format function is deprecated and may be removed in a future version.\r\n        Use to_string instead. [astropy.utils.misc]\r\nWARNING: AstropyDeprecationWarning: The format function is deprecated and may be removed in a future version.\r\n        Use to_string instead. [astropy.utils.misc]\r\n\r\nIn [6]: ra=obj_list['RA']\r\n\r\nIn [7]: dec=obj_list['DEC']\r\n\r\nIn [8]: from astropy.coordinates import *\r\n\r\nIn [9]:  Angle(dec, unit=u.deg).deg\r\n---------------------------------------------------------------------------\r\nValueError                                Traceback (most recent call last)\r\n<ipython-input-9-de86a4894c9b> in <module>()\r\n----> 1 Angle(dec, unit=u.deg).deg\r\n\r\n/Users/bsipocz/munka/devel/astropy/astropy/coordinates/angles.py in __new__(cls, angle, unit, dtype, copy)\r\n    116                   not (isinstance(angle, np.ndarray) and\r\n    117                        angle.dtype.kind not in 'SUVO')):\r\n--> 118                 angle = [Angle(x, unit) for x in angle]\r\n    119                 if unit is None:\r\n    120                     unit = angle[0].unit\r\n\r\n/Users/bsipocz/munka/devel/astropy/astropy/coordinates/angles.py in __new__(cls, angle, unit, dtype, copy)\r\n    107 \r\n    108             if isinstance(angle, six.string_types):\r\n--> 109                 angle, new_unit = util.parse_angle(angle, unit)\r\n    110                 if new_unit is not None and unit is None:\r\n    111                     unit = new_unit\r\n\r\n/Users/bsipocz/munka/devel/astropy/astropy/coordinates/angle_utilities.py in parse_angle(angle, unit, debug)\r\n    345         string.\r\n    346     \"\"\"\r\n--> 347     return _AngleParser().parse(angle, unit, debug=debug)\r\n    348 \r\n    349 \r\n\r\n/Users/bsipocz/munka/devel/astropy/astropy/coordinates/angle_utilities.py in parse(self, angle, unit, debug)\r\n    261             else:\r\n    262                 raise ValueError(\r\n--> 263                     \"Syntax error parsing angle {0!r}\".format(angle))\r\n    264 \r\n    265         if unit is None and found_unit is None:\r\n\r\nValueError: Syntax error parsing angle '+11 48.0'\r\n```\r\n```\r\nIn [15]: print obj_list[0:3]\r\n        MAIN_ID               RA           DEC      RA_PREC ... COO_ERR_ANGLE COO_QUAL COO_WAVELENGTH     COO_BIBCODE    \r\n                           \"h:m:s\"       \"d:m:s\"            ...      deg                                                 \r\n----------------------- ------------- ------------- ------- ... ------------- -------- -------------- -------------------\r\n                  M  67      08 51 18      +11 48.0       4 ...             0        E                2005ApJ...619..824X\r\n2MASS J08511918+1147546 08 51 19.1817 +11 47 54.708       8 ...            90        B              O 2006A&A...448.1235D\r\n          ** BPM  480BE   08 51 19.19   +11 47 54.8       6 ...             0        D              O 2001AJ....122.3466M\r\n\r\n```","created_at":"2014-08-10T22:15:36Z","updated_at":"2014-08-25T18:40:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f26ee4da1ea5dab654b8071bf2aa2fa384a4c144","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/2846/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/2846/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/2846/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/03934881a4dab884ec7b63ed937034040d26f6df","head":{"label":"bsipocz:coordinates_accept_more_formats","ref":"coordinates_accept_more_formats","sha":"03934881a4dab884ec7b63ed937034040d26f6df","user":{"login":"bsipocz","id":6788290,"avatar_url":"https://avatars.githubusercontent.com/u/6788290?v=2","gravatar_id":"03ca63b0d518b9e0f9c1a863507d5745","url":"https://api.github.com/users/bsipocz","html_url":"https://github.com/bsipocz","followers_url":"https://api.github.com/users/bsipocz/followers","following_url":"https://api.github.com/users/bsipocz/following{/other_user}","gists_url":"https://api.github.com/users/bsipocz/gists{/gist_id}","starred_url":"https://api.github.com/users/bsipocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsipocz/subscriptions","organizations_url":"https://api.github.com/users/bsipocz/orgs","repos_url":"https://api.github.com/users/bsipocz/repos","events_url":"https://api.github.com/users/bsipocz/events{/privacy}","received_events_url":"https://api.github.com/users/bsipocz/received_events","type":"User","site_admin":false},"repo":{"id":17316971,"name":"astropy","full_name":"bsipocz/astropy","owner":{"login":"bsipocz","id":6788290,"avatar_url":"https://avatars.githubusercontent.com/u/6788290?v=2","gravatar_id":"03ca63b0d518b9e0f9c1a863507d5745","url":"https://api.github.com/users/bsipocz","html_url":"https://github.com/bsipocz","followers_url":"https://api.github.com/users/bsipocz/followers","following_url":"https://api.github.com/users/bsipocz/following{/other_user}","gists_url":"https://api.github.com/users/bsipocz/gists{/gist_id}","starred_url":"https://api.github.com/users/bsipocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsipocz/subscriptions","organizations_url":"https://api.github.com/users/bsipocz/orgs","repos_url":"https://api.github.com/users/bsipocz/repos","events_url":"https://api.github.com/users/bsipocz/events{/privacy}","received_events_url":"https://api.github.com/users/bsipocz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bsipocz/astropy","description":"Main Astropy repository","fork":true,"url":"https://api.github.com/repos/bsipocz/astropy","forks_url":"https://api.github.com/repos/bsipocz/astropy/forks","keys_url":"https://api.github.com/repos/bsipocz/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsipocz/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsipocz/astropy/teams","hooks_url":"https://api.github.com/repos/bsipocz/astropy/hooks","issue_events_url":"https://api.github.com/repos/bsipocz/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/bsipocz/astropy/events","assignees_url":"https://api.github.com/repos/bsipocz/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/bsipocz/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/bsipocz/astropy/tags","blobs_url":"https://api.github.com/repos/bsipocz/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsipocz/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsipocz/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsipocz/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsipocz/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/bsipocz/astropy/languages","stargazers_url":"https://api.github.com/repos/bsipocz/astropy/stargazers","contributors_url":"https://api.github.com/repos/bsipocz/astropy/contributors","subscribers_url":"https://api.github.com/repos/bsipocz/astropy/subscribers","subscription_url":"https://api.github.com/repos/bsipocz/astropy/subscription","commits_url":"https://api.github.com/repos/bsipocz/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsipocz/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsipocz/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsipocz/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/bsipocz/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/bsipocz/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsipocz/astropy/merges","archive_url":"https://api.github.com/repos/bsipocz/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsipocz/astropy/downloads","issues_url":"https://api.github.com/repos/bsipocz/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/bsipocz/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/bsipocz/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/bsipocz/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsipocz/astropy/labels{/name}","releases_url":"https://api.github.com/repos/bsipocz/astropy/releases{/id}","created_at":"2014-03-01T14:55:18Z","updated_at":"2014-06-02T12:50:34Z","pushed_at":"2014-08-16T01:23:49Z","git_url":"git://github.com/bsipocz/astropy.git","ssh_url":"git@github.com:bsipocz/astropy.git","clone_url":"https://github.com/bsipocz/astropy.git","svn_url":"https://github.com/bsipocz/astropy","homepage":"astropy.org","size":28340,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"zizike"}},"base":{"label":"astropy:master","ref":"master","sha":"196071bd93902b6dfc4af8cbaa128542b0977818","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=2","gravatar_id":"df333e02889464493106cdf6de217066","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=2","gravatar_id":"df333e02889464493106cdf6de217066","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-08-22T22:13:24Z","pushed_at":"2014-08-22T19:42:35Z","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":66332,"stargazers_count":588,"watchers_count":588,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":292,"mirror_url":null,"open_issues_count":382,"forks":292,"open_issues":382,"watchers":588,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/2846"},"html":{"href":"https://github.com/astropy/astropy/pull/2846"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/2846"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/2846/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/2846/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/2846/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/03934881a4dab884ec7b63ed937034040d26f6df"}}}}