Skip to content

Commit

Permalink
Handle earthaccess returning full file paths
Browse files Browse the repository at this point in the history
Relates #34
  • Loading branch information
giorgiobasile committed Nov 1, 2023
1 parent 90de0e2 commit 57c1419
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
prefect>=2.0.0
earthaccess
earthaccess>=0.7.0
8 changes: 6 additions & 2 deletions tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 files:
assert Path(file).exists()

0 comments on commit 57c1419

Please sign in to comment.