Build branch concat_text with version concat_text (341faad)

Build pipeline: viash-hub.craftbox.concat-text-q4j5n

Source commit: 341faada43

Source message: Add authorship
This commit is contained in:
CI
2024-07-23 12:29:25 +00:00
parent f014f08cec
commit 63c3032a3b
19 changed files with 196 additions and 52 deletions

View File

@@ -1,5 +1,31 @@
name: "concat_text"
version: "concat_text"
authors:
- name: "Toni Verbeiren"
roles:
- "author"
- "maintainer"
info:
links:
github: "tverbeiren"
linkedin: "verbeiren"
organizations:
- name: "Data Intuitive"
href: "https://www.data-intuitive.com"
role: "Data Scientist and CEO"
- name: "Dries Schaumont"
roles:
- "reviewer"
info:
links:
email: "dries@data-intuitive.com"
github: "DriesSchaumont"
orcid: "0000-0002-4389-0440"
linkedin: "dries-schaumont"
organizations:
- name: "Data Intuitive"
href: "https://www.data-intuitive.com"
role: "Data Scientist"
argument_groups:
- name: "Input arguments"
arguments:
@@ -18,7 +44,7 @@ argument_groups:
- name: "Output arguments"
arguments:
- type: "boolean_true"
name: "--zip_output"
name: "--gzip_output"
description: "Should the output be zipped?"
info: null
direction: "input"
@@ -45,7 +71,10 @@ test_resources:
- type: "bash_script"
path: "test.sh"
is_executable: true
info: null
info:
improvements: "This component could be improved in 2 ways:\n 1. Allow for a mix\
\ of zipped and plain input files\n 2. Allow to specify a compression algorithm\
\ for the output\n"
status: "enabled"
requirements:
commands:
@@ -142,7 +171,7 @@ build_info:
output: "target/executable/concat_text"
executable: "target/executable/concat_text/concat_text"
viash_version: "0.9.0-RC6"
git_commit: "5b88b9d8e604ea154a1e952c48a93a203547c18c"
git_commit: "341faada43ab3ac535e6ebc298ba4c4122ed33cf"
git_remote: "https://github.com/viash-hub/craftbox"
package_config:
name: "craftbox"

View File

@@ -10,6 +10,10 @@
# authors of this component should specify the license in the header of such
# files, or include a separate license file detailing the licenses of all included
# files.
#
# Component authors:
# * Toni Verbeiren (author, maintainer)
# * Dries Schaumont (reviewer)
set -e
@@ -186,7 +190,7 @@ function ViashHelp {
echo " A list of (gzipped) text files."
echo ""
echo "Output arguments:"
echo " --zip_output"
echo " --gzip_output"
echo " type: boolean_true"
echo " Should the output be zipped?"
echo ""
@@ -472,10 +476,11 @@ FROM alpine:latest
ENTRYPOINT []
RUN apk add --no-cache bash procps file
LABEL org.opencontainers.image.authors="Toni Verbeiren, Dries Schaumont"
LABEL org.opencontainers.image.description="Companion container for running component concat_text"
LABEL org.opencontainers.image.created="2024-07-23T11:57:34Z"
LABEL org.opencontainers.image.created="2024-07-23T12:21:55Z"
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
LABEL org.opencontainers.image.revision="5b88b9d8e604ea154a1e952c48a93a203547c18c"
LABEL org.opencontainers.image.revision="341faada43ab3ac535e6ebc298ba4c4122ed33cf"
LABEL org.opencontainers.image.version="concat_text"
VIASHDOCKER
@@ -619,9 +624,9 @@ while [[ $# -gt 0 ]]; do
fi
shift 1
;;
--zip_output)
[ -n "$VIASH_PAR_ZIP_OUTPUT" ] && ViashError Bad arguments for option \'--zip_output\': \'$VIASH_PAR_ZIP_OUTPUT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1
VIASH_PAR_ZIP_OUTPUT=true
--gzip_output)
[ -n "$VIASH_PAR_GZIP_OUTPUT" ] && ViashError Bad arguments for option \'--gzip_output\': \'$VIASH_PAR_GZIP_OUTPUT\' \& \'$2\' - you should provide exactly one argument for this option. && exit 1
VIASH_PAR_GZIP_OUTPUT=true
shift 1
;;
--output)
@@ -821,8 +826,8 @@ if [ -z ${VIASH_META_TEMP_DIR+x} ]; then
fi
# filling in defaults
if [ -z ${VIASH_PAR_ZIP_OUTPUT+x} ]; then
VIASH_PAR_ZIP_OUTPUT="false"
if [ -z ${VIASH_PAR_GZIP_OUTPUT+x} ]; then
VIASH_PAR_GZIP_OUTPUT="false"
fi
# check whether required files exist
@@ -840,9 +845,9 @@ if [ ! -z "$VIASH_PAR_INPUT" ]; then
fi
# check whether parameters values are of the right type
if [[ -n "$VIASH_PAR_ZIP_OUTPUT" ]]; then
if ! [[ "$VIASH_PAR_ZIP_OUTPUT" =~ ^(true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO)$ ]]; then
ViashError '--zip_output' has to be a boolean_true. Use "--help" to get more information on the parameters.
if [[ -n "$VIASH_PAR_GZIP_OUTPUT" ]]; then
if ! [[ "$VIASH_PAR_GZIP_OUTPUT" =~ ^(true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO)$ ]]; then
ViashError '--gzip_output' has to be a boolean_true. Use "--help" to get more information on the parameters.
exit 1
fi
fi
@@ -1022,7 +1027,7 @@ cat > "\$tempscript" << 'VIASHMAIN'
## VIASH START
# The following code has been auto-generated by Viash.
$( if [ ! -z ${VIASH_PAR_INPUT+x} ]; then echo "${VIASH_PAR_INPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_input='&'#" ; else echo "# par_input="; fi )
$( if [ ! -z ${VIASH_PAR_ZIP_OUTPUT+x} ]; then echo "${VIASH_PAR_ZIP_OUTPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_zip_output='&'#" ; else echo "# par_zip_output="; fi )
$( if [ ! -z ${VIASH_PAR_GZIP_OUTPUT+x} ]; then echo "${VIASH_PAR_GZIP_OUTPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_gzip_output='&'#" ; else echo "# par_gzip_output="; fi )
$( if [ ! -z ${VIASH_PAR_OUTPUT+x} ]; then echo "${VIASH_PAR_OUTPUT}" | sed "s#'#'\"'\"'#g;s#.*#par_output='&'#" ; else echo "# par_output="; fi )
$( if [ ! -z ${VIASH_META_NAME+x} ]; then echo "${VIASH_META_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_name='&'#" ; else echo "# meta_name="; fi )
$( if [ ! -z ${VIASH_META_FUNCTIONALITY_NAME+x} ]; then echo "${VIASH_META_FUNCTIONALITY_NAME}" | sed "s#'#'\"'\"'#g;s#.*#meta_functionality_name='&'#" ; else echo "# meta_functionality_name="; fi )
@@ -1044,9 +1049,9 @@ $( if [ ! -z ${VIASH_META_MEMORY_TIB+x} ]; then echo "${VIASH_META_MEMORY_TIB}"
$( if [ ! -z ${VIASH_META_MEMORY_PIB+x} ]; then echo "${VIASH_META_MEMORY_PIB}" | sed "s#'#'\"'\"'#g;s#.*#meta_memory_pib='&'#" ; else echo "# meta_memory_pib="; fi )
## VIASH END
#!/bin/bash
#!/usr/bin/env bash
set -e
set -euo pipefail
TMPDIR=\$(mktemp -d "\$meta_temp_dir/\$meta_functionality_name-XXXXXX")
function clean_up {
@@ -1057,10 +1062,10 @@ trap clean_up EXIT
par_input="\$(echo "\$par_input" | tr ';' ' ')"
echo -n ">> Check if input is gzipped... "
set +e
set +eo pipefail
file \$par_input | grep -q 'gzip'
is_zipped="\$?"
set -e
set -euo pipefail
[[ "\$is_zipped" == "0" ]] && echo "yes" || echo "no"
if [[ "\$is_zipped" == "0" ]]; then
@@ -1071,7 +1076,7 @@ else
cat \$par_input > \$TMPDIR/contents
fi
if [ "\$par_zip_output" == true ]; then
if [ "\$par_gzip_output" == true ]; then
echo ">> Zip output file"
gzip \$TMPDIR/contents
mv \$TMPDIR/contents.gz \$par_output