ensure_resource.cwl

 1#!/usr/bin/env cwl-runner
 2### Resource Loader
 3#  Copyright (c) 2021. Harvard University
 4#
 5#  Developed by Research Software Engineering,
 6#  Faculty of Arts and Sciences, Research Computing (FAS RC)
 7#  Author: Michael A Bouzinier
 8#
 9#  Licensed under the Apache License, Version 2.0 (the "License");
10#  you may not use this file except in compliance with the License.
11#  You may obtain a copy of the License at
12#
13#         http://www.apache.org/licenses/LICENSE-2.0
14#
15#  Unless required by applicable law or agreed to in writing, software
16#  distributed under the License is distributed on an "AS IS" BASIS,
17#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18#  See the License for the specific language governing permissions and
19#  limitations under the License.
20#
21
22cwlVersion: v1.2
23class: CommandLineTool
24baseCommand: [python, -m, dorieh.platform.util.pg_json_dump]
25
26doc: |
27  This tool ensures that resources required by
28  the processing steps are loaded into the database
29
30
31inputs:
32  database:
33    type: File
34    doc: Path to database connection file, usually database.ini
35    inputBinding:
36      prefix: --db
37  connection_name:
38    type: string
39    doc: The name of the section in the database.ini file
40    inputBinding:
41      prefix: --connection
42  table:
43    type: string
44    doc: the name of the table containing required resource
45    inputBinding:
46      prefix: --table
47
48arguments:
49    - valueFrom: "ensure"
50      prefix: --action
51
52
53outputs:
54  log:
55    type: File
56    outputBinding:
57      glob: "*.log"
58
59  errors:
60    type: stderr
61
62stderr: resource.err