1
+ .PHONY : all test test-forecasters run sync download upload dashboard
2
+
1
3
current_date: =$(shell date +% F)
2
4
3
5
install :
4
6
Rscript -e " install.packages(c('renv', 'pak', 'rspm')); renv::restore()"
5
7
6
- .PHONY : all test test-forecasters run run-nohup sync download upload dashboard
7
-
8
8
test :
9
9
Rscript -e " testthat::test_dir('tests/testthat')"
10
10
11
11
run :
12
12
Rscript scripts/run.R
13
13
14
- run-nohup :
15
- nohup Rscript scripts/run.R &
16
-
17
- run-nohup-restarting :
18
- scripts/hardRestarting.sh &
19
-
20
14
prod-covid :
21
15
export TAR_RUN_PROJECT=covid_hosp_prod; Rscript scripts/run.R
22
16
@@ -25,6 +19,14 @@ prod-flu:
25
19
26
20
prod : prod-covid prod-flu update-site netlify
27
21
22
+ prod-covid-backtest :
23
+ export BACKTEST_MODE=TRUE; export TAR_RUN_PROJECT=covid_hosp_prod; Rscript scripts/run.R
24
+
25
+ prod-flu-backtest :
26
+ export BACKTEST_MODE=TRUE; export TAR_RUN_PROJECT=flu_hosp_prod; Rscript scripts/run.R
27
+
28
+ prod-backtest : prod-covid-backtest prod-flu-backtest
29
+
28
30
explore-covid :
29
31
export TAR_RUN_PROJECT=covid_hosp_explore; Rscript scripts/run.R
30
32
@@ -33,6 +35,20 @@ explore-flu:
33
35
34
36
explore : explore-covid explore-flu update-site netlify
35
37
38
+ prune : prune-covid-prod prune-flu-prod prune-covid-explore prune-flu-explore
39
+
40
+ prune-covid-prod :
41
+ export TAR_PROJECT=covid_hosp_prod; export BACKTEST_MODE=TRUE; Rscript -e " targets::tar_prune()"
42
+
43
+ prune-flu-prod :
44
+ export TAR_PROJECT=flu_hosp_prod; export BACKTEST_MODE=TRUE; Rscript -e " targets::tar_prune()"
45
+
46
+ prune-covid-explore :
47
+ export TAR_PROJECT=covid_hosp_explore; Rscript -e " targets::tar_prune()"
48
+
49
+ prune-flu-explore :
50
+ export TAR_PROJECT=flu_hosp_explore; Rscript -e " targets::tar_prune()"
51
+
36
52
commit-covid :
37
53
cd ../covid19-forecast-hub; \
38
54
git pull --rebase --autostash origin main; \
@@ -50,15 +66,19 @@ commit-flu:
50
66
git push --force delphi main
51
67
52
68
submit-covid : commit-covid
53
- gh pr create --title " CMU-TimeSeries $( current_date) " --repo cdcgov/covid19-forecast-hub
69
+ cd ../covid19-forecast-hub; \
70
+ gh pr create --title " CMU-TimeSeries $( current_date) " --repo CDCgov/covid19-forecast-hub
54
71
55
72
submit-flu : commit-flu
73
+ cd ../FluSight-forecast-hub; \
56
74
gh pr create --title " CMU-TimeSeries $( current_date) " --repo cdcepi/FluSight-forecast-hub
57
75
58
76
submit-covid-dry : commit-covid
59
- gh pr create --title " CMU-TimeSeries $( current_date) " --repo cdcgov/covid19-forecast-hub --dry-run
77
+ cd ../covid19-forecast-hub; \
78
+ gh pr create --title " CMU-TimeSeries $( current_date) " --repo CDCgov/covid19-forecast-hub --dry-run
60
79
61
80
submit-flu-dry : commit-flu
81
+ cd ../FluSight-forecast-hub; \
62
82
gh pr create --title " CMU-TimeSeries $( current_date) " --repo cdcepi/FluSight-forecast-hub --dry-run
63
83
64
84
submit : submit-covid submit-flu
@@ -71,23 +91,49 @@ get-nwss:
71
91
python nwss_covid_export.py; \
72
92
python nwss_influenza_export.py
73
93
74
- sync :
75
- Rscript -e " source('R/sync_aws.R'); sync_aws()"
94
+ pull-aux-data :
95
+ aws s3 sync s3://forecasting-team-data/2024/aux_data/ aux_data/ --delete
96
+
97
+ pull-covid-prod :
98
+ aws s3 sync s3://forecasting-team-data/2024/covid_hosp_prod/ covid_hosp_prod/ --delete
99
+
100
+ pull-flu-prod :
101
+ aws s3 sync s3://forecasting-team-data/2024/flu_hosp_prod/ flu_hosp_prod/ --delete
102
+
103
+ pull-covid-explore :
104
+ aws s3 sync s3://forecasting-team-data/2024/covid_hosp_explore/ covid_hosp_explore/ --delete
105
+
106
+ pull-flu-explore :
107
+ aws s3 sync s3://forecasting-team-data/2024/flu_hosp_explore/ flu_hosp_explore/ --delete
108
+
109
+ pull : pull-aux-data pull-covid-prod pull-flu-prod pull-covid-explore pull-flu-explore
76
110
77
- pull :
78
- Rscript -e " source('R/sync_aws.R'); sync_aws(direction = 'download')"
111
+ download : pull
79
112
80
- download :pull
113
+ push-covid-prod :
114
+ aws s3 sync covid_hosp_prod/ s3://forecasting-team-data/2024/covid_hosp_prod/ --delete
81
115
82
- push :
83
- Rscript -e " source('R/sync_aws.R'); sync_aws(direction = 'upload')"
116
+ push-flu-prod :
117
+ aws s3 sync flu_hosp_prod/ s3://forecasting-team-data/2024/flu_hosp_prod/ --delete
118
+
119
+ push-covid-explore :
120
+ aws s3 sync covid_hosp_explore/ s3://forecasting-team-data/2024/covid_hosp_explore/ --delete
121
+
122
+ push-flu-explore :
123
+ aws s3 sync flu_hosp_explore/ s3://forecasting-team-data/2024/flu_hosp_explore/ --delete
124
+
125
+ push : push-covid-prod push-flu-prod push-covid-explore push-flu-explore
84
126
85
127
upload : push
86
128
87
129
dashboard :
88
130
Rscript scripts/dashboard.R
89
131
90
- update-site :
132
+ sync-reports :
133
+ aws s3 sync s3://forecasting-team-data/2024/reports/ reports/; \
134
+ aws s3 sync reports/ s3://forecasting-team-data/2024/reports/
135
+
136
+ update-site : sync-reports
91
137
Rscript -e " suppressPackageStartupMessages(source(here::here('R', 'load_all.R'))); update_site()" > cache/update_site_log.txt
92
138
93
139
netlify :
@@ -99,5 +145,16 @@ get-flu-prod-errors:
99
145
get-covid-prod-errors :
100
146
Rscript -e " suppressPackageStartupMessages(source(here::here('R', 'load_all.R'))); get_targets_errors(project = 'covid_hosp_prod')"
101
147
102
- summary_reports :
103
- Rscript scripts/summary_reports.R
148
+ summary-reports :
149
+ Rscript -e " rmarkdown::render('scripts/reports/revision_summary_report_2025.Rmd', output_file = here::here('reports', 'revision_summary_2025.html'))" ; \
150
+ Rscript -e " rmarkdown::render('scripts/reports/decreasing_forecasters.Rmd', output_file = here::here('reports', 'decreasing_forecasters.html'))" ; \
151
+ Rscript -e " rmarkdown::render('scripts/reports/season_summary_2025.Rmd', output_file = here::here('reports', 'season_summary_2025.html'))" ; \
152
+ Rscript -e " rmarkdown::render('scripts/reports/first_day_wrong.Rmd', output_file = here::here('reports', 'first_day_wrong.html'))" ;
153
+
154
+ season-summary-2025-talk :
155
+ quarto render scripts/reports/season_2025_talk/season_summary_2025_presentation.qmd --to revealjs --output-dir " ../../../reports" ; \
156
+ cp scripts/reports/season_2025_talk/tachyons-minimal.css reports/; \
157
+ cp -r scripts/reports/season_2025_talk/gfx reports/
158
+
159
+ season-summary-2025-talk-preview :
160
+ quarto preview scripts/reports/season_2025_talk/season_summary_2025_presentation.qmd
0 commit comments