-
Notifications
You must be signed in to change notification settings - Fork 245
Remove the deprecated load_usgs_quakes function (deprecated since v0.6.0) #2306
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9cb1df4
replace "load_usgs_quakes" with "_load_usgs_quakes"
willschlitzer d6c4a08
add additional checks to test_usgs_quakes()
willschlitzer be61e69
Apply suggestions from code review
willschlitzer f85dcbd
Merge branch 'main' into deprecate-load_usgs_quakes
willschlitzer 91d390e
Merge branch 'main' into deprecate-load_usgs_quakes
willschlitzer 8897d64
Apply suggestions from code review
willschlitzer 0a01818
Update pygmt/datasets/samples.py
willschlitzer d079b5f
Merge branch 'main' into deprecate-load_usgs_quakes
willschlitzer 25457d6
remove old function from load_func_old
willschlitzer 2d034be
Merge branch 'main' into deprecate-load_usgs_quakes
willschlitzer 153c281
run make format
willschlitzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,5 +19,4 @@ | |
| load_ocean_ridge_points, | ||
| load_sample_bathymetry, | ||
| load_sample_data, | ||
| load_usgs_quakes, | ||
| ) | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,6 @@ def load_sample_data(name): | |
| "japan_quakes": load_japan_quakes, | ||
| "mars_shape": load_mars_shape, | ||
| "ocean_ridge_points": load_ocean_ridge_points, | ||
| "usgs_quakes": load_usgs_quakes, | ||
| } | ||
|
|
||
| # Dictionary of private load functions | ||
|
|
@@ -85,6 +84,7 @@ def load_sample_data(name): | |
| "earth_relief_holes": _load_earth_relief_holes, | ||
| "maunaloa_co2": _load_maunaloa_co2, | ||
| "notre_dame_topography": _load_notre_dame_topography, | ||
| "usgs_quakes": _load_usgs_quakes, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to remove |
||
| } | ||
|
|
||
| if name in load_func_old: | ||
|
|
@@ -215,36 +215,18 @@ def load_sample_bathymetry(**kwargs): | |
| return data | ||
|
|
||
|
|
||
| def load_usgs_quakes(**kwargs): | ||
| def _load_usgs_quakes(): | ||
| """ | ||
| (Deprecated) Load a table of global earthquakes from the USGS as a | ||
| pandas.DataFrame. | ||
|
|
||
| .. warning:: Deprecated since v0.6.0. This function has been replaced with | ||
| ``load_sample_data(name="usgs_quakes")`` and will be removed in | ||
| v0.9.0. | ||
| Load a table of global earthquakes from the USGS as a pandas.DataFrame. | ||
|
|
||
| This is the ``@usgs_quakes_22.txt`` dataset used in the GMT tutorials. | ||
|
willschlitzer marked this conversation as resolved.
Outdated
|
||
|
|
||
| The data are downloaded to a cache directory (usually ``~/.gmt/cache``) the | ||
| first time you invoke this function. Afterwards, it will load the data from | ||
| the cache. So you'll need an internet connection the first time around. | ||
|
|
||
| Returns | ||
| ------- | ||
| data : pandas.DataFrame | ||
| The data table. Use ``print(data.describe())`` to see the available | ||
| columns. | ||
| """ | ||
|
|
||
| if "suppress_warning" not in kwargs: | ||
| warnings.warn( | ||
| "This function has been deprecated since v0.6.0 and will be " | ||
| "removed in v0.9.0. Please use " | ||
| "load_sample_data(name='usgs_quakes') instead.", | ||
| category=FutureWarning, | ||
| stacklevel=2, | ||
| ) | ||
| fname = which("@usgs_quakes_22.txt", download="c") | ||
| data = pd.read_csv(fname) | ||
| return data | ||
|
willschlitzer marked this conversation as resolved.
Outdated
|
||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.