Closed iamchrisearle closed 1 year ago
Thank you so much for your kindness and precious time. It worked out perfectly.
Agreed. Because we return on the first match in the loop in this function, the tuple here would essentially set a ranking of file preferences that the user still couldn't change in download_from_granules
@lmcindewar would it be preferable to download all files with any of the passed file extensions, instead of moving forward from the first match?
Agreed. Because we return on the first match in the loop in this function, the tuple here would essentially set a ranking of file preferences that the user still couldn't change in download_from_granules
@lmcindewar would it be preferable to download all files with any of the passed file extensions, instead of moving forward from the first match?
I think that might change the behavior of the function enough to cause issues, or at least download a lot of extra files. I do think the logic for choosing which link to download could use some improvement
Description
Whitelist additional file extension in granule handler. Allows for netcdf and h5 files to be downloaded in addition to hdf and xml. File extensions are validated on
get_url_from_ganule
method. We may want to do away with extension validation all together, but this expands product use without opening the system too wide without knowing potential consequences. This will deprecate the ParamType as a tuple is now used to check file extensions.Closes https://github.com/fraymio/modis-tools/issues/30 and https://github.com/fraymio/modis-tools/issues/8
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
following the repo example:
collections = collection_client.query(short_name="VNP03DNB", version="2")
These will fail on main with No matching link error.
Attempt again in this branch with the same changes above,
.nc
and.h5
files will download.Checklist:
Next Steps
[ ] Assign a reviewer based on the code owner document.
[ ] Once your review is approved, merge and delete the feature branch
On behalf of the Modis Tools Dev Team, thank you for your hard work! ✨