{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4042","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4042/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4042/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4042/events","html_url":"https://github.com/astropy/astropy/pull/4042","id":99141536,"number":4042,"title":"Add get_site function and associated registry","user":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/coordinates","name":"coordinates","color":"c7def8"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Enhancement","name":"Enhancement","color":"fad8c7"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Ready-for-final-review","name":"Ready-for-final-review","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/20","html_url":"https://github.com/astropy/astropy/milestones/v1.1.0","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/20/labels","id":907426,"number":20,"title":"v1.1.0","description":"","creator":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":147,"state":"open","created_at":"2014-12-17T20:05:23Z","updated_at":"2015-10-01T16:44:23Z","due_on":"2015-07-23T04:00:00Z","closed_at":null},"comments":8,"created_at":"2015-08-05T07:25:01Z","updated_at":"2015-10-01T22:32:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4042","html_url":"https://github.com/astropy/astropy/pull/4042","diff_url":"https://github.com/astropy/astropy/pull/4042.diff","patch_url":"https://github.com/astropy/astropy/pull/4042.patch"},"body":"This is essentially a port of @bmorris3's work in astroplanners/astroplan#45 over to astropy.  The key element is that it adds a `get_site` function that returns an `EarthLocation` taken from a list of named observatories.\r\n\r\nThe actual data store is a JSON file populated from the IRAF obsdb file.  This is probably quite out of date, but is a good starting point as it's something many astronomers got use to having from the IRAF era.\r\n\r\nI'd say this closes #3813, at least as an initial implementation - more is discussed there in terms of querying remote sources, but I think that is an \"extra\" layer that could be added on top of this.\r\n\r\ncc @astrofrog @mhvk @bsipocz @cdeil as participants in #3813 \r\n"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/144866984","html_url":"https://github.com/astropy/astropy/pull/4042#issuecomment-144866984","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4042","id":144866984,"user":{"login":"eteq","id":346587,"avatar_url":"https://avatars.githubusercontent.com/u/346587?v=3","gravatar_id":"","url":"https://api.github.com/users/eteq","html_url":"https://github.com/eteq","followers_url":"https://api.github.com/users/eteq/followers","following_url":"https://api.github.com/users/eteq/following{/other_user}","gists_url":"https://api.github.com/users/eteq/gists{/gist_id}","starred_url":"https://api.github.com/users/eteq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eteq/subscriptions","organizations_url":"https://api.github.com/users/eteq/orgs","repos_url":"https://api.github.com/users/eteq/repos","events_url":"https://api.github.com/users/eteq/events{/privacy}","received_events_url":"https://api.github.com/users/eteq/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T22:32:51Z","updated_at":"2015-10-01T22:32:51Z","body":"OK, I think I've addressed all of the comments above, but inspired by @embray's comment, I did I refactoring to use a `SiteRegistry` class instead of the previous functions that depended on global state. \r\n\r\nNone of that refactoring is in the public API right now, but the idea is that if we want to actually make this more visible/fully featured in astropy v1.2 we can do so then. I'm thinking the best way to move on that is to have astroplan be the guinea pig for that (cc @bmorris3), and then we see based on that whether to make it truly public."}}