index.cwl

 1#!/usr/bin/env cwl-runner
 2### Index Builder
 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.index_builder]
25requirements:
26  InlineJavascriptRequirement: {}
27  NetworkAccess:
28    networkAccess: True
29
30doc: |
31  This tool builds all indices for the specified table.
32  Log file displays real-time progress of building indices
33
34
35inputs:
36  #$import: db.yaml
37  registry:
38    type:
39      - File?
40      - string?
41    inputBinding:
42      prefix: --registry
43    doc: |
44      A path to the data model file
45  domain:
46    type: string
47    doc: the name of the domain
48    inputBinding:
49      prefix: --domain
50  table:
51    type: string
52    doc: the name of the table
53    inputBinding:
54      prefix: --table
55  database:
56    type: File
57    doc: Path to database connection file, usually database.ini
58    inputBinding:
59      prefix: --db
60  connection_name:
61    type: string
62    doc: The name of the section in the database.ini file
63    inputBinding:
64      prefix: --connection
65  incremental:
66    type:  boolean
67    default: false
68    inputBinding:
69      prefix: --incremental
70  force:
71    type:  boolean
72    default: false
73    inputBinding:
74      prefix: --force
75  depends_on:
76    type: Any?
77    doc: a special field used to enforce dependencies and execution order
78
79
80arguments:
81    - valueFrom: "--autocommit"
82
83
84outputs:
85  log:
86    type: File
87    outputBinding:
88      glob: "*.log"
89  errors:
90    type: stderr
91
92stderr:  $("index-" + inputs.table + ".err")