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