From 6e33aee8eb5aa30b86586b1a455f9ad7dd2166d7 Mon Sep 17 00:00:00 2001 From: Giorgio Basile Date: Wed, 1 Nov 2023 10:07:25 +0100 Subject: [PATCH] Handle earthaccess returning full file paths Relates #34 --- CHANGELOG.md | 2 ++ requirements.txt | 2 +- tests/test_tasks.py | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c20ff24..9907f00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Handle earthaccess returning full file paths on download since >=0.7.0 - [#35](https://github.com/giorgiobasile/prefect-earthdata/pull/35) + ### Security ## 0.1.3 diff --git a/requirements.txt b/requirements.txt index 40f8a7f..535e8a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ prefect>=2.0.0 -earthaccess +earthaccess>=0.7.0 diff --git a/tests/test_tasks.py b/tests/test_tasks.py index e9a0986..1a7084f 100644 --- a/tests/test_tasks.py +++ b/tests/test_tasks.py @@ -22,8 +22,12 @@ def test_flow(download_path): with TemporaryDirectory() as temp_dir: with prefect_test_harness(): + exp_files = [str(Path(temp_dir, "ATL08_20181105083647_05760107_005_01.h5"))] + granules, files = test_flow(temp_dir) assert isinstance(granules, list) assert len(granules) == 1 - assert files == ["ATL08_20181105083647_05760107_005_01.h5"] - assert Path(temp_dir, "ATL08_20181105083647_05760107_005_01.h5").exists() + + assert files == exp_files + for file in exp_files: + assert Path(file).exists()