-
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
Refactor pygmt.surface tests #1568
Conversation
@GenericMappingTools/pygmt-maintainers Are we waiting on the changes for preprocessed data as mentioned in this comment above? Or should we approve this after a decision is made on how to check the values in the returned array? If we are waiting on both changes, I suspect it won't be done by Friday. |
I can make both changes for v0.6.0. |
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 still see warnings in the log at https://github.com/GenericMappingTools/pygmt/runs/4109194553?check_suite_focus=true#step:11:624 😅:
___________________________ test_surface_input_file ____________________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: 1 unusable points were supplied; these will be ignored.
Warning: WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
Warning: WARNING]: Check that previous processing steps write results with enough decimals.
Warning: WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.
________________________ test_surface_input_data_array _________________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: 1 unusable points were supplied; these will be ignored.
Warning: WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
Warning: WARNING]: Check that previous processing steps write results with enough decimals.
Warning: WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.
____________________________ test_surface_input_xyz ____________________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: 1 unusable points were supplied; these will be ignored.
Warning: WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
Warning: WARNING]: Check that previous processing steps write results with enough decimals.
Warning: WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.
_______________________ test_surface_with_outgrid_param ________________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: 1 unusable points were supplied; these will be ignored.
Warning: WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
Warning: WARNING]: Check that previous processing steps write results with enough decimals.
Warning: WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.
__________________ test_surface_deprecate_outfile_to_outgrid ___________________
----------------------------- Captured stderr call -----------------------------
Warning: WARNING]: 1 unusable points were supplied; these will be ignored.
Warning: WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
Warning: WARNING]: Check that previous processing steps write results with enough decimals.
Warning: WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Yes this is the IEEE rounding problem because the data are not high precision, whereas the previous tests had warnings due to a lack of preprocessing. I suggest we just use |
I see. Or maybe we could play around with a different spacing (e.g. 1.5, 2, 2.5) and see if that works? |
If you think only reporting errors using |
I think your time is more valuable elsewhere, so let's just go with |
* Refactor surface tests to use preprocessed data and xarray testing Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Description of proposed changes
This PR captures the warnings from using short aliases in the surface test, in order to test that the warnings are generated properly and to reduce dilution of the useful information in the pytest reports.
Fixes #1460
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