{"action":"opened","number":827,"pull_request":{"url":"https://api.github.com/repos/glue-viz/glue/pulls/827","id":56763021,"html_url":"https://github.com/glue-viz/glue/pull/827","diff_url":"https://github.com/glue-viz/glue/pull/827.diff","patch_url":"https://github.com/glue-viz/glue/pull/827.patch","issue_url":"https://api.github.com/repos/glue-viz/glue/issues/827","number":827,"state":"open","locked":false,"title":"Switch to absolute imports in most cases","user":{"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},"body":"This switches all glue imports to absolute imports except in the following cases:\r\n\r\n- local imports in ``__init__.py`` files\r\n- local imports in ``test_*.py`` files and imports that only go up one level\r\n\r\nThe idea is that in the latter case, the tests will usually always be in the same place relative to the files the tests apply for, so in that case it makes sense to use relative imports.\r\n\r\nHowever, in all other cases, when trying to refactor the code, I found that the relative imports really make the code much harder to understand (and harder to move files around).\r\n\r\nWith absolute imports, it will be much easier to check that certain parts of glue are not imported by other parts (for example nothing in ``glue.core`` should import from ``glue.qt``, etc.).\r\n\r\nIncidentally, I'm guilty of switching from absolute to relative initially (in b999181f8f7120abaee928bfe7a94743780ff324, c7b369d3731bdd47e4d12ca2ff360fec8e0b51ae, 50402a6c6925b8b2078a679cae77a3635ee59406, and ccf77e29570a28b0dcdd276a05cc5d84164c305e) but I've now learned from my mistake :grin:","created_at":"2016-01-21T15:19:43Z","updated_at":"2016-01-21T15:19:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/glue-viz/glue/pulls/827/commits","review_comments_url":"https://api.github.com/repos/glue-viz/glue/pulls/827/comments","review_comment_url":"https://api.github.com/repos/glue-viz/glue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/glue-viz/glue/issues/827/comments","statuses_url":"https://api.github.com/repos/glue-viz/glue/statuses/95681fc5e59d1f8562e9d1da70162852a0cff856","head":{"label":"astrofrog:absolute-imports","ref":"absolute-imports","sha":"95681fc5e59d1f8562e9d1da70162852a0cff856","user":{"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},"repo":{"id":4928055,"name":"glue","full_name":"astrofrog/glue","owner":{"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},"private":false,"html_url":"https://github.com/astrofrog/glue","description":"","fork":true,"url":"https://api.github.com/repos/astrofrog/glue","forks_url":"https://api.github.com/repos/astrofrog/glue/forks","keys_url":"https://api.github.com/repos/astrofrog/glue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astrofrog/glue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astrofrog/glue/teams","hooks_url":"https://api.github.com/repos/astrofrog/glue/hooks","issue_events_url":"https://api.github.com/repos/astrofrog/glue/issues/events{/number}","events_url":"https://api.github.com/repos/astrofrog/glue/events","assignees_url":"https://api.github.com/repos/astrofrog/glue/assignees{/user}","branches_url":"https://api.github.com/repos/astrofrog/glue/branches{/branch}","tags_url":"https://api.github.com/repos/astrofrog/glue/tags","blobs_url":"https://api.github.com/repos/astrofrog/glue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astrofrog/glue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astrofrog/glue/git/refs{/sha}","trees_url":"https://api.github.com/repos/astrofrog/glue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astrofrog/glue/statuses/{sha}","languages_url":"https://api.github.com/repos/astrofrog/glue/languages","stargazers_url":"https://api.github.com/repos/astrofrog/glue/stargazers","contributors_url":"https://api.github.com/repos/astrofrog/glue/contributors","subscribers_url":"https://api.github.com/repos/astrofrog/glue/subscribers","subscription_url":"https://api.github.com/repos/astrofrog/glue/subscription","commits_url":"https://api.github.com/repos/astrofrog/glue/commits{/sha}","git_commits_url":"https://api.github.com/repos/astrofrog/glue/git/commits{/sha}","comments_url":"https://api.github.com/repos/astrofrog/glue/comments{/number}","issue_comment_url":"https://api.github.com/repos/astrofrog/glue/issues/comments{/number}","contents_url":"https://api.github.com/repos/astrofrog/glue/contents/{+path}","compare_url":"https://api.github.com/repos/astrofrog/glue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astrofrog/glue/merges","archive_url":"https://api.github.com/repos/astrofrog/glue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astrofrog/glue/downloads","issues_url":"https://api.github.com/repos/astrofrog/glue/issues{/number}","pulls_url":"https://api.github.com/repos/astrofrog/glue/pulls{/number}","milestones_url":"https://api.github.com/repos/astrofrog/glue/milestones{/number}","notifications_url":"https://api.github.com/repos/astrofrog/glue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astrofrog/glue/labels{/name}","releases_url":"https://api.github.com/repos/astrofrog/glue/releases{/id}","created_at":"2012-07-06T16:52:49Z","updated_at":"2015-09-10T22:25:31Z","pushed_at":"2016-01-21T15:15:36Z","git_url":"git://github.com/astrofrog/glue.git","ssh_url":"git@github.com:astrofrog/glue.git","clone_url":"https://github.com/astrofrog/glue.git","svn_url":"https://github.com/astrofrog/glue","homepage":"","size":27443,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"master"}},"base":{"label":"glue-viz:master","ref":"master","sha":"49d3cca1016cb99727ebb5dd3c2bbca3bac54f5a","user":{"login":"glue-viz","id":1926209,"avatar_url":"https://avatars.githubusercontent.com/u/1926209?v=3","gravatar_id":"","url":"https://api.github.com/users/glue-viz","html_url":"https://github.com/glue-viz","followers_url":"https://api.github.com/users/glue-viz/followers","following_url":"https://api.github.com/users/glue-viz/following{/other_user}","gists_url":"https://api.github.com/users/glue-viz/gists{/gist_id}","starred_url":"https://api.github.com/users/glue-viz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glue-viz/subscriptions","organizations_url":"https://api.github.com/users/glue-viz/orgs","repos_url":"https://api.github.com/users/glue-viz/repos","events_url":"https://api.github.com/users/glue-viz/events{/privacy}","received_events_url":"https://api.github.com/users/glue-viz/received_events","type":"Organization","site_admin":false},"repo":{"id":1768238,"name":"glue","full_name":"glue-viz/glue","owner":{"login":"glue-viz","id":1926209,"avatar_url":"https://avatars.githubusercontent.com/u/1926209?v=3","gravatar_id":"","url":"https://api.github.com/users/glue-viz","html_url":"https://github.com/glue-viz","followers_url":"https://api.github.com/users/glue-viz/followers","following_url":"https://api.github.com/users/glue-viz/following{/other_user}","gists_url":"https://api.github.com/users/glue-viz/gists{/gist_id}","starred_url":"https://api.github.com/users/glue-viz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glue-viz/subscriptions","organizations_url":"https://api.github.com/users/glue-viz/orgs","repos_url":"https://api.github.com/users/glue-viz/repos","events_url":"https://api.github.com/users/glue-viz/events{/privacy}","received_events_url":"https://api.github.com/users/glue-viz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/glue-viz/glue","description":"Linked Data Visualizations Across Multiple Files","fork":false,"url":"https://api.github.com/repos/glue-viz/glue","forks_url":"https://api.github.com/repos/glue-viz/glue/forks","keys_url":"https://api.github.com/repos/glue-viz/glue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glue-viz/glue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glue-viz/glue/teams","hooks_url":"https://api.github.com/repos/glue-viz/glue/hooks","issue_events_url":"https://api.github.com/repos/glue-viz/glue/issues/events{/number}","events_url":"https://api.github.com/repos/glue-viz/glue/events","assignees_url":"https://api.github.com/repos/glue-viz/glue/assignees{/user}","branches_url":"https://api.github.com/repos/glue-viz/glue/branches{/branch}","tags_url":"https://api.github.com/repos/glue-viz/glue/tags","blobs_url":"https://api.github.com/repos/glue-viz/glue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glue-viz/glue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glue-viz/glue/git/refs{/sha}","trees_url":"https://api.github.com/repos/glue-viz/glue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glue-viz/glue/statuses/{sha}","languages_url":"https://api.github.com/repos/glue-viz/glue/languages","stargazers_url":"https://api.github.com/repos/glue-viz/glue/stargazers","contributors_url":"https://api.github.com/repos/glue-viz/glue/contributors","subscribers_url":"https://api.github.com/repos/glue-viz/glue/subscribers","subscription_url":"https://api.github.com/repos/glue-viz/glue/subscription","commits_url":"https://api.github.com/repos/glue-viz/glue/commits{/sha}","git_commits_url":"https://api.github.com/repos/glue-viz/glue/git/commits{/sha}","comments_url":"https://api.github.com/repos/glue-viz/glue/comments{/number}","issue_comment_url":"https://api.github.com/repos/glue-viz/glue/issues/comments{/number}","contents_url":"https://api.github.com/repos/glue-viz/glue/contents/{+path}","compare_url":"https://api.github.com/repos/glue-viz/glue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glue-viz/glue/merges","archive_url":"https://api.github.com/repos/glue-viz/glue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glue-viz/glue/downloads","issues_url":"https://api.github.com/repos/glue-viz/glue/issues{/number}","pulls_url":"https://api.github.com/repos/glue-viz/glue/pulls{/number}","milestones_url":"https://api.github.com/repos/glue-viz/glue/milestones{/number}","notifications_url":"https://api.github.com/repos/glue-viz/glue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glue-viz/glue/labels{/name}","releases_url":"https://api.github.com/repos/glue-viz/glue/releases{/id}","created_at":"2011-05-18T20:58:54Z","updated_at":"2016-01-09T02:56:19Z","pushed_at":"2016-01-19T14:10:46Z","git_url":"git://github.com/glue-viz/glue.git","ssh_url":"git@github.com:glue-viz/glue.git","clone_url":"https://github.com/glue-viz/glue.git","svn_url":"https://github.com/glue-viz/glue","homepage":"","size":27571,"stargazers_count":190,"watchers_count":190,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":168,"forks":41,"open_issues":168,"watchers":190,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/glue-viz/glue/pulls/827"},"html":{"href":"https://github.com/glue-viz/glue/pull/827"},"issue":{"href":"https://api.github.com/repos/glue-viz/glue/issues/827"},"comments":{"href":"https://api.github.com/repos/glue-viz/glue/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/glue-viz/glue/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/glue-viz/glue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/glue-viz/glue/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/glue-viz/glue/statuses/95681fc5e59d1f8562e9d1da70162852a0cff856"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":797,"deletions":797,"changed_files":182}}