-
Notifications
You must be signed in to change notification settings - Fork 224
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
Remove the deprecated load_japan_quakes function (deprecated since v0.6.0) #2301
Conversation
return pd.read_csv( | ||
fname, | ||
header=1, | ||
delim_whitespace=True, | ||
names=[ | ||
"year", | ||
"month", | ||
"day", | ||
"latitude", | ||
"longitude", | ||
"depth_km", | ||
"magnitude", | ||
], | ||
) |
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.
FYI, I also made two changes when reading the dataset:
- Use
delim_whitespace=True
instead ofsep=r"\s+"
. They're the same but I thinkdelim_whitespace=True
is easier to understand (just my own preference). - Use the
names
parameter in theread_csv
function, instead of changing the columns later.
@@ -29,9 +28,7 @@ def test_japan_quakes(): | |||
""" | |||
Check that the dataset loads without errors. | |||
""" | |||
with pytest.warns(expected_warning=FutureWarning) as record: |
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.
It looks like test_japan_quakes
and test_load_sample_data
are the same. Should one of them be removed?
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.
You're right. I removed in a35adc6.
Data is from the NOAA NGDC database. This is the ``@tut_quakes.ngdc`` | ||
dataset used in the GMT tutorials. |
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.
Maybe we should keep this background information of the data?
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. | ||
Load a table of earthquakes around Japan as a pandas.DataFrame. |
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.
Load a table of earthquakes around Japan as a pandas.DataFrame. | |
Load a table of earthquakes around Japan as a pandas.DataFrame. | |
Data is from the NOAA NGDC database. This is the "@tut_quakes.ngdc" | |
dataset used in the GMT tutorials. |
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.
@yvonnefroehlich Thanks for your comments.
Data is from the NOAA NGDC database.
I've added this sentence back in 92bcec3.
This is the "@tut_quakes.ngdc" dataset used in the GMT tutorials.
I don't think this sentence would provide any meaningful information. The file name is easy to get from the function and we all know that these dataset are used in the tutorials.
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.
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.
Let's discuss it in this PR and then update other PRs if necessary.
@michaelgrund and @willschlitzer what do you think?
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.
I'm with @seisman since this information is not really required at this point in my opinion.
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.
OK, then we can merge this PR.
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Description of proposed changes
Fixes #
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