-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add load_earth_free_air_anomaly function for Earth free-air anomaly dataset #2238
Conversation
def test_earth_faa_fails(): | ||
""" | ||
Make sure earth_free_air_anomaly fails for invalid resolutions. | ||
""" | ||
resolutions = "1m 1d bla 60d 001m 03".split() | ||
resolutions.append(60) | ||
for resolution in resolutions: | ||
with pytest.raises(GMTInvalidInput): | ||
load_earth_free_air_anomaly(resolution=resolution) | ||
|
||
|
||
def test_earth_faa_incorrect_registration(): | ||
""" | ||
Test loading earth_free_air_anomaly with incorrect registration type. | ||
""" | ||
with pytest.raises(GMTInvalidInput): | ||
load_earth_free_air_anomaly(registration="improper_type") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests are common to all Earth datasets. Perhaps we can move all these tests in a new test file like test_datasets_load_remote_dataset.py
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done in a separate PR if necessary.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@willschlitzer This PR looks good to me, but need to resolve the conflicts before adding the "final review call" label. |
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
…ataset (GenericMappingTools#2238) * Add earth_free_air_anomaly.py * Add load_earth_free_air_anomaly to API index * Add tests and cache files for load_earth_free_air_anomaly Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
This adds
load_earth_free_air_anomaly
to load the IGPP Global Earth Free-Air Anomaly dataset.Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version