vacuum.cwl

 1#!/usr/bin/env cwl-runner
 2### Table tuner tool (running VACUUM)
 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.loader.vacuum]
25requirements:
26  InlineJavascriptRequirement: {}
27  NetworkAccess:
28    networkAccess: True
29
30doc: |
31  This tool runs VACUUM Aanalyze to make subsequent queries
32  more efficient
33
34inputs:
35  #$import: db.yaml
36  registry:
37    type:
38      - File?
39      - string?
40    inputBinding:
41      prefix: --registry
42    doc: |
43      A path to the data model file
44  domain:
45    type: string
46    doc: the name of the domain
47    inputBinding:
48      prefix: --domain
49  table:
50    type: string
51    doc: the name of the table
52    inputBinding:
53      prefix: --table
54  database:
55    type: File
56    doc: Path to database connection file, usually database.ini
57    inputBinding:
58      prefix: --db
59  connection_name:
60    type: string
61    doc: The name of the section in the database.ini file
62    inputBinding:
63      prefix: --connection
64  depends_on:
65    type:
66      - File?
67      - File[]
68    doc: a special field used to enforce dependencies and execution order
69
70
71outputs:
72  log:
73    type: File
74    outputBinding:
75      glob: "*.log"
76  errors:
77    type: stderr
78
79stderr: $("vacuum-" + inputs.table + ".err")