From e3ea9e493adbd67809db7c508103ca5e7768f7ab Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Mon, 1 Jul 2024 15:46:04 -0400 Subject: [PATCH] Update latest filename --- pace_update.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pace_update.py b/pace_update.py index 6fb6247..4a2cac4 100644 --- a/pace_update.py +++ b/pace_update.py @@ -26,9 +26,10 @@ mean_array = array.mean(dim="date") filename = f"chla/chla_{date}.tif" +latest = "chla/latest.tif" hypercoast.pace_chla_to_image(mean_array, filename) -shutil.copy(filename, "chla/chla_latest.tif") +shutil.copy(filename, latest) print(f"Updated chla image: {filename}") username = "opengeos" @@ -36,6 +37,4 @@ tag_name = "chla" release_id = leafmap.github_get_release_id_by_tag(username, repository, tag_name) leafmap.github_upload_asset_to_release(username, repository, release_id, filename) -leafmap.github_upload_asset_to_release( - username, repository, release_id, "chla/chla_latest.tif" -) +leafmap.github_upload_asset_to_release(username, repository, release_id, latest)