Skip to content

EOAP CWL Wrap

eoap-cwlwrap is a command-line utility that composes a CWL Workflow from a series of Workflow/CommandLineTool steps, defined according to Application package patterns based on data stage-in and stage-out behaviors commonly used in EO workflows, and packs it into a single self-contained CWL document.


๐Ÿง  Prerequisites

stage-in

  • One input parameter of type URI;
  • One output of type Directory.

stage-out

  • One input parameter of type Directory;
  • One output of type URI.

app

Inputs:

  • has one or more parameter of type Directory
  • it can be nullable ?;
  • it can be an array [].

Outputs:

  • has one or more parameter of type Directory
  • it can be an array [].

main

  • inputs coming from app:
  • if type is assignable to Directory it is converted to URI input in main;
  • any other kind of input won't be transformed;
  • outpus coming from app:
  • if type is assignable to Directory it is converted to URI output in main;
  • any other kind of output won't be transformed, but referenced to the related app output;

๐Ÿš€ Features

  • ๐Ÿงฑ Chain multiple Workflow/CommandLineTool CWLs into a Workflow;
  • ๐Ÿงช Validate type compatibility between steps;
  • ๐Ÿ“ฆ Pack the entire workflow and dependencies into one file;
  • ๐Ÿ’พ Output to any location, with automatic directory creation.

๐Ÿ›  Installation

pip install -e .

๐Ÿง‘โ€๐Ÿ’ป Usage

eoap-cwlwrap \
--stage-in ./stage-in.cwl \
--workflow ./workflow.cwl \
--workflow-id water-bodies-detection \
--stage-out ./stage-out.cwl \
--output ./current.cwl

๐Ÿ”ง Options

Option Description
--stage-in The CWL stage-in file path.
--workflow The CWL app file path.
--workflow-id The ID of the Workflow chained as app
--stage_out The CWL stage-out file path.
--output The target CWL output file path. Intermediate directories are created if not existing.
--puml Enable the generation of the PlantUML diagram of the generated Workflow

๐Ÿง  Requirements

  • Python โ‰ฅ 3.9

Dependendies

Package installation will automatically install the following dependencies:

Using the container

docker run -it --rm ghcr.io/eoepca/eoap-cwlwrap/eoap-cwlwrap:latest eoap-cwlwrap --help

Run the tests

hatch test --verbose