From 8f24a9308a57877d0b650d85edd6804706b4d1a8 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:06:51 -0400 Subject: [PATCH 01/15] bump actions/checkout version to use new node --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/s3_upload_ec2.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c6d21a8..2dbcbf7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Pull Image Data run: make pull_data - name: Login to GitHub Container Registry diff --git a/.github/workflows/s3_upload_ec2.yml b/.github/workflows/s3_upload_ec2.yml index b17ad1f..379b9ff 100644 --- a/.github/workflows/s3_upload_ec2.yml +++ b/.github/workflows/s3_upload_ec2.yml @@ -25,7 +25,7 @@ jobs: run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Test AWS cli installation run: aws --version From 6358f442ffa5aca00bb3be5c8162ec129dddaf0b Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:09:08 -0400 Subject: [PATCH 02/15] bump pipeline aws config and login actions version to use new node --- .github/workflows/s3_upload_ec2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/s3_upload_ec2.yml b/.github/workflows/s3_upload_ec2.yml index 379b9ff..2489886 100644 --- a/.github/workflows/s3_upload_ec2.yml +++ b/.github/workflows/s3_upload_ec2.yml @@ -31,14 +31,14 @@ jobs: run: aws --version - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} aws-region: ${{ env.AWS_REGION_NAME }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: cmu-delphi-deploy-machine From 06b6ff4672754d4da829798be4f474aa10a8e453 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:15:40 -0400 Subject: [PATCH 03/15] bump CI login action version to use new node --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2dbcbf7..1221f0e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: - name: Pull Image Data run: make pull_data - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: cmu-delphi-deploy-machine From cc8a27de1112e03381388112b0cb49344ae57bc6 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:18:48 -0400 Subject: [PATCH 04/15] bump create_release PR action version --- .github/workflows/create_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 30242bf..f8ebd59 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -30,7 +30,7 @@ jobs: echo -n "::set-output name=next_tag::" bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",, - name: Create pull request into main - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: branch: release/${{ steps.version.outputs.next_tag }} commit-message: "chore: release ${{ steps.version.outputs.next_tag }}" From 463e373f906cc89b641666638eec325979dadeb0 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 3 Jul 2023 10:35:51 -0400 Subject: [PATCH 05/15] put tag, repo, and version vars into env files for ci.yaml --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1221f0e..ed57083 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,8 +48,8 @@ jobs: if [ "$imageTag" = "main" ] ; then imageTag="latest" fi - echo "::set-output name=tag::$imageTag" - echo "::set-output name=repo::ghcr.io/${{ github.repository }}" + echo "tag=$imageTag" >> "$GITHUB_OUTPUT" + echo "repo=ghcr.io/${{ github.repository }}" >> "$GITHUB_OUTPUT" - name: Push Dev Tag run: | docker tag repo ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }} @@ -64,8 +64,8 @@ jobs: id: extract_version run: | python -m pip install bump2version - echo -n "::set-output name=version::" - bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",, + currentVersion=`bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,` + echo "version=$currentVersion" >> "$GITHUB_OUTPUT" - name: Trigger Webhook run: | # trigger a webhook update From 39ea25d7067fbf7c22e84fb0d89b0d4c5550339d Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:00:50 -0400 Subject: [PATCH 06/15] put tag var into env file for create_release.yaml --- .github/workflows/create_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index f8ebd59..0bfb9ea 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -27,8 +27,8 @@ jobs: id: version run: | python -m pip install bump2version - echo -n "::set-output name=next_tag::" - bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",, + newVersion=`bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,` + echo "next_tag=$newVersion" >> "$GITHUB_OUTPUT" - name: Create pull request into main uses: peter-evans/create-pull-request@v4 with: From 37e6911f3b92dc7e67a36a57dd22f8afd83756e8 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:02:30 -0400 Subject: [PATCH 07/15] put version var into env file for release_main.yaml --- .github/workflows/release_main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_main.yml b/.github/workflows/release_main.yml index 0e7fa71..af0426e 100644 --- a/.github/workflows/release_main.yml +++ b/.github/workflows/release_main.yml @@ -29,8 +29,8 @@ jobs: id: extract_version run: | python -m pip install bump2version - echo -n "::set-output name=version::" - bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",, + currentVersion=`bump2version --dry-run --list patch | grep ^current_version | sed -r s,"^.*=",,` + echo "version=$currentVersion" >> "$GITHUB_OUTPUT" - name: Create Release id: create_release uses: release-drafter/release-drafter@v5 From af5a97f4b8e197ecacf6efbd6b037e2b215cf74d Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:57:01 -0400 Subject: [PATCH 08/15] drop forecasters that don't exist --- Report/create_reports.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Report/create_reports.R b/Report/create_reports.R index ebd3ad4..883c18e 100644 --- a/Report/create_reports.R +++ b/Report/create_reports.R @@ -32,12 +32,10 @@ options(warn = 1) # Requested forecasters that do not get included in final scores: # Auquan-SEIR: Only predicts cumulative deaths -# CDDEP-ABM: No longer on Forecast Hub. Causes some warnings when trying to download. # CDDEP-SEIR_MCMC: County-level predictions only # CUBoulder-COVIDLSTM: County-level predictions only # FAIR-NRAR: County-level predictions only # HKUST-DNN: Only predicts cumulative deaths -# ISUandPKU-vSEIdR: Folder but no forecasts on Forecast Hub # PandemicCentral-COVIDForest: County-level predictions only # UT_GISAG-SPDM: County-level predictions only # WalmartLabsML-LogForecasting: Only predicts cumulative deaths @@ -45,7 +43,13 @@ options(warn = 1) forecasters <- unique(c( get_covidhub_forecaster_names(designations = c("primary", "secondary")), "COVIDhub-baseline", "COVIDhub-trained_ensemble", "COVIDhub-4_week_ensemble" -)) +)) %>% + # Drop a couple invalid forecasters + setdiff(c( + "CDDEP-ABM", # No longer on Forecast Hub. Causes some warnings when trying to download. + "ISUandPKU-vSEIdR" # Folder but no forecasts on Forecast Hub + )) + locations <- covidHubUtils::hub_locations # also includes "us", which is national level data From 6b9a20f8d61877202bbfd043ca77a3e89164c952 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:54:18 -0400 Subject: [PATCH 09/15] drop forecasters that don't qualify for inclusion --- Report/create_reports.R | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Report/create_reports.R b/Report/create_reports.R index 883c18e..33a3429 100644 --- a/Report/create_reports.R +++ b/Report/create_reports.R @@ -30,24 +30,27 @@ prediction_cards_filepath <- case_when( options(warn = 1) -# Requested forecasters that do not get included in final scores: -# Auquan-SEIR: Only predicts cumulative deaths -# CDDEP-SEIR_MCMC: County-level predictions only -# CUBoulder-COVIDLSTM: County-level predictions only -# FAIR-NRAR: County-level predictions only -# HKUST-DNN: Only predicts cumulative deaths -# PandemicCentral-COVIDForest: County-level predictions only -# UT_GISAG-SPDM: County-level predictions only -# WalmartLabsML-LogForecasting: Only predicts cumulative deaths -# Yu_Group-CLEP: County-level predictions only forecasters <- unique(c( get_covidhub_forecaster_names(designations = c("primary", "secondary")), "COVIDhub-baseline", "COVIDhub-trained_ensemble", "COVIDhub-4_week_ensemble" )) %>% - # Drop a couple invalid forecasters + # Drop invalid forecasters setdiff(c( + # Forecasters that have no data on Forecast Hub "CDDEP-ABM", # No longer on Forecast Hub. Causes some warnings when trying to download. - "ISUandPKU-vSEIdR" # Folder but no forecasts on Forecast Hub + "ISUandPKU-vSEIdR", # Folder but no forecasts on Forecast Hub + + # Forecasters that don't qualify for inclusion in the dashboard (wrong geo + # level, wrong target variable) + "Auquan-SEIR", # Only predicts cumulative deaths + "CDDEP-SEIR_MCMC", # County-level predictions only + "CUBoulder-COVIDLSTM", # County-level predictions only + "FAIR-NRAR", # County-level predictions only + "HKUST-DNN", # Only predicts cumulative deaths + "PandemicCentral-COVIDForest", # County-level predictions only + "UT_GISAG-SPDM", # County-level predictions only + "WalmartLabsML-LogForecasting", # Only predicts cumulative deaths + "Yu_Group-CLEP" # County-level predictions only )) locations <- covidHubUtils::hub_locations From ae8d904c4fc7e89a73d3a3178f8b246df5f380da Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Mon, 10 Jul 2023 19:11:26 -0400 Subject: [PATCH 10/15] styler --- Report/create_reports.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Report/create_reports.R b/Report/create_reports.R index 33a3429..2999b2f 100644 --- a/Report/create_reports.R +++ b/Report/create_reports.R @@ -39,7 +39,7 @@ forecasters <- unique(c( # Forecasters that have no data on Forecast Hub "CDDEP-ABM", # No longer on Forecast Hub. Causes some warnings when trying to download. "ISUandPKU-vSEIdR", # Folder but no forecasts on Forecast Hub - + # Forecasters that don't qualify for inclusion in the dashboard (wrong geo # level, wrong target variable) "Auquan-SEIR", # Only predicts cumulative deaths From 60fd30d7325a79ea6eb7ed964290b7c4f3af1b52 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Tue, 11 Jul 2023 10:57:18 -0400 Subject: [PATCH 11/15] pass GITHUB_PAT from workflow to docker --- .github/workflows/s3_upload_ec2.yml | 2 ++ Makefile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/s3_upload_ec2.yml b/.github/workflows/s3_upload_ec2.yml index b17ad1f..04be69d 100644 --- a/.github/workflows/s3_upload_ec2.yml +++ b/.github/workflows/s3_upload_ec2.yml @@ -45,6 +45,8 @@ jobs: password: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }} - name: Deploy score files to S3 bucket + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} run: | make deploy diff --git a/Makefile b/Makefile index ef9469a..c8ecb69 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ PWD=$(shell pwd) .DEFAULT_GOAL:=build S3_URL=https://forecast-eval.s3.us-east-2.amazonaws.com S3_BUCKET=s3://forecast-eval +# If not already set in calling environment, set PAT to an empty value. +GITHUB_PAT?= # Change `imageTag` during `make` call via `make imageTag=` # @@ -46,6 +48,7 @@ score_forecast: r_build dist pull_data -v ${PWD}/Report:/var/forecast-eval \ -v ${PWD}/dist:/var/dist \ -w /var/forecast-eval \ + -e GITHUB_PAT \ forecast-eval-build \ Rscript create_reports.R --dir /var/dist From d205b0983e924ec8fec76784cf0a91310ae5ece9 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Wed, 12 Jul 2023 18:13:24 -0400 Subject: [PATCH 12/15] bump setup-python action version to use new node --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ed57083..3fb5bd5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: docker push ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }} - name: Set up Python 3.8 if: startsWith(github.ref, 'refs/heads/main') - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.8 - name: Extract version From 9ac6d15ae89e6c8b000e416580b2a0d0813e2b4f Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Wed, 12 Jul 2023 18:42:56 -0400 Subject: [PATCH 13/15] bump setup-python action version to use new node in release process --- .github/workflows/create_release.yml | 2 +- .github/workflows/release_main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 0bfb9ea..273f56a 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -20,7 +20,7 @@ jobs: git fetch origin dev:dev git reset --hard dev - name: Set up Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@4 with: python-version: 3.8 - name: Change version number diff --git a/.github/workflows/release_main.yml b/.github/workflows/release_main.yml index af0426e..a820a22 100644 --- a/.github/workflows/release_main.yml +++ b/.github/workflows/release_main.yml @@ -22,7 +22,7 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.8 - name: Extract version From 32820fab0f48c6a2626d4bb254da51c8291a21e8 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Thu, 13 Jul 2023 09:55:57 -0400 Subject: [PATCH 14/15] add v back to python action version tag --- .github/workflows/create_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 273f56a..a4fa874 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -20,7 +20,7 @@ jobs: git fetch origin dev:dev git reset --hard dev - name: Set up Python 3.8 - uses: actions/setup-python@4 + uses: actions/setup-python@v4 with: python-version: 3.8 - name: Change version number From 882f63f3a7147ed6cb961b2f818f5534bd9939cf Mon Sep 17 00:00:00 2001 From: nmdefries Date: Thu, 13 Jul 2023 14:23:56 +0000 Subject: [PATCH 15/15] chore: release 7.3.0 --- .bumpversion.cfg | 2 +- DESCRIPTION | 2 +- app/global.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6e0e6cc..6e54861 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 7.2.0 +current_version = 7.3.0 commit = False tag = False diff --git a/DESCRIPTION b/DESCRIPTION index ac917bb..05456dc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: forecasteval Title: Forecast Evaluation Dashboard -Version: 7.2.0 +Version: 7.3.0 Authors@R: c(person("Kate", "Harwood", role = "aut"), person("Chris", "Scott", role = "ctb"), person("Jed", "Grabman", role = "ctb"), diff --git a/app/global.R b/app/global.R index 1cec713..76c7acc 100644 --- a/app/global.R +++ b/app/global.R @@ -10,7 +10,7 @@ library(tsibble) library(covidcast) library(data.table) -appVersion <- "7.2.0" +appVersion <- "7.3.0" COVERAGE_INTERVALS <- c("10", "20", "30", "40", "50", "60", "70", "80", "90", "95", "98") CASES_DEATHS_TARGET_DAY <- "Saturday"