Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-bdc committed Feb 21, 2023
2 parents fb0da89 + a0a2040 commit 047e235
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/ewoc_dag/s2_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ def get_s2_product(
ValueError: if the source is not supported
"""

date_acq=prd_id.split('_')[2][:8]
date_end=prd_id.split('_')[-1][:8]
if date_acq!=date_end:
prd_id=prd_id.replace(date_acq, date_end)

if source is None:
s2_provider = get_s2_default_provider()
else:
Expand Down Expand Up @@ -130,9 +135,9 @@ def get_s2_product(

_L1C_PRD_ID = "S2B_MSIL1C_20210714T235249_N0301_R130_T57KUR_20210715T005654.SAFE"
_L2A_PRD_ID = "S2B_MSIL2A_20210714T131719_N0301_R124_T28WDB_20210714T160455.SAFE"
get_s2_product(_L1C_PRD_ID, source="eodag")
#get_s2_product(_L1C_PRD_ID, source="eodag")
# get_s2_product(_L1C_PRD_ID, source="aws")
# get_s2_product(_L2A_PRD_ID, source="aws")
get_s2_product(_L2A_PRD_ID, source="aws")
# get_s2_product(_L2A_PRD_ID, source="aws", l2_mask_only=True)
# get_s2_product(_L2A_PRD_ID, source="aws", aws_l2a_cogs=True)
# get_s2_product(_L2A_PRD_ID, source="aws", aws_l2a_cogs=True, l2_mask_only=True)
5 changes: 0 additions & 5 deletions tests/test_bucket_ewoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ def test_ewoc_aux_data(self):
self.assertTrue((out_dirpath / "N53E031.hgt").exists())
self.assertTrue((out_dirpath / "N53E032.hgt").exists())

# TODO Need to fix the following lines to avoid to use private attribute
with self.assertRaises(ValueError):
ewoc_auxdata_bucket.agera5_to_satio_csv()

ewoc_auxdata_bucket._bucket_name = "ewoc-agera5-yearly"
ewoc_auxdata_bucket.agera5_to_satio_csv()
self.assertTrue((out_dirpath / "satio_agera5.csv").exists())
ewoc_auxdata_bucket.close()
Expand Down

0 comments on commit 047e235

Please sign in to comment.