1#!/usr/bin/env cwl-runner
2### Test harness for pm25_yearly_download.cwl
3
4cwlVersion: v1.2
5class: Workflow
6
7requirements:
8 InlineJavascriptRequirement: {}
9 MultipleInputFeatureRequirement: {}
10 ScatterFeatureRequirement: {}
11 StepInputExpressionRequirement: {}
12 SubworkflowFeatureRequirement: {}
13
14
15# All inputs of original pipeline, remove what is not needed
16inputs:
17 component:
18 default:
19 - BC
20 - NH4
21 - NIT
22 - OM
23 - SO4
24 - SOIL
25 - SS
26 doc: "Optional components provided as percentages in a separate set \nof netCDF\
27 \ files\n"
28 type: string[]
29 connection_name:
30 doc: 'The name of the section in the database.ini file or a literal
31
32 `None` to skip over database ingestion step
33
34 '
35 type: string
36 database:
37 doc: "Path to database connection file, usually database.ini. \nThis argument\
38 \ is ignored if `connection_name` == `None`\n"
39 type: File
40 downloads:
41 doc: "Local or AWS bucket folder containing netCDF grid files, downloaded \nand\
42 \ unpacked from Washington University in St. Louis (WUSTL) Box\nsite. Annual\
43 \ and monthly data repositories are described in\n[WUSTL Atmospheric Composition\
44 \ Analysis Group](https://sites.wustl.edu/acag/datasets/surface-pm2-5/).\n\n\
45 The annual data for PM2.5 is also available in \na Harvard URC AWS Bucket: `s3://nsaph-public/data/exposures/wustl/`\n"
46 type: Directory
47 geography:
48 doc: 'Type of geography: zip codes or counties
49
50 Supported values: "zip", "zcta" or "county"
51
52 '
53 type: string
54 proxy:
55 default: ''
56 doc: HTTP/HTTPS Proxy if required
57 type: string?
58 ram:
59 default: 2GB
60 doc: Runtime memory, available to the process
61 type: string
62 shape_file_collection:
63 default: tiger
64 doc: "[Collection of shapefiles](https://www2.census.gov/geo/tiger), \neither\
65 \ GENZ or TIGER\n"
66 type: string
67 strategy:
68 default: auto
69 doc: 'Rasterization strategy, see
70
71 [documentation](https://foromeplatform.github.io/dorieh/strategy.html)
72
73 for the list of supported values and explanations
74
75 '
76 type: string
77 table:
78 default: pm25_aggregated
79 doc: The name of the table to store teh aggregated data in
80 type: string
81 test_script:
82 doc: File containing SQL test script
83 type: File
84 variable:
85 default: PM25
86 doc: 'The main variable that is being aggregated over shapes. We have tested
87
88 the pipeline for PM25
89
90 '
91 type: string
92 years:
93 default:
94 - 2009
95 - 2010
96 type: int[]
97
98
99steps:
100 execute:
101 run: pm25_yearly_download.cwl
102 in:
103 proxy: proxy
104 downloads: downloads
105 geography: geography
106 years: years
107 variable: variable
108 component: component
109 strategy: strategy
110 ram: ram
111 shape_file_collection: shape_file_collection
112 database: database
113 connection_name: connection_name
114 table: table
115 out:
116 - aggregate_data
117 - data_dictionary
118 - consolidated_data
119 - shapes
120 - aggregate_log
121 - aggregate_err
122 - ingest_log
123 - index_log
124 - vacuum_log
125 - ingest_err
126 - index_err
127 - vacuum_err
128
129 verify:
130 run: run_test.cwl
131 in:
132 database: database
133 connection_name: connection_name
134 script: test_script
135 depends_on: execute/vacuum_err
136 out:
137 - log
138 - errors
139
140outputs:
141## Generated by nsaph/util/cwl_collect_outputs.py from pm25_yearly_download.cwl:
142 execute_aggregate_data:
143 type: File[]
144 outputSource: execute/aggregate_data
145 execute_data_dictionary:
146 type: File
147 outputSource: execute/data_dictionary
148 execute_consolidated_data:
149 type: File[]
150 outputSource: execute/consolidated_data
151 execute_shapes:
152 type: {'type': 'array', 'items': {'type': 'array', 'items': ['File']}}
153 outputSource: execute/shapes
154 execute_aggregate_log:
155 type: {'type': 'array', 'items': 'Any'}
156 outputSource: execute/aggregate_log
157 execute_aggregate_err:
158 type: File[]
159 outputSource: execute/aggregate_err
160 execute_ingest_log:
161 type: File
162 outputSource: execute/ingest_log
163 execute_index_log:
164 type: File
165 outputSource: execute/index_log
166 execute_vacuum_log:
167 type: File
168 outputSource: execute/vacuum_log
169 execute_ingest_err:
170 type: File
171 outputSource: execute/ingest_err
172 execute_index_err:
173 type: File
174 outputSource: execute/index_err
175 execute_vacuum_err:
176 type: File
177 outputSource: execute/vacuum_err
178## Generated by nsaph/util/cwl_collect_outputs.py from run_test.cwl:
179 verify_log:
180 type: File
181 outputSource: verify/log
182 verify_errors:
183 type: File
184 outputSource: verify/errors