Local testing

Before deploying a workflow to the DataHub Workflow Runner you can test your CWL script locally using packages such as cwltool. This allows you to run the workflow locally on your computer, without waiting for Hub scheduling and log handling. You can provide the inputs you wish to use on the Hub, but we suggest you use a smaller dataset for initial testing to avoid long run times. This can help with early bug discovery and fixing. You should also ensure the output results match the required STAC format and that all results are generated in the correct directory. If you want to closely mimic the Hub invocation you can define a .json file with your inputs like this and then pass them in on the command line.

cwltool workflow.cwl#<workflow-name> inputs.json

You must remember to specify the name of a step in your workflow, or otherwise set it to the id of the top-level workflow. For example in this workflow, the top-level workflow has the id “convert-url-working” as this is the name of the

class: Workflow

in the graph.