Skip to content

Commit

Permalink
Update latest filename
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jul 1, 2024
1 parent f8556c1 commit e3ea9e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pace_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@
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"
repository = "pace-data"
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)

0 comments on commit e3ea9e4

Please sign in to comment.