From 8d5c7c387d8c2f8fce2ba2aa756224f369730ed2 Mon Sep 17 00:00:00 2001 From: rqthomas Date: Wed, 1 Nov 2023 15:40:48 -0400 Subject: [PATCH] fixing phenology --- .github/workflows/targets.yaml | 21 +++++++++++++++++++-- targets/phenology_targets.R | 6 ------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/targets.yaml b/.github/workflows/targets.yaml index 53b4d47b53..491a6e5299 100644 --- a/.github/workflows/targets.yaml +++ b/.github/workflows/targets.yaml @@ -9,7 +9,7 @@ on: name: target-generation jobs: - targets: + phenology: runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -24,4 +24,21 @@ jobs: - name: Generate targets shell: Rscript {0} run: | - source("targets/generate_daily_targets.R") + source("targets/phenology_targets") + + beetles: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_SUBMISSIONS }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_SUBMISSIONS }} + OSN_KEY: ${{ secrets.OSN_KEY }} + OSN_SECRET: ${{ secrets.OSN_SECRET }} + container: rocker/geospatial:latest + steps: + - uses: actions/checkout@v3 + + - name: Generate targets + shell: Rscript {0} + run: | + source("targets/beetles_targets") diff --git a/targets/phenology_targets.R b/targets/phenology_targets.R index 85a8e22dd2..b66b01151d 100644 --- a/targets/phenology_targets.R +++ b/targets/phenology_targets.R @@ -64,12 +64,6 @@ allData2 <- allData2 |> select("time", "site_id", "variable", "observation") |> rename(datetime = time) -readr::write_csv(allData2, "phenology-targets.csv.gz") - -aws.s3::put_object(file = "phenology-targets.csv.gz", - object = "phenology/phenology-targets.csv.gz", - bucket = "neon4cast-targets") - s3 <- arrow::s3_bucket("neon4cast-targets/phenology", endpoint_override = "data.ecoforecast.org", access_key = Sys.getenv("AWS_ACCESS_KEY_SUBMISSIONS"),