Removing the astroplan sites module (which migrated to astropy)#168
Merged
bmorris3 merged 1 commit intoastropy:masterfrom Jul 27, 2016
Merged
Removing the astroplan sites module (which migrated to astropy)#168bmorris3 merged 1 commit intoastropy:masterfrom
bmorris3 merged 1 commit intoastropy:masterfrom
Conversation
Contributor
Author
Member
|
I think it's OK if astroplan 0.2 will require astropy 1.2. |
Member
Contributor
|
It would be nice if |
Contributor
Author
|
@ejeschke – the method caches the observatory database on first access, then accesses the cache each time unless it's forced to re-download, see source here. The monkey patch was needed because the tests would have to access the remote database once in order to download the database. |
Merged
Contributor
Author
This was referenced Aug 19, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The astroplan
sitesmodule was added in #45, and then ported to astropy in astropy/astropy#4042. Since then, we've been meaning to remove the now redundant sites machinery from astroplan. In this PR, I removed the sites module and associated tests.In addition, I had to create a new monkey patch. Many of the tests for the
astroplan.Observerclass used the class methodastroplan.Observer.at_siteto efficiently resolve coordinates for an observatory with the original sites module. Since the original sites module had a local copy of the site database stored offline, the tests written withastroplan.Observer.at_sitewould function identically in tests with or without the--remote-dataflag. Now that we're usingEarthLocation.of_siteunder the hood which always accesses the internet, I had to monkey-patch theEarthLocation.of_sitemethod if the--remote-dataoption is not used, so that the tests can still resolve coordinates for the observatories in the tests without internet access.This closes #121 and #40.
cc @cdeil, my monkey-patch tutor.