Skip to content

Commit

Permalink
Merge pull request #76 from panukatan/dev
Browse files Browse the repository at this point in the history
edit agriculture forecasts workflow
  • Loading branch information
ernestguevarra authored Sep 9, 2024
2 parents 466740a + f226296 commit 49857fb
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-targets-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
targets::tar_make(cyclone_reports_download_files)
targets::tar_make(dam_level_data_raw_csv)
targets::tar_make(forecasts_download_files)
targets::tar_make(forecasts_agriculture_download_files)
shell: Rscript {0}

- name: Create weekly data release
Expand Down
15 changes: 14 additions & 1 deletion R/pagasa_releases.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ paglaom_upload_weekly_release <- function(repo = "panukatan/paglaom",
zip_dam <- file.path(zipdir, "dam.zip")
zip_heat <- file.path(zipdir, "heat_index.zip")
zip_forecasts <- file.path(zipdir, "forecasts.zip")
zip_forecasts_agriculture <- file.path(zipdir, "forecasts_agriculture.zip")

## zip climate files ----
zip(
Expand Down Expand Up @@ -113,8 +114,20 @@ paglaom_upload_weekly_release <- function(repo = "panukatan/paglaom",
)
)

## zip agriculture forecasts files ----
zip(
zip_forecasts_agriculture,
files = list.files(
path = "data-raw/forecasts_agriculture",
full.names = TRUE, recursive = TRUE
)
)

lapply(
X = c(zip_climate, zip_cyclones, zip_dam, zip_heat, zip_forecasts),
X = c(
zip_climate, zip_cyclones, zip_dam, zip_heat, zip_forecasts,
zip_forecasts_agriculture
),
FUN = piggyback::pb_upload,
tag = tag
)
Expand Down
3 changes: 2 additions & 1 deletion _targets_forecasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ forecasts_download_targets <- tar_plan(
tar_target(
name = forecasts_agriculture_download_files,
command = forecasts_agriculture_download(),
format = "file"
format = "file",
cue = tar_cue("always")
)
)

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added data-raw/forecasts_agriculture/2024-09-09.pdf
Binary file not shown.

0 comments on commit 49857fb

Please sign in to comment.