Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main pr #79

Merged
merged 60 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b611aec
deleted unnecessary data and added a test data in place
kjsato Jun 5, 2024
93b1d3e
Merge pull request #40 from kjsato/main-v3-2
kjsato Jun 5, 2024
b98d4e2
modified how to set dir_path in the same manner of live set in ensemb…
kjsato Jun 5, 2024
b5f558c
added Print changed files section in after-validate-submission.yaml t…
kjsato Jun 5, 2024
0436312
fixed a systax error in after-validate-submission.yaml
kjsato Jun 5, 2024
32de21b
fixed a nested mapping in after-validate-submission.yaml
kjsato Jun 5, 2024
38bcd17
Revert "added a sample data"
kjsato Jun 5, 2024
697dd1b
Merge pull request #41 from kjsato/revert-40-main-v3-2
kjsato Jun 5, 2024
39d2fbe
changed to use kjroepke/[email protected] to get list of changed fi…
kjsato Jun 5, 2024
0c34c76
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 5, 2024
bc2d430
Revert "Revert "added a sample data""
kjsato Jun 5, 2024
5e32261
Merge pull request #42 from kjsato/revert-41-revert-40-main-v3-2
kjsato Jun 5, 2024
cd933f4
changed to use jitterbit/get-changed-files@v1 to get list of changed …
kjsato Jun 5, 2024
17fff20
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 5, 2024
0bfe4bf
delete a sample
kjsato Jun 5, 2024
89e5de1
Merge pull request #43 from kjsato/main-v3-2
kjsato Jun 5, 2024
93fcef2
modified to use dorny/paths-filter to get list of changed files in af…
kjsato Jun 5, 2024
1a3f39f
modified to use dorny/paths-filter@v3 to get list of changed files in…
kjsato Jun 5, 2024
0e4cc11
added a sample data
kjsato Jun 5, 2024
200def8
Merge pull request #44 from kjsato/main-v3-2
kjsato Jun 5, 2024
a49d330
modified to refer steps.changes.outputs.all_files to count changed fi…
kjsato Jun 5, 2024
2b8b536
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 5, 2024
df49993
Revert "Main v3 2"
kjsato Jun 5, 2024
d40fddd
fixed a val to steps.changes.outputs.all_files in after-validate-subm…
kjsato Jun 5, 2024
c476a75
Merge pull request #45 from kjsato/revert-44-main-v3-2
kjsato Jun 5, 2024
d98ff61
modified to the matching pattern as '**'when using paths-filter in af…
kjsato Jun 5, 2024
7682302
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 5, 2024
fe914fc
Revert "Revert "Main v3 2""
kjsato Jun 6, 2024
493924f
Merge pull request #46 from kjsato/revert-45-revert-44-main-v3-2
kjsato Jun 6, 2024
a6d341f
modified getting list of changed files to use tj-actions in after-val…
kjsato Jun 6, 2024
94c66ce
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 6, 2024
4a993a8
deleted a test parquet
kjsato Jun 6, 2024
4200482
Merge pull request #47 from kjsato/main-v3-2
kjsato Jun 6, 2024
1cecece
fixed with inserting the correct branch name in after-validate-submis…
kjsato Jun 6, 2024
ddd1136
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 6, 2024
af00f8b
added a sample
kjsato Jun 6, 2024
74431a7
Merge pull request #48 from kjsato/main-v3-2
kjsato Jun 6, 2024
3fa72ad
fixed if statement to use braces in after-validate-submission.yaml
kjsato Jun 6, 2024
e62435a
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 6, 2024
5ec97b7
Revert "added a sample"
kjsato Jun 6, 2024
86a6f61
Merge pull request #49 from kjsato/revert-48-main-v3-2
kjsato Jun 6, 2024
8278c8f
fixed if statement referring 'env.retro' in after-validate-submission…
kjsato Jun 6, 2024
006617f
Merge branch 'main' of github.com:kjsato/rsv-forecast-hub
kjsato Jun 6, 2024
791c45c
Revert "Revert "added a sample""
kjsato Jun 6, 2024
ee86bc2
Merge pull request #50 from kjsato/revert-49-revert-48-main-v3-2
kjsato Jun 6, 2024
3db6a7f
Upload new files to root repo
github-actions[bot] Jun 6, 2024
131a8ab
Download truth data file from RSV repo
github-actions[bot] Jun 7, 2024
372931b
test commit
kjsato Jun 12, 2024
711e017
Merge pull request #51 from kjsato/main-v3-3
kjsato Jun 12, 2024
cdfa288
Upload new files to root repo
github-actions[bot] Jun 12, 2024
d4ff07f
added two elements when creating a commit message in after-validate-s…
kjsato Jun 13, 2024
a7cf589
Merge pull request #52 from kjsato/main-v3-3
kjsato Jun 13, 2024
a46ca8f
Upload new files to RSV data repo by kjsato in #52
github-actions[bot] Jun 13, 2024
f0eb1fd
test commit
kjsato Jun 13, 2024
da004c0
Merge pull request #53 from kjsato/main-v3-3
kjsato Jun 13, 2024
9bbe387
Upload new files to RSV data repo by kjsato in #53
github-actions[bot] Jun 13, 2024
07bece7
deleted files for pr
kjsato Jun 15, 2024
86e10f6
modified for hopkinsidd
kjsato Jun 15, 2024
ebfa093
fix files
kjsato Jun 15, 2024
7140b95
Merge branch 'main' into main-pr
kjsato Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .github/workflows/after-validate-submission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ jobs:
with:
install-r: false
use-public-rspm: true
- name: Get list of changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Print changed files
run: |
echo 'Changed files: ${{ steps.changed-files.outputs.added_files }}'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Cache R packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -67,19 +75,32 @@ jobs:
Rscript -e 'remotes::install_github("Infectious-Disease-Modeling-Hubs/hubEnsembles")'
- name: Install hubData
run: |
Rscript -e 'remotes::install_github("Infectious-Disease-Modeling-Hubs/hubData")'
Rscript -e 'remotes::install_github("kjsato/hubData@feature/handle-samples", upgrade = "never")'
- name: Check if RETRO files are present
id: check_files
run: |
echo 'retro='$(echo '${{ steps.changed-files.outputs.added_files }}' | grep 'model-output' | grep -c '.*-RETRO.*\.\(csv\|parquet\)') >> $GITHUB_ENV
echo 'conventional='$(echo '${{ steps.changed-files.outputs.added_files }}' | grep -c -v '.*-RETRO.*\.\(csv\|parquet\)') >> $GITHUB_ENV
- name: Run R script
run: |
cd ./scripts
Rscript ensemble.R
if: ${{ env.conventional != '0' }}
- name: Run retro_ensemble.R
run: |
cd ./scripts
for file in $(echo '${{ steps.changed-files.outputs.added_files }}' | grep 'model-output' | grep '.*-RETRO.*\.\(csv\|parquet\)'); do
Rscript retro_ensemble.R $file
done
if: ${{ env.retro != '0' }}

- name: Commit and push new files to root repository
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain)" ]; then
git add model-output/hub-ensemble/*
git commit -m "Upload new files to root repo"
git commit -m "Upload new files to RSV data repo by ${GITHUB_ACTOR} in #${{ github.event.pull_request.number }}"
git push
echo "Data for hub-ensemble uploaded to root repo";
else
Expand All @@ -90,8 +111,8 @@ jobs:
- name: Checkout and push to another repository
uses: actions/checkout@v2
with:
#repository: kjsato/rsv-forecast-hub_data
repository: HopkinsIDD/rsv-forecast-hub_data
#repository: kjsato/rsv-forecast-hub_data
token: ${{ secrets.KJ3_PATC }}
path: ./rsv-forecast-hub_data
fetch-depth: 2
Expand All @@ -113,7 +134,7 @@ jobs:
git pull origin main
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Upload new files to RSV data repo"
git commit -m "Upload new files to RSV data repo by ${GITHUB_ACTOR} in #${{ github.event.pull_request.number }}"
git push
echo "RSV data uploaded";
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/ensemble.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dates_archive <- unlist(jsonlite::read_json(file.path(dir_path, "hub-config/task
dates_archive <- dates_archive[as.Date(dates_archive) <= Sys.Date()]

curr_origin_date <- as.Date(max(dates_archive, na.rm = TRUE))
#curr_origin_date <- as.Date("2024-03-17")
#curr_origin_date <- as.Date("2024-03-24")

## ----prep_ens, include=FALSE--------------------------------------------------

Expand Down
Loading
Loading