You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, earthaccess.download(results, access='external')returns the local_filename. For workflows in which files are downloaded to a local machine and then some analysis performed on them, it would be useful if the full path to those files were returned. This would allow the files to be processed directly using the returned paths without having to glob the download path. For example:
DOWNLOAD_PATH = Path.cwd() / "smap_data"
DOWNLOAD_PATH.mkdir(parents=True, exist_ok=True) # creates parents if they don't exist and fails silently if path exists
smap_files = earthaccess.download(results, DOWNLOAD_PATH)
Then...
for f in smap_files:
do_something_with(f)
I'm also wondering if it makes sense to return a list of pathlib.Path objects rather than a string.
The text was updated successfully, but these errors were encountered:
Thanks @andypbarrett. I'm closing this issue as #317 updated earthaccess.download(...) to return the full local path (I ran into the same issue as you and thought the full path would be nicer) and #319 should cover the remaining pathlib.Path portion of this issue. Though let me know if I'm missing something and we can always re-open
Currently,
earthaccess.download(results, access='external')
returns thelocal_filename
. For workflows in which files are downloaded to a local machine and then some analysis performed on them, it would be useful if the full path to those files were returned. This would allow the files to be processed directly using the returned paths without having to glob the download path. For example:Then...
I'm also wondering if it makes sense to return a list of
pathlib.Path
objects rather than a string.The text was updated successfully, but these errors were encountered: