-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix opening tiff and fits files #162
Conversation
I found that passing a local filepath with no |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #162 +/- ##
==========================================
+ Coverage 91.38% 92.43% +1.05%
==========================================
Files 20 20
Lines 1300 1521 +221
==========================================
+ Hits 1188 1406 +218
- Misses 112 115 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@network | ||
class TestReadFromURL: | ||
def test_read_from_url(self): | ||
examples = { | ||
"grib": "https://github.com/pydata/xarray-data/raw/master/era5-2mt-2019-03-uk.grib", | ||
"netcdf3": "https://github.com/pydata/xarray-data/raw/master/air_temperature.nc", | ||
"netcdf4": "https://github.com/pydata/xarray-data/raw/master/ROMS_example.nc", | ||
"hdf4": "https://github.com/corteva/rioxarray/raw/master/test/test_data/input/MOD09GA.A2008296.h14v17.006.2015181011753.hdf", | ||
@pytest.mark.parametrize( | ||
"filetype, url", | ||
[ |
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.
@scottyhq this has become a pretty powerful test!
pytest.param( | ||
"fits", | ||
"https://fits.gsfc.nasa.gov/samples/WFPC2u5780205r_c0fx.fits", | ||
marks=pytest.mark.skipif( | ||
not has_astropy, reason="package astropy is not available" | ||
), | ||
), |
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.
We could potentially do this same skipif
thing for dependencies required to read the other filetypes too.
@scottyhq this is the minimum needed for #160
docs/releases.rst
New functions/methods are listed inapi.rst
New functionality has documentation