--- /dev/null
+API_HOST
+API_TOKEN
\ No newline at end of file
--- /dev/null
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "Run CWL workflow on Arvados",
+ "type": "shell",
+ "command": "scripts/run-workflow ${file}",
+ "problemMatcher": []
+ },
+ {
+ "label": "Register or update CWL workflow on Arvados Workbench",
+ "type": "shell",
+ "command": "scripts/upload-workflow ${file}",
+ "problemMatcher": []
+ },
+ {
+ "label": "Configure Arvados",
+ "type": "shell",
+ "command": "scripts/configure-arv ${input:api_host} ${input:api_token}",
+ "problemMatcher": []
+ },
+ {
+ "label": "Set project UUID",
+ "type": "shell",
+ "command": "scripts/set-project ${fileDirname} ${input:project_uuid}",
+ "problemMatcher": []
+ }
+ ],
+ "inputs": [
+ {
+ "id": "api_host",
+ "type": "promptString",
+ "description": "Value for ARVADOS_API_HOST"
+ },
+ {
+ "id": "api_token",
+ "type": "promptString",
+ "description": "Value for ARVADOS_API_TOKEN",
+ "password": true
+ },
+ {
+ "id": "project_uuid",
+ "type": "promptString",
+ "description": "The project UUID"
+ }
+ ]
+}
--- /dev/null
+This is a template repository that contains helpful scripts and vscode
+tasks for development CWL workflows with Arvados.
--- /dev/null
+#!/bin/sh
+echo $1 > API_HOST
+echo $2 > API_TOKEN
+chmod og-rw API_HOST API_TOKEN
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+set -e
+FILE=$1
+DIR=$(dirname $FILE)
+. $(dirname $0)/setup-env
+if test -s $DIR/input.yaml ; then
+ INPUT=$DIR/input.yaml
+fi
+arvados-cwl-runner $PROJECT_UUID $FILE $INPUT
--- /dev/null
+#!/bin/sh
+echo $2 > $1/PROJECT_UUID
\ No newline at end of file
--- /dev/null
+test -s API_HOST || (echo "missing API_HOST, run the 'Configure Arvados' task"; exit 1)
+test -s API_TOKEN || (echo "missing API_TOKEN, run the 'Configure Arvados' task"; exit 1)
+export ARVADOS_API_HOST=$(cat API_HOST)
+export ARVADOS_API_TOKEN=$(cat API_TOKEN)
+if test -s $DIR/PROJECT_UUID ; then
+ PROJECT_UUID="--project-uuid $(cat $DIR/PROJECT_UUID)"
+fi
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+set -e
+FILE=$1
+DIR=$(dirname $FILE)
+. $(dirname $0)/setup-env
+if test -s $DIR/defaults.yaml ; then
+ DEFAULTS=$DIR/defaults.yaml
+fi
+if test -s $DIR/WORKFLOW_UUID ; then
+ arvados-cwl-runner --update-workflow $(cat $DIR/WORKFLOW_UUID) $PROJECT_UUID $FILE $DEFAULTS
+else
+ arvados-cwl-runner --create-workflow $PROJECT_UUID $FILE $DEFAULTS > $DIR/WORKFLOW_UUID
+fi