Skip to content

Latest commit

 

History

History
53 lines (28 loc) · 4.94 KB

generate-a-template-input-file-for-the-application-package-optional.md

File metadata and controls

53 lines (28 loc) · 4.94 KB

Generate a template “input file” for the Application Package (Optional)

To run the tutorial application, you need an “input file”, formatted as a YAML or JSON file, and it defines the set of input parameters and values necessary to execute the application.

We have created an input file for unity-example-application, so you can paste this URL into Airflow when running the application: unity-example-app.test.json. Take a look at that file to see what the format looks like.

Skip directly to Execute the App Package in SPS using Airflow section below if you do not want to generate an “input file”.

Otherwise, the information below provides instructions on generating the “input file” necessary to run the application in Airflow.

OPTIONALLY you can use cwltool to generate a template input file for your application to use as an “input file”. The User will have to generate an "input file" that is associated with the workflow.cwl. The "input file" contains all of the parameters and values needed by the application itself to run.

Currently, the APG API doesn't automatically generate the "input-file" so User will have to execute the cwltool command to generate it manually. The cwltool will look at your workflow.cwl and generate the input and output parameters that the application is looking for.

Follow the steps below:

  1. Install cwltool library in JupyterHub by executing the following command
  • pip install cwlref-runner

  1. To run the cwltool, you will need to generate an “input file” template to pass in as an argument
  • Command: cwltool --make-template <URL to your CWL Workflow> > <filename>.yml

To find the URL to ”workflow.cwl” file:

Right click the download icon next to “/workflow.cwl” and select “Copy Link Address” to copy the URL as shown in the figure below

Example command to create an input-file template from the main workflow.cwl file:
cwltool --make-template http://awslbdockstorestack-lb-1429770210.us-west-2.elb.amazonaws.com:9998/api/ga4gh/trs/v2/tools/%23workflow%2Fdockstore.org%2Fmike-gangl%2Funity-example-application/versions/5/PLAIN-CWL/descriptor/%2Fworkflow.cwl > unity-example-app.test.template.json

  1. Open unity-example-app.test.template.json to view the output of cwltool. The output will look like this:

  1. Update the unity-example-app.test.template.json with the appropriate values for each field

NOTE: For “collection_id” and “output_collection” fields, the recommendation is to follow this format: urn:nasa:unity:::name___version