forked from USGS-R/hierarchical-data-release-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremake.yml
152 lines (132 loc) · 3.79 KB
/
remake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
include:
- 1_spatial.yml
- 2_observations.yml
- 3_drivers.yml
- 4_forecasts.yml
packages:
- yaml
- dplyr
- tidyr
- meddle # at least v0.0.12
- readr
- feather
- rgdal
- stringr
- sf
- sbtools
- dssecrets
- scipiper
- tidyverse
sources:
- src/sb_utils.R
- src/sb_functions.R
- src/spatial_functions.R
targets:
all:
depends:
- log/00_parent_sb.csv
- log/01_spatial_sb_data.csv
- log/02_observations_sb_data.csv
- log/03_drivers_sb_data.csv
- log/04_forecasts_sb_data.csv
## PARENT ##
## Build xml for parent item and save to out_xml folder
out_xml/00_parent.xml:
command: render(
filename = target_name,
"in_text/text_SHARED.yml",
"in_text/text_00_parent.yml",
geospatial_area_metadata
)
## Push parent metadata xml to sb via log file
log/00_parent_sb.csv:
command: sb_replace_files(
filename = target_name,
sb_id = sbid_00_parent,
sources = 'src/sb_utils.R',
'out_xml/00_parent.xml')
## SPATIAL ##
## Build metadata xml for spatial data and save locally to out_xml
out_xml/01_spatial.xml:
command: render(
filename = target_name,
"in_text/text_SHARED.yml",
"in_text/text_01_spatial.yml",
geospatial_area_metadata
)
### Push all spatial data + metadata xml to sb
log/01_spatial_sb_data.csv:
command: sb_replace_files(
filename = target_name,
sb_id = sbid_01_spatial,
sources = "src/sb_utils.R",
"out_data/XX_geospatial_area_WG84.zip",
"out_xml/01_spatial.xml"
)
## OBSERVATIONS ##
## Build metadata xml for obs data and save locally to out_xml
out_xml/02_observations.xml:
command: render(
filename = target_name,
"in_text/text_SHARED.yml",
"in_text/text_02_observations.yml",
geospatial_area_metadata
)
## Push all obs data + metadata xml to sb via log file
log/02_observations_sb_data.csv:
command: sb_replace_files(
filename = target_name,
sb_id = sbid_02_observations,
sources = "src/sb_utils.R",
"out_data/XX_observations.zip",
"out_xml/02_observations.xml"
)
## DRIVER ##
## Build metadata xml for driver and save locally to out_xml
out_xml/03_drivers.xml:
command: render(
filename = target_name,
"in_text/text_SHARED.yml",
"in_text/text_03_drivers.yml",
geospatial_area_metadata
)
## Push all driver data + metadata xml to sb via log file
log/03_drivers_sb_data.csv:
command: sb_replace_files(
filename = target_name,
sb_id = sbid_03_drivers,
sources = 'src/sb_utils.R',
'out_data/XX_driver_data_1.zip',
'out_data/XX_driver_data_2.zip',
'out_xml/03_drivers.xml'
)
## FORECASTS ##
## Build metadata xml for forecasts and save locally to out_xml
out_xml/04_forecasts.xml:
command: render(
filename = target_name,
"in_text/text_SHARED.yml",
"in_text/text_04_forecasts.yml",
geospatial_area_metadata
)
## Push all forecasts data + metadata xml to sb via log file
log/04_forecasts_sb_data.csv:
command: sb_replace_files_log(
filename = target_name,
sb_id = sbid_04_forecasts,
sources = 'src/sb_utils.R',
'out_data/XX_forecasts1.zip',
'out_data/XX_forecasts2.zip',
'out_xml/04_forecasts.xml'
)
# ------ SB IDs --------
sbid_00_parent:
command: c(I('61ddfd54d34ed79294021ad8')) # XX_sb_id_parent
sbid_01_spatial:
command: c(I('636187b3d34ebe44250656b0')) # XX_sb_id_spatial
sbid_02_observations:
command: c(I('636187ced34ebe44250656b3')) # XX_sb_id_observations
sbid_03_drivers:
command: c(I('6361881bd34ebe44250656b8')) # XX_sb_id_drivers
sbid_04_forecasts:
command: c(I('6361882ed34ebe44250656ba')) # XX_sb_id_forecasts