Build branch main with version main (5705b88)
Build pipeline: viash-hub.craftbox.main-6n7js
Source commit: 5705b88fa2
Source message: Bump Viash and update CHANGELOG
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## NEW FEATURES
|
## NEW FEATURES
|
||||||
|
|
||||||
|
* `concat_text`: Concatenate a number of text files
|
||||||
|
|
||||||
* `csv2fasta`: Convert two columns from a CSV file to FASTA entries (PR #1).
|
* `csv2fasta`: Convert two columns from a CSV file to FASTA entries (PR #1).
|
||||||
|
|
||||||
* `untar`: Unpack a .tar file. When the contents of the .tar file is just a single directory,
|
* `untar`: Unpack a .tar file. When the contents of the .tar file is just a single directory,
|
||||||
@@ -9,4 +11,4 @@
|
|||||||
|
|
||||||
## MINOR CHANGES
|
## MINOR CHANGES
|
||||||
|
|
||||||
* Bump viash to 0.9.0-RC7 (PR #6).
|
* Bump viash to 0.9.0
|
||||||
@@ -170,15 +170,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/executable/concat_text"
|
output: "target/executable/concat_text"
|
||||||
executable: "target/executable/concat_text/concat_text"
|
executable: "target/executable/concat_text/concat_text"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# concat_text main
|
# concat_text main
|
||||||
#
|
#
|
||||||
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
# Data Intuitive.
|
# Data Intuitive.
|
||||||
#
|
#
|
||||||
@@ -58,24 +58,24 @@ function ViashRemoveFlags {
|
|||||||
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
||||||
# returns : The absolute path of the bash file
|
# returns : The absolute path of the bash file
|
||||||
function ViashSourceDir {
|
function ViashSourceDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [ -h "$SOURCE" ]; do
|
while [ -h "$source" ]; do
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
|
||||||
SOURCE="$(readlink "$SOURCE")"
|
source="$(readlink "$source")"
|
||||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
[[ $source != /* ]] && source="$dir/$source"
|
||||||
done
|
done
|
||||||
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
|
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
|
||||||
}
|
}
|
||||||
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
||||||
# usage : ViashFindTargetDir 'ScriptPath'
|
# usage : ViashFindTargetDir 'ScriptPath'
|
||||||
# $1 : The location from where to start the upward search
|
# $1 : The location from where to start the upward search
|
||||||
# returns : The absolute path of the '.build.yaml' file
|
# returns : The absolute path of the '.build.yaml' file
|
||||||
function ViashFindTargetDir {
|
function ViashFindTargetDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
|
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
|
||||||
SOURCE=${SOURCE%/*}
|
source=${source%/*}
|
||||||
done
|
done
|
||||||
echo $SOURCE
|
echo $source
|
||||||
}
|
}
|
||||||
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
||||||
VIASH_LOGCODE_EMERGENCY=0
|
VIASH_LOGCODE_EMERGENCY=0
|
||||||
@@ -219,9 +219,9 @@ function ViashDockerInstallationCheck {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ViashDebug "Checking whether the Docker daemon is running"
|
ViashDebug "Checking whether the Docker daemon is running"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
||||||
@@ -273,9 +273,9 @@ function ViashDockerPull {
|
|||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker pull $1 && return 0 || return 1
|
docker pull $1 && return 0 || return 1
|
||||||
else
|
else
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker pull $1 2> /dev/null > /dev/null
|
docker pull $1 2> /dev/null > /dev/null
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
||||||
@@ -295,7 +295,8 @@ function ViashDockerPull {
|
|||||||
# echo $? # returns '1'
|
# echo $? # returns '1'
|
||||||
function ViashDockerPush {
|
function ViashDockerPush {
|
||||||
ViashNotice "Pushing image to '$1'"
|
ViashNotice "Pushing image to '$1'"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
|
local out
|
||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker push $1
|
docker push $1
|
||||||
out=$?
|
out=$?
|
||||||
@@ -319,9 +320,9 @@ function ViashDockerPush {
|
|||||||
# examples:
|
# examples:
|
||||||
# ViashDockerPullElseBuild mynewcomponent
|
# ViashDockerPullElseBuild mynewcomponent
|
||||||
function ViashDockerPullElseBuild {
|
function ViashDockerPullElseBuild {
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
ViashDockerPull $1
|
ViashDockerPull $1
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashDockerBuild $@
|
ViashDockerBuild $@
|
||||||
@@ -478,9 +479,9 @@ RUN apk add --no-cache bash procps file
|
|||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Toni Verbeiren, Dries Schaumont"
|
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.description="Companion container for running component concat_text"
|
||||||
LABEL org.opencontainers.image.created="2024-08-19T07:26:27Z"
|
LABEL org.opencontainers.image.created="2024-09-12T15:41:16Z"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
||||||
LABEL org.opencontainers.image.revision="373be82129c13f50558c0dae25c07afe0866a8ba"
|
LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
LABEL org.opencontainers.image.version="main"
|
LABEL org.opencontainers.image.version="main"
|
||||||
|
|
||||||
VIASHDOCKER
|
VIASHDOCKER
|
||||||
@@ -507,6 +508,9 @@ function ViashDockerBuildArgs {
|
|||||||
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
||||||
function ViashAbsolutePath {
|
function ViashAbsolutePath {
|
||||||
local thePath
|
local thePath
|
||||||
|
local parr
|
||||||
|
local outp
|
||||||
|
local len
|
||||||
if [[ ! "$1" =~ ^/ ]]; then
|
if [[ ! "$1" =~ ^/ ]]; then
|
||||||
thePath="$PWD/$1"
|
thePath="$PWD/$1"
|
||||||
else
|
else
|
||||||
@@ -537,14 +541,17 @@ function ViashAbsolutePath {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
||||||
# $1 : The parameter value
|
# $1 : The parameter value
|
||||||
# returns : New parameter
|
# returns : New parameter
|
||||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||||
|
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
|
||||||
# examples:
|
# examples:
|
||||||
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
||||||
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
||||||
function ViashDockerAutodetectMount {
|
function ViashDockerAutodetectMount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -552,7 +559,7 @@ function ViashDockerAutodetectMount {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
if [ -z "$base_name" ]; then
|
if [ -z "$base_name" ]; then
|
||||||
echo "$mount_target"
|
echo "$mount_target"
|
||||||
else
|
else
|
||||||
@@ -560,7 +567,9 @@ function ViashDockerAutodetectMount {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function ViashDockerAutodetectMountArg {
|
function ViashDockerAutodetectMountArg {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -568,17 +577,22 @@ function ViashDockerAutodetectMountArg {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
||||||
echo "--volume=\"$mount_source:$mount_target\""
|
echo "--volume=\"$mount_source:$mount_target\""
|
||||||
}
|
}
|
||||||
function ViashDockerStripAutomount {
|
function ViashDockerStripAutomount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
echo "${abs_path#/viash_automount}"
|
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
|
||||||
}
|
}
|
||||||
# initialise variables
|
# initialise variables
|
||||||
VIASH_DIRECTORY_MOUNTS=()
|
VIASH_DIRECTORY_MOUNTS=()
|
||||||
|
|
||||||
|
# configure default docker automount prefix if it is unset
|
||||||
|
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
|
||||||
|
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
|
||||||
|
fi
|
||||||
|
|
||||||
# initialise docker variables
|
# initialise docker variables
|
||||||
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
||||||
|
|
||||||
@@ -662,6 +676,18 @@ while [[ $# -gt 0 ]]; do
|
|||||||
VIASH_MODE='dockerfile'
|
VIASH_MODE='dockerfile'
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
---docker_run_args)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$2")
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
---docker_run_args=*)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
---docker_image_id)
|
||||||
|
VIASH_MODE='docker_image_id'
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
---debug)
|
---debug)
|
||||||
VIASH_MODE='debug'
|
VIASH_MODE='debug'
|
||||||
shift 1
|
shift 1
|
||||||
@@ -723,6 +749,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
|
|||||||
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
||||||
ViashDockerfile "$VIASH_ENGINE_ID"
|
ViashDockerfile "$VIASH_ENGINE_ID"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
|
||||||
|
echo "$VIASH_DOCKER_IMAGE_ID"
|
||||||
|
exit 0
|
||||||
|
|
||||||
# enter docker container
|
# enter docker container
|
||||||
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
||||||
|
|||||||
@@ -221,15 +221,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/executable/csv2fasta"
|
output: "target/executable/csv2fasta"
|
||||||
executable: "target/executable/csv2fasta/csv2fasta"
|
executable: "target/executable/csv2fasta/csv2fasta"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# csv2fasta main
|
# csv2fasta main
|
||||||
#
|
#
|
||||||
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
# Data Intuitive.
|
# Data Intuitive.
|
||||||
#
|
#
|
||||||
@@ -54,24 +54,24 @@ function ViashRemoveFlags {
|
|||||||
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
||||||
# returns : The absolute path of the bash file
|
# returns : The absolute path of the bash file
|
||||||
function ViashSourceDir {
|
function ViashSourceDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [ -h "$SOURCE" ]; do
|
while [ -h "$source" ]; do
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
|
||||||
SOURCE="$(readlink "$SOURCE")"
|
source="$(readlink "$source")"
|
||||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
[[ $source != /* ]] && source="$dir/$source"
|
||||||
done
|
done
|
||||||
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
|
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
|
||||||
}
|
}
|
||||||
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
||||||
# usage : ViashFindTargetDir 'ScriptPath'
|
# usage : ViashFindTargetDir 'ScriptPath'
|
||||||
# $1 : The location from where to start the upward search
|
# $1 : The location from where to start the upward search
|
||||||
# returns : The absolute path of the '.build.yaml' file
|
# returns : The absolute path of the '.build.yaml' file
|
||||||
function ViashFindTargetDir {
|
function ViashFindTargetDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
|
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
|
||||||
SOURCE=${SOURCE%/*}
|
source=${source%/*}
|
||||||
done
|
done
|
||||||
echo $SOURCE
|
echo $source
|
||||||
}
|
}
|
||||||
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
||||||
VIASH_LOGCODE_EMERGENCY=0
|
VIASH_LOGCODE_EMERGENCY=0
|
||||||
@@ -261,9 +261,9 @@ function ViashDockerInstallationCheck {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ViashDebug "Checking whether the Docker daemon is running"
|
ViashDebug "Checking whether the Docker daemon is running"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
||||||
@@ -315,9 +315,9 @@ function ViashDockerPull {
|
|||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker pull $1 && return 0 || return 1
|
docker pull $1 && return 0 || return 1
|
||||||
else
|
else
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker pull $1 2> /dev/null > /dev/null
|
docker pull $1 2> /dev/null > /dev/null
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
||||||
@@ -337,7 +337,8 @@ function ViashDockerPull {
|
|||||||
# echo $? # returns '1'
|
# echo $? # returns '1'
|
||||||
function ViashDockerPush {
|
function ViashDockerPush {
|
||||||
ViashNotice "Pushing image to '$1'"
|
ViashNotice "Pushing image to '$1'"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
|
local out
|
||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker push $1
|
docker push $1
|
||||||
out=$?
|
out=$?
|
||||||
@@ -361,9 +362,9 @@ function ViashDockerPush {
|
|||||||
# examples:
|
# examples:
|
||||||
# ViashDockerPullElseBuild mynewcomponent
|
# ViashDockerPullElseBuild mynewcomponent
|
||||||
function ViashDockerPullElseBuild {
|
function ViashDockerPullElseBuild {
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
ViashDockerPull $1
|
ViashDockerPull $1
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashDockerBuild $@
|
ViashDockerBuild $@
|
||||||
@@ -524,9 +525,9 @@ RUN pip install --upgrade pip && \
|
|||||||
pip install --upgrade --no-cache-dir "dnaio"
|
pip install --upgrade --no-cache-dir "dnaio"
|
||||||
|
|
||||||
LABEL org.opencontainers.image.description="Companion container for running component csv2fasta"
|
LABEL org.opencontainers.image.description="Companion container for running component csv2fasta"
|
||||||
LABEL org.opencontainers.image.created="2024-08-19T07:26:26Z"
|
LABEL org.opencontainers.image.created="2024-09-12T15:41:15Z"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
||||||
LABEL org.opencontainers.image.revision="373be82129c13f50558c0dae25c07afe0866a8ba"
|
LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
LABEL org.opencontainers.image.version="main"
|
LABEL org.opencontainers.image.version="main"
|
||||||
|
|
||||||
VIASHDOCKER
|
VIASHDOCKER
|
||||||
@@ -553,6 +554,9 @@ function ViashDockerBuildArgs {
|
|||||||
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
||||||
function ViashAbsolutePath {
|
function ViashAbsolutePath {
|
||||||
local thePath
|
local thePath
|
||||||
|
local parr
|
||||||
|
local outp
|
||||||
|
local len
|
||||||
if [[ ! "$1" =~ ^/ ]]; then
|
if [[ ! "$1" =~ ^/ ]]; then
|
||||||
thePath="$PWD/$1"
|
thePath="$PWD/$1"
|
||||||
else
|
else
|
||||||
@@ -583,14 +587,17 @@ function ViashAbsolutePath {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
||||||
# $1 : The parameter value
|
# $1 : The parameter value
|
||||||
# returns : New parameter
|
# returns : New parameter
|
||||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||||
|
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
|
||||||
# examples:
|
# examples:
|
||||||
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
||||||
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
||||||
function ViashDockerAutodetectMount {
|
function ViashDockerAutodetectMount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -598,7 +605,7 @@ function ViashDockerAutodetectMount {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
if [ -z "$base_name" ]; then
|
if [ -z "$base_name" ]; then
|
||||||
echo "$mount_target"
|
echo "$mount_target"
|
||||||
else
|
else
|
||||||
@@ -606,7 +613,9 @@ function ViashDockerAutodetectMount {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function ViashDockerAutodetectMountArg {
|
function ViashDockerAutodetectMountArg {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -614,17 +623,22 @@ function ViashDockerAutodetectMountArg {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
||||||
echo "--volume=\"$mount_source:$mount_target\""
|
echo "--volume=\"$mount_source:$mount_target\""
|
||||||
}
|
}
|
||||||
function ViashDockerStripAutomount {
|
function ViashDockerStripAutomount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
echo "${abs_path#/viash_automount}"
|
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
|
||||||
}
|
}
|
||||||
# initialise variables
|
# initialise variables
|
||||||
VIASH_DIRECTORY_MOUNTS=()
|
VIASH_DIRECTORY_MOUNTS=()
|
||||||
|
|
||||||
|
# configure default docker automount prefix if it is unset
|
||||||
|
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
|
||||||
|
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
|
||||||
|
fi
|
||||||
|
|
||||||
# initialise docker variables
|
# initialise docker variables
|
||||||
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
||||||
|
|
||||||
@@ -768,6 +782,18 @@ while [[ $# -gt 0 ]]; do
|
|||||||
VIASH_MODE='dockerfile'
|
VIASH_MODE='dockerfile'
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
---docker_run_args)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$2")
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
---docker_run_args=*)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
---docker_image_id)
|
||||||
|
VIASH_MODE='docker_image_id'
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
---debug)
|
---debug)
|
||||||
VIASH_MODE='debug'
|
VIASH_MODE='debug'
|
||||||
shift 1
|
shift 1
|
||||||
@@ -829,6 +855,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
|
|||||||
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
||||||
ViashDockerfile "$VIASH_ENGINE_ID"
|
ViashDockerfile "$VIASH_ENGINE_ID"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
|
||||||
|
echo "$VIASH_DOCKER_IMAGE_ID"
|
||||||
|
exit 0
|
||||||
|
|
||||||
# enter docker container
|
# enter docker container
|
||||||
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
||||||
|
|||||||
@@ -146,15 +146,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/executable/untar"
|
output: "target/executable/untar"
|
||||||
executable: "target/executable/untar/untar"
|
executable: "target/executable/untar/untar"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# untar main
|
# untar main
|
||||||
#
|
#
|
||||||
# This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
# This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
# derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
# Data Intuitive.
|
# Data Intuitive.
|
||||||
#
|
#
|
||||||
@@ -54,24 +54,24 @@ function ViashRemoveFlags {
|
|||||||
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
# $1 : Should always be set to ${BASH_SOURCE[0]}
|
||||||
# returns : The absolute path of the bash file
|
# returns : The absolute path of the bash file
|
||||||
function ViashSourceDir {
|
function ViashSourceDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [ -h "$SOURCE" ]; do
|
while [ -h "$source" ]; do
|
||||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
local dir="$( cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd )"
|
||||||
SOURCE="$(readlink "$SOURCE")"
|
source="$(readlink "$source")"
|
||||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
[[ $source != /* ]] && source="$dir/$source"
|
||||||
done
|
done
|
||||||
cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd
|
cd -P "$( dirname "$source" )" >/dev/null 2>&1 && pwd
|
||||||
}
|
}
|
||||||
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
# ViashFindTargetDir: return the path of the '.build.yaml' file, following symlinks
|
||||||
# usage : ViashFindTargetDir 'ScriptPath'
|
# usage : ViashFindTargetDir 'ScriptPath'
|
||||||
# $1 : The location from where to start the upward search
|
# $1 : The location from where to start the upward search
|
||||||
# returns : The absolute path of the '.build.yaml' file
|
# returns : The absolute path of the '.build.yaml' file
|
||||||
function ViashFindTargetDir {
|
function ViashFindTargetDir {
|
||||||
SOURCE="$1"
|
local source="$1"
|
||||||
while [[ "$SOURCE" != "" && ! -e "$SOURCE/.build.yaml" ]]; do
|
while [[ "$source" != "" && ! -e "$source/.build.yaml" ]]; do
|
||||||
SOURCE=${SOURCE%/*}
|
source=${source%/*}
|
||||||
done
|
done
|
||||||
echo $SOURCE
|
echo $source
|
||||||
}
|
}
|
||||||
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
# see https://en.wikipedia.org/wiki/Syslog#Severity_level
|
||||||
VIASH_LOGCODE_EMERGENCY=0
|
VIASH_LOGCODE_EMERGENCY=0
|
||||||
@@ -215,9 +215,9 @@ function ViashDockerInstallationCheck {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ViashDebug "Checking whether the Docker daemon is running"
|
ViashDebug "Checking whether the Docker daemon is running"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
local docker_version=$(docker version --format '{{.Client.APIVersion}}' 2> /dev/null)
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
ViashCritical "Docker daemon does not seem to be running. Try one of the following:"
|
||||||
@@ -269,9 +269,9 @@ function ViashDockerPull {
|
|||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker pull $1 && return 0 || return 1
|
docker pull $1 && return 0 || return 1
|
||||||
else
|
else
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
docker pull $1 2> /dev/null > /dev/null
|
docker pull $1 2> /dev/null > /dev/null
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
ViashWarning "Could not pull from '$1'. Docker image doesn't exist or is not accessible."
|
||||||
@@ -291,7 +291,8 @@ function ViashDockerPull {
|
|||||||
# echo $? # returns '1'
|
# echo $? # returns '1'
|
||||||
function ViashDockerPush {
|
function ViashDockerPush {
|
||||||
ViashNotice "Pushing image to '$1'"
|
ViashNotice "Pushing image to '$1'"
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
|
local out
|
||||||
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
if [ $VIASH_VERBOSITY -ge $VIASH_LOGCODE_INFO ]; then
|
||||||
docker push $1
|
docker push $1
|
||||||
out=$?
|
out=$?
|
||||||
@@ -315,9 +316,9 @@ function ViashDockerPush {
|
|||||||
# examples:
|
# examples:
|
||||||
# ViashDockerPullElseBuild mynewcomponent
|
# ViashDockerPullElseBuild mynewcomponent
|
||||||
function ViashDockerPullElseBuild {
|
function ViashDockerPullElseBuild {
|
||||||
save=$-; set +e
|
local save=$-; set +e
|
||||||
ViashDockerPull $1
|
ViashDockerPull $1
|
||||||
out=$?
|
local out=$?
|
||||||
[[ $save =~ e ]] && set -e
|
[[ $save =~ e ]] && set -e
|
||||||
if [ $out -ne 0 ]; then
|
if [ $out -ne 0 ]; then
|
||||||
ViashDockerBuild $@
|
ViashDockerBuild $@
|
||||||
@@ -475,9 +476,9 @@ RUN apt-get update && \
|
|||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
LABEL org.opencontainers.image.description="Companion container for running component untar"
|
LABEL org.opencontainers.image.description="Companion container for running component untar"
|
||||||
LABEL org.opencontainers.image.created="2024-08-19T07:26:27Z"
|
LABEL org.opencontainers.image.created="2024-09-12T15:41:15Z"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
LABEL org.opencontainers.image.source="https://github.com/viash-hub/craftbox"
|
||||||
LABEL org.opencontainers.image.revision="373be82129c13f50558c0dae25c07afe0866a8ba"
|
LABEL org.opencontainers.image.revision="5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
LABEL org.opencontainers.image.version="main"
|
LABEL org.opencontainers.image.version="main"
|
||||||
|
|
||||||
VIASHDOCKER
|
VIASHDOCKER
|
||||||
@@ -504,6 +505,9 @@ function ViashDockerBuildArgs {
|
|||||||
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
# ViashAbsolutePath /foo/bar/.. # returns /foo
|
||||||
function ViashAbsolutePath {
|
function ViashAbsolutePath {
|
||||||
local thePath
|
local thePath
|
||||||
|
local parr
|
||||||
|
local outp
|
||||||
|
local len
|
||||||
if [[ ! "$1" =~ ^/ ]]; then
|
if [[ ! "$1" =~ ^/ ]]; then
|
||||||
thePath="$PWD/$1"
|
thePath="$PWD/$1"
|
||||||
else
|
else
|
||||||
@@ -534,14 +538,17 @@ function ViashAbsolutePath {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
# ViashDockerAutodetectMount: auto configuring docker mounts from parameters
|
||||||
# $1 : The parameter value
|
# $1 : The parameter value
|
||||||
# returns : New parameter
|
# returns : New parameter
|
||||||
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
# $VIASH_DIRECTORY_MOUNTS : Added another parameter to be passed to docker
|
||||||
|
# $VIASH_DOCKER_AUTOMOUNT_PREFIX : The prefix to be used for the automounts
|
||||||
# examples:
|
# examples:
|
||||||
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
# ViashDockerAutodetectMount /path/to/bar # returns '/viash_automount/path/to/bar'
|
||||||
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
# ViashDockerAutodetectMountArg /path/to/bar # returns '--volume="/path/to:/viash_automount/path/to"'
|
||||||
function ViashDockerAutodetectMount {
|
function ViashDockerAutodetectMount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -549,7 +556,7 @@ function ViashDockerAutodetectMount {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
if [ -z "$base_name" ]; then
|
if [ -z "$base_name" ]; then
|
||||||
echo "$mount_target"
|
echo "$mount_target"
|
||||||
else
|
else
|
||||||
@@ -557,7 +564,9 @@ function ViashDockerAutodetectMount {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
function ViashDockerAutodetectMountArg {
|
function ViashDockerAutodetectMountArg {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
|
local mount_source
|
||||||
|
local base_name
|
||||||
if [ -d "$abs_path" ]; then
|
if [ -d "$abs_path" ]; then
|
||||||
mount_source="$abs_path"
|
mount_source="$abs_path"
|
||||||
base_name=""
|
base_name=""
|
||||||
@@ -565,17 +574,22 @@ function ViashDockerAutodetectMountArg {
|
|||||||
mount_source=`dirname "$abs_path"`
|
mount_source=`dirname "$abs_path"`
|
||||||
base_name=`basename "$abs_path"`
|
base_name=`basename "$abs_path"`
|
||||||
fi
|
fi
|
||||||
mount_target="/viash_automount$mount_source"
|
local mount_target="$VIASH_DOCKER_AUTOMOUNT_PREFIX$mount_source"
|
||||||
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
ViashDebug "ViashDockerAutodetectMountArg $1 -> $mount_source -> $mount_target"
|
||||||
echo "--volume=\"$mount_source:$mount_target\""
|
echo "--volume=\"$mount_source:$mount_target\""
|
||||||
}
|
}
|
||||||
function ViashDockerStripAutomount {
|
function ViashDockerStripAutomount {
|
||||||
abs_path=$(ViashAbsolutePath "$1")
|
local abs_path=$(ViashAbsolutePath "$1")
|
||||||
echo "${abs_path#/viash_automount}"
|
echo "${abs_path#$VIASH_DOCKER_AUTOMOUNT_PREFIX}"
|
||||||
}
|
}
|
||||||
# initialise variables
|
# initialise variables
|
||||||
VIASH_DIRECTORY_MOUNTS=()
|
VIASH_DIRECTORY_MOUNTS=()
|
||||||
|
|
||||||
|
# configure default docker automount prefix if it is unset
|
||||||
|
if [ -z "${VIASH_DOCKER_AUTOMOUNT_PREFIX+x}" ]; then
|
||||||
|
VIASH_DOCKER_AUTOMOUNT_PREFIX="/viash_automount"
|
||||||
|
fi
|
||||||
|
|
||||||
# initialise docker variables
|
# initialise docker variables
|
||||||
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
VIASH_DOCKER_RUN_ARGS=(-i --rm)
|
||||||
|
|
||||||
@@ -665,6 +679,18 @@ while [[ $# -gt 0 ]]; do
|
|||||||
VIASH_MODE='dockerfile'
|
VIASH_MODE='dockerfile'
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
---docker_run_args)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$2")
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
---docker_run_args=*)
|
||||||
|
VIASH_DOCKER_RUN_ARGS+=("$(ViashRemoveFlags "$1")")
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
---docker_image_id)
|
||||||
|
VIASH_MODE='docker_image_id'
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
---debug)
|
---debug)
|
||||||
VIASH_MODE='debug'
|
VIASH_MODE='debug'
|
||||||
shift 1
|
shift 1
|
||||||
@@ -726,6 +752,10 @@ if [[ "$VIASH_ENGINE_TYPE" == "docker" ]]; then
|
|||||||
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
if [ "$VIASH_MODE" == "dockerfile" ]; then
|
||||||
ViashDockerfile "$VIASH_ENGINE_ID"
|
ViashDockerfile "$VIASH_ENGINE_ID"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
elif [ "$VIASH_MODE" == "docker_image_id" ]; then
|
||||||
|
echo "$VIASH_DOCKER_IMAGE_ID"
|
||||||
|
exit 0
|
||||||
|
|
||||||
# enter docker container
|
# enter docker container
|
||||||
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
elif [[ "$VIASH_MODE" == "debug" ]]; then
|
||||||
|
|||||||
@@ -170,15 +170,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/nextflow/concat_text"
|
output: "target/nextflow/concat_text"
|
||||||
executable: "target/nextflow/concat_text/main.nf"
|
executable: "target/nextflow/concat_text/main.nf"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// concat_text main
|
// concat_text main
|
||||||
//
|
//
|
||||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
// Data Intuitive.
|
// Data Intuitive.
|
||||||
//
|
//
|
||||||
@@ -764,8 +764,11 @@ def runEach(Map args) {
|
|||||||
def fromState_ = args.fromState
|
def fromState_ = args.fromState
|
||||||
def toState_ = args.toState
|
def toState_ = args.toState
|
||||||
def filter_ = args.filter
|
def filter_ = args.filter
|
||||||
|
def runIf_ = args.runIf
|
||||||
def id_ = args.id
|
def id_ = args.id
|
||||||
|
|
||||||
|
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||||
|
|
||||||
workflow runEachWf {
|
workflow runEachWf {
|
||||||
take: input_ch
|
take: input_ch
|
||||||
main:
|
main:
|
||||||
@@ -787,7 +790,20 @@ def runEach(Map args) {
|
|||||||
[new_id] + tup.drop(1)
|
[new_id] + tup.drop(1)
|
||||||
}
|
}
|
||||||
: filter_ch
|
: filter_ch
|
||||||
def data_ch = id_ch | map{tup ->
|
def chPassthrough = null
|
||||||
|
def chRun = null
|
||||||
|
if (runIf_) {
|
||||||
|
def idRunIfBranch = id_ch.branch{ tup ->
|
||||||
|
run: runIf_(tup[0], tup[1], comp_)
|
||||||
|
passthrough: true
|
||||||
|
}
|
||||||
|
chPassthrough = idRunIfBranch.passthrough
|
||||||
|
chRun = idRunIfBranch.run
|
||||||
|
} else {
|
||||||
|
chRun = id_ch
|
||||||
|
chPassthrough = Channel.empty()
|
||||||
|
}
|
||||||
|
def data_ch = chRun | map{tup ->
|
||||||
def new_data = tup[1]
|
def new_data = tup[1]
|
||||||
if (fromState_ instanceof Map) {
|
if (fromState_ instanceof Map) {
|
||||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||||
@@ -825,8 +841,11 @@ def runEach(Map args) {
|
|||||||
[tup[0], new_state] + tup.drop(3)
|
[tup[0], new_state] + tup.drop(3)
|
||||||
}
|
}
|
||||||
: out_ch
|
: out_ch
|
||||||
|
|
||||||
|
def return_ch = post_ch
|
||||||
|
| concat(chPassthrough)
|
||||||
|
|
||||||
post_ch
|
return_ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// mix all results
|
// mix all results
|
||||||
@@ -1602,8 +1621,8 @@ def findStates(Map params, Map config) {
|
|||||||
// construct renameMap
|
// construct renameMap
|
||||||
if (args.rename_keys) {
|
if (args.rename_keys) {
|
||||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||||
def split = renameString.split(";")
|
def split = renameString.split(":")
|
||||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||||
split
|
split
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2630,30 +2649,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
tuple
|
tuple
|
||||||
}
|
}
|
||||||
|
|
||||||
def chModifiedFiltered = workflowArgs.filter ?
|
|
||||||
chModified | filter{workflowArgs.filter(it)} :
|
|
||||||
chModified
|
|
||||||
|
|
||||||
def chRun = null
|
def chRun = null
|
||||||
def chPassthrough = null
|
def chPassthrough = null
|
||||||
if (workflowArgs.runIf) {
|
if (workflowArgs.runIf) {
|
||||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
def runIfBranch = chModified.branch{ tup ->
|
||||||
run: workflowArgs.runIf(tup[0], tup[1])
|
run: workflowArgs.runIf(tup[0], tup[1])
|
||||||
passthrough: true
|
passthrough: true
|
||||||
}
|
}
|
||||||
chRun = runIfBranch.run
|
chRun = runIfBranch.run
|
||||||
chPassthrough = runIfBranch.passthrough
|
chPassthrough = runIfBranch.passthrough
|
||||||
} else {
|
} else {
|
||||||
chRun = chModifiedFiltered
|
chRun = chModified
|
||||||
chPassthrough = Channel.empty()
|
chPassthrough = Channel.empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def chRunFiltered = workflowArgs.filter ?
|
||||||
|
chRun | filter{workflowArgs.filter(it)} :
|
||||||
|
chRun
|
||||||
|
|
||||||
def chArgs = workflowArgs.fromState ?
|
def chArgs = workflowArgs.fromState ?
|
||||||
chRun | map{
|
chRunFiltered | map{
|
||||||
def new_data = workflowArgs.fromState(it.take(2))
|
def new_data = workflowArgs.fromState(it.take(2))
|
||||||
[it[0], new_data]
|
[it[0], new_data]
|
||||||
} :
|
} :
|
||||||
chRun | map {tup -> tup.take(2)}
|
chRunFiltered | map {tup -> tup.take(2)}
|
||||||
|
|
||||||
// fill in defaults
|
// fill in defaults
|
||||||
def chArgsWithDefaults = chArgs
|
def chArgsWithDefaults = chArgs
|
||||||
@@ -2724,7 +2744,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||||
|
|
||||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||||
// output tuple format: [join_id, id, new_state, ...]
|
// output tuple format: [join_id, id, new_state, ...]
|
||||||
| map{ tup ->
|
| map{ tup ->
|
||||||
@@ -3004,15 +3024,15 @@ meta = [
|
|||||||
"runner" : "nextflow",
|
"runner" : "nextflow",
|
||||||
"engine" : "docker|native",
|
"engine" : "docker|native",
|
||||||
"output" : "target/nextflow/concat_text",
|
"output" : "target/nextflow/concat_text",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"git_commit" : "373be82129c13f50558c0dae25c07afe0866a8ba",
|
"git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295",
|
||||||
"git_remote" : "https://github.com/viash-hub/craftbox"
|
"git_remote" : "https://github.com/viash-hub/craftbox"
|
||||||
},
|
},
|
||||||
"package_config" : {
|
"package_config" : {
|
||||||
"name" : "craftbox",
|
"name" : "craftbox",
|
||||||
"version" : "main",
|
"version" : "main",
|
||||||
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"source" : "src",
|
"source" : "src",
|
||||||
"target" : "target",
|
"target" : "target",
|
||||||
"config_mods" : [
|
"config_mods" : [
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
"input": {
|
"input": {
|
||||||
"type":
|
"type":
|
||||||
"string",
|
"string",
|
||||||
"description": "Type: List of `file`, required, example: `input?.txt.gz`, multiple_sep: `\":\"`. A list of (gzipped) text files",
|
"description": "Type: List of `file`, required, example: `input?.txt.gz`, multiple_sep: `\";\"`. A list of (gzipped) text files",
|
||||||
"help_text": "Type: List of `file`, required, example: `input?.txt.gz`, multiple_sep: `\":\"`. A list of (gzipped) text files."
|
"help_text": "Type: List of `file`, required, example: `input?.txt.gz`, multiple_sep: `\";\"`. A list of (gzipped) text files."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -221,15 +221,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/nextflow/csv2fasta"
|
output: "target/nextflow/csv2fasta"
|
||||||
executable: "target/nextflow/csv2fasta/main.nf"
|
executable: "target/nextflow/csv2fasta/main.nf"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// csv2fasta main
|
// csv2fasta main
|
||||||
//
|
//
|
||||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
// Data Intuitive.
|
// Data Intuitive.
|
||||||
//
|
//
|
||||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
|||||||
def fromState_ = args.fromState
|
def fromState_ = args.fromState
|
||||||
def toState_ = args.toState
|
def toState_ = args.toState
|
||||||
def filter_ = args.filter
|
def filter_ = args.filter
|
||||||
|
def runIf_ = args.runIf
|
||||||
def id_ = args.id
|
def id_ = args.id
|
||||||
|
|
||||||
|
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||||
|
|
||||||
workflow runEachWf {
|
workflow runEachWf {
|
||||||
take: input_ch
|
take: input_ch
|
||||||
main:
|
main:
|
||||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
|||||||
[new_id] + tup.drop(1)
|
[new_id] + tup.drop(1)
|
||||||
}
|
}
|
||||||
: filter_ch
|
: filter_ch
|
||||||
def data_ch = id_ch | map{tup ->
|
def chPassthrough = null
|
||||||
|
def chRun = null
|
||||||
|
if (runIf_) {
|
||||||
|
def idRunIfBranch = id_ch.branch{ tup ->
|
||||||
|
run: runIf_(tup[0], tup[1], comp_)
|
||||||
|
passthrough: true
|
||||||
|
}
|
||||||
|
chPassthrough = idRunIfBranch.passthrough
|
||||||
|
chRun = idRunIfBranch.run
|
||||||
|
} else {
|
||||||
|
chRun = id_ch
|
||||||
|
chPassthrough = Channel.empty()
|
||||||
|
}
|
||||||
|
def data_ch = chRun | map{tup ->
|
||||||
def new_data = tup[1]
|
def new_data = tup[1]
|
||||||
if (fromState_ instanceof Map) {
|
if (fromState_ instanceof Map) {
|
||||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
|||||||
[tup[0], new_state] + tup.drop(3)
|
[tup[0], new_state] + tup.drop(3)
|
||||||
}
|
}
|
||||||
: out_ch
|
: out_ch
|
||||||
|
|
||||||
|
def return_ch = post_ch
|
||||||
|
| concat(chPassthrough)
|
||||||
|
|
||||||
post_ch
|
return_ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// mix all results
|
// mix all results
|
||||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
|||||||
// construct renameMap
|
// construct renameMap
|
||||||
if (args.rename_keys) {
|
if (args.rename_keys) {
|
||||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||||
def split = renameString.split(";")
|
def split = renameString.split(":")
|
||||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||||
split
|
split
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2626,30 +2645,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
tuple
|
tuple
|
||||||
}
|
}
|
||||||
|
|
||||||
def chModifiedFiltered = workflowArgs.filter ?
|
|
||||||
chModified | filter{workflowArgs.filter(it)} :
|
|
||||||
chModified
|
|
||||||
|
|
||||||
def chRun = null
|
def chRun = null
|
||||||
def chPassthrough = null
|
def chPassthrough = null
|
||||||
if (workflowArgs.runIf) {
|
if (workflowArgs.runIf) {
|
||||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
def runIfBranch = chModified.branch{ tup ->
|
||||||
run: workflowArgs.runIf(tup[0], tup[1])
|
run: workflowArgs.runIf(tup[0], tup[1])
|
||||||
passthrough: true
|
passthrough: true
|
||||||
}
|
}
|
||||||
chRun = runIfBranch.run
|
chRun = runIfBranch.run
|
||||||
chPassthrough = runIfBranch.passthrough
|
chPassthrough = runIfBranch.passthrough
|
||||||
} else {
|
} else {
|
||||||
chRun = chModifiedFiltered
|
chRun = chModified
|
||||||
chPassthrough = Channel.empty()
|
chPassthrough = Channel.empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def chRunFiltered = workflowArgs.filter ?
|
||||||
|
chRun | filter{workflowArgs.filter(it)} :
|
||||||
|
chRun
|
||||||
|
|
||||||
def chArgs = workflowArgs.fromState ?
|
def chArgs = workflowArgs.fromState ?
|
||||||
chRun | map{
|
chRunFiltered | map{
|
||||||
def new_data = workflowArgs.fromState(it.take(2))
|
def new_data = workflowArgs.fromState(it.take(2))
|
||||||
[it[0], new_data]
|
[it[0], new_data]
|
||||||
} :
|
} :
|
||||||
chRun | map {tup -> tup.take(2)}
|
chRunFiltered | map {tup -> tup.take(2)}
|
||||||
|
|
||||||
// fill in defaults
|
// fill in defaults
|
||||||
def chArgsWithDefaults = chArgs
|
def chArgsWithDefaults = chArgs
|
||||||
@@ -2720,7 +2740,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||||
|
|
||||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||||
// output tuple format: [join_id, id, new_state, ...]
|
// output tuple format: [join_id, id, new_state, ...]
|
||||||
| map{ tup ->
|
| map{ tup ->
|
||||||
@@ -3040,15 +3060,15 @@ meta = [
|
|||||||
"runner" : "nextflow",
|
"runner" : "nextflow",
|
||||||
"engine" : "docker|native",
|
"engine" : "docker|native",
|
||||||
"output" : "target/nextflow/csv2fasta",
|
"output" : "target/nextflow/csv2fasta",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"git_commit" : "373be82129c13f50558c0dae25c07afe0866a8ba",
|
"git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295",
|
||||||
"git_remote" : "https://github.com/viash-hub/craftbox"
|
"git_remote" : "https://github.com/viash-hub/craftbox"
|
||||||
},
|
},
|
||||||
"package_config" : {
|
"package_config" : {
|
||||||
"name" : "craftbox",
|
"name" : "craftbox",
|
||||||
"version" : "main",
|
"version" : "main",
|
||||||
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"source" : "src",
|
"source" : "src",
|
||||||
"target" : "target",
|
"target" : "target",
|
||||||
"config_mods" : [
|
"config_mods" : [
|
||||||
|
|||||||
@@ -146,15 +146,15 @@ build_info:
|
|||||||
engine: "docker|native"
|
engine: "docker|native"
|
||||||
output: "target/nextflow/untar"
|
output: "target/nextflow/untar"
|
||||||
executable: "target/nextflow/untar/main.nf"
|
executable: "target/nextflow/untar/main.nf"
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
git_commit: "373be82129c13f50558c0dae25c07afe0866a8ba"
|
git_commit: "5705b88fa20f267475b5d0ae1ca25dbf55ff1295"
|
||||||
git_remote: "https://github.com/viash-hub/craftbox"
|
git_remote: "https://github.com/viash-hub/craftbox"
|
||||||
package_config:
|
package_config:
|
||||||
name: "craftbox"
|
name: "craftbox"
|
||||||
version: "main"
|
version: "main"
|
||||||
description: "A collection of custom-tailored scripts and applied tools.\n"
|
description: "A collection of custom-tailored scripts and applied tools.\n"
|
||||||
info: null
|
info: null
|
||||||
viash_version: "0.9.0-RC6"
|
viash_version: "0.9.0-RC7"
|
||||||
source: "src"
|
source: "src"
|
||||||
target: "target"
|
target: "target"
|
||||||
config_mods:
|
config_mods:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// untar main
|
// untar main
|
||||||
//
|
//
|
||||||
// This wrapper script is auto-generated by viash 0.9.0-RC6 and is thus a
|
// This wrapper script is auto-generated by viash 0.9.0-RC7 and is thus a
|
||||||
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
// derivative work thereof. This software comes with ABSOLUTELY NO WARRANTY from
|
||||||
// Data Intuitive.
|
// Data Intuitive.
|
||||||
//
|
//
|
||||||
@@ -760,8 +760,11 @@ def runEach(Map args) {
|
|||||||
def fromState_ = args.fromState
|
def fromState_ = args.fromState
|
||||||
def toState_ = args.toState
|
def toState_ = args.toState
|
||||||
def filter_ = args.filter
|
def filter_ = args.filter
|
||||||
|
def runIf_ = args.runIf
|
||||||
def id_ = args.id
|
def id_ = args.id
|
||||||
|
|
||||||
|
assert !runIf_ || runIf_ instanceof Closure: "runEach: must pass a Closure to runIf."
|
||||||
|
|
||||||
workflow runEachWf {
|
workflow runEachWf {
|
||||||
take: input_ch
|
take: input_ch
|
||||||
main:
|
main:
|
||||||
@@ -783,7 +786,20 @@ def runEach(Map args) {
|
|||||||
[new_id] + tup.drop(1)
|
[new_id] + tup.drop(1)
|
||||||
}
|
}
|
||||||
: filter_ch
|
: filter_ch
|
||||||
def data_ch = id_ch | map{tup ->
|
def chPassthrough = null
|
||||||
|
def chRun = null
|
||||||
|
if (runIf_) {
|
||||||
|
def idRunIfBranch = id_ch.branch{ tup ->
|
||||||
|
run: runIf_(tup[0], tup[1], comp_)
|
||||||
|
passthrough: true
|
||||||
|
}
|
||||||
|
chPassthrough = idRunIfBranch.passthrough
|
||||||
|
chRun = idRunIfBranch.run
|
||||||
|
} else {
|
||||||
|
chRun = id_ch
|
||||||
|
chPassthrough = Channel.empty()
|
||||||
|
}
|
||||||
|
def data_ch = chRun | map{tup ->
|
||||||
def new_data = tup[1]
|
def new_data = tup[1]
|
||||||
if (fromState_ instanceof Map) {
|
if (fromState_ instanceof Map) {
|
||||||
new_data = fromState_.collectEntries{ key0, key1 ->
|
new_data = fromState_.collectEntries{ key0, key1 ->
|
||||||
@@ -821,8 +837,11 @@ def runEach(Map args) {
|
|||||||
[tup[0], new_state] + tup.drop(3)
|
[tup[0], new_state] + tup.drop(3)
|
||||||
}
|
}
|
||||||
: out_ch
|
: out_ch
|
||||||
|
|
||||||
|
def return_ch = post_ch
|
||||||
|
| concat(chPassthrough)
|
||||||
|
|
||||||
post_ch
|
return_ch
|
||||||
}
|
}
|
||||||
|
|
||||||
// mix all results
|
// mix all results
|
||||||
@@ -1598,8 +1617,8 @@ def findStates(Map params, Map config) {
|
|||||||
// construct renameMap
|
// construct renameMap
|
||||||
if (args.rename_keys) {
|
if (args.rename_keys) {
|
||||||
def renameMap = args.rename_keys.collectEntries{renameString ->
|
def renameMap = args.rename_keys.collectEntries{renameString ->
|
||||||
def split = renameString.split(";")
|
def split = renameString.split(":")
|
||||||
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey,newKey:oldKey'"
|
assert split.size() == 2: "Argument 'rename_keys' should be of the form 'newKey:oldKey', or 'newKey:oldKey;newKey:oldKey' in case of multiple values"
|
||||||
split
|
split
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2626,30 +2645,31 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
tuple
|
tuple
|
||||||
}
|
}
|
||||||
|
|
||||||
def chModifiedFiltered = workflowArgs.filter ?
|
|
||||||
chModified | filter{workflowArgs.filter(it)} :
|
|
||||||
chModified
|
|
||||||
|
|
||||||
def chRun = null
|
def chRun = null
|
||||||
def chPassthrough = null
|
def chPassthrough = null
|
||||||
if (workflowArgs.runIf) {
|
if (workflowArgs.runIf) {
|
||||||
def runIfBranch = chModifiedFiltered.branch{ tup ->
|
def runIfBranch = chModified.branch{ tup ->
|
||||||
run: workflowArgs.runIf(tup[0], tup[1])
|
run: workflowArgs.runIf(tup[0], tup[1])
|
||||||
passthrough: true
|
passthrough: true
|
||||||
}
|
}
|
||||||
chRun = runIfBranch.run
|
chRun = runIfBranch.run
|
||||||
chPassthrough = runIfBranch.passthrough
|
chPassthrough = runIfBranch.passthrough
|
||||||
} else {
|
} else {
|
||||||
chRun = chModifiedFiltered
|
chRun = chModified
|
||||||
chPassthrough = Channel.empty()
|
chPassthrough = Channel.empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def chRunFiltered = workflowArgs.filter ?
|
||||||
|
chRun | filter{workflowArgs.filter(it)} :
|
||||||
|
chRun
|
||||||
|
|
||||||
def chArgs = workflowArgs.fromState ?
|
def chArgs = workflowArgs.fromState ?
|
||||||
chRun | map{
|
chRunFiltered | map{
|
||||||
def new_data = workflowArgs.fromState(it.take(2))
|
def new_data = workflowArgs.fromState(it.take(2))
|
||||||
[it[0], new_data]
|
[it[0], new_data]
|
||||||
} :
|
} :
|
||||||
chRun | map {tup -> tup.take(2)}
|
chRunFiltered | map {tup -> tup.take(2)}
|
||||||
|
|
||||||
// fill in defaults
|
// fill in defaults
|
||||||
def chArgsWithDefaults = chArgs
|
def chArgsWithDefaults = chArgs
|
||||||
@@ -2720,7 +2740,7 @@ def workflowFactory(Map args, Map defaultWfArgs, Map meta) {
|
|||||||
// | view{"chInitialOutput: ${it.take(3)}"}
|
// | view{"chInitialOutput: ${it.take(3)}"}
|
||||||
|
|
||||||
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
// join the output [prev_id, new_id, output] with the previous state [prev_id, state, ...]
|
||||||
def chNewState = safeJoin(chInitialOutput, chModifiedFiltered, key_)
|
def chNewState = safeJoin(chInitialOutput, chRunFiltered, key_)
|
||||||
// input tuple format: [join_id, id, output, prev_state, ...]
|
// input tuple format: [join_id, id, output, prev_state, ...]
|
||||||
// output tuple format: [join_id, id, new_state, ...]
|
// output tuple format: [join_id, id, new_state, ...]
|
||||||
| map{ tup ->
|
| map{ tup ->
|
||||||
@@ -2961,15 +2981,15 @@ meta = [
|
|||||||
"runner" : "nextflow",
|
"runner" : "nextflow",
|
||||||
"engine" : "docker|native",
|
"engine" : "docker|native",
|
||||||
"output" : "target/nextflow/untar",
|
"output" : "target/nextflow/untar",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"git_commit" : "373be82129c13f50558c0dae25c07afe0866a8ba",
|
"git_commit" : "5705b88fa20f267475b5d0ae1ca25dbf55ff1295",
|
||||||
"git_remote" : "https://github.com/viash-hub/craftbox"
|
"git_remote" : "https://github.com/viash-hub/craftbox"
|
||||||
},
|
},
|
||||||
"package_config" : {
|
"package_config" : {
|
||||||
"name" : "craftbox",
|
"name" : "craftbox",
|
||||||
"version" : "main",
|
"version" : "main",
|
||||||
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
"description" : "A collection of custom-tailored scripts and applied tools.\n",
|
||||||
"viash_version" : "0.9.0-RC6",
|
"viash_version" : "0.9.0-RC7",
|
||||||
"source" : "src",
|
"source" : "src",
|
||||||
"target" : "target",
|
"target" : "target",
|
||||||
"config_mods" : [
|
"config_mods" : [
|
||||||
|
|||||||
Reference in New Issue
Block a user