-
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
Use a static grid, asymmetric region, and xarray.testing for raster tests #1684
Comments
Thanks @willschlitzer for getting started on these tests! As @weiji14 mentioned in #593 (comment), we may want to work to address the likely failures due to upcoming
Processing/plotting tests using
|
These are the tests that can be expected to fail after the
|
I think this is a good idea. Having a standardized grid should make it easier to write tests, and will save us time in the future. If nothing else, we should move grids to be over-land, as I assume land data is less likely to change instead of ocean data. |
@meghanrjones Should we work to change the |
I think it would be better to update the region at the same as migrating to a locally defined xarray.DataArray to reduce reviewer work. If we chose to use a function that creates a DataArray rather than the remote files, we do not need to wait for the earth_relief update since we can create the grid based on the contents of SRTM15+V2.1. |
Are we planning on using preset DataArrays rather than grids from |
I quite like @meghanrjones's idea at #1684 (comment) to have a There are some unit tests that run on an actual file (e.g. in test_grdimage.py) rather than an |
We could also use @tut_bathy.nc for some tests rather than @earth_relief_01d. It's a bit smaller (11 KB versus 114 KB) and wouldn't require a new cache file.
|
This still seems like it covers a pretty big area/has a lot of data; wouldn't it speed up our plotting tests more to cache a smaller grid file (something like 10 x10 degree squadre at 30 minute resolution)? |
Ok, how about we make a |
That works for me. |
I started working on this but it turns out that it's super annoying to create a static DataArray based on a grid with a 0.0833333333333 grid spacing because of the checks in place for irregular grids. Based on this trial, I would prefer to go back to @weiji14's suggestion to add a small file to the cache based on @earth_relief_01d_p V2.3. I could submit a PR to add a file based on
|
@meghanrjones This works for me! Once you submit that file to the cache I'll update the pull requests to not use a DataArray and instead used that cached grid file. |
@willschlitzer is adding some inline examples in module docstrings (addressing #1686) which access the latest earth relief data by calling the |
Should I not be using |
@meghanrjones Now that we have a standard file (which I'm assumed is called with |
We can use |
FYI I updated the checklist at the start of the issue to include all tests that currently use |
Why wouldn't we use |
The other modules have unit tests in the corresponding |
I'm trying to rewrite the tests for |
Should we rewrite the |
It may be possible to use |
This issue was originally for discussing improvements to the PyGMT test suite and is now dedicated to tracking specific improvements:
static_earth_relief
rather thanearth_relief
If anyone wants to help, please edit this comment to add your username next to the module or post a comment below to avoid redundant work.
The text was updated successfully, but these errors were encountered: