vsoch / scif

scientific filesystem: a filesystem organization for scientific software and metadata
https://sci-f.github.io/
Mozilla Public License 2.0
30 stars 12 forks source link

CWL CommandLineTool #49

Open tetron opened 5 years ago

tetron commented 5 years ago

Have you considered how this project might interact with a Common Workflow Language (CWL) CommandLineTool description?

vsoch commented 5 years ago

No I haven't, but it's a great idea! I Imagine it would just correspond to interacting with the container as the binary, and then adding input arguments as needed?

#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

label: An example run of a container with a scif filesystem
doc: This has not been tested, I wrote it in a Github issue !

inputs:
  message:
    label: the thing to echo
    type: string
    inputBinding:
      position: 1
outputs: []

baseCommand: [ exec, echo ]

s:author:
  - class: s:Person
    s:identifier: https://orcid.org/0000-0002-6130-1021
    s:email: mailto:dinosaur@avocado.email
    s:name: The Avocado Dinosaur

What did you have in mind, something more along the lines of providing a description internal to the container? Importantly, whatever is done we would want to either be programatically generated (ideal) OR really easy for the user to specify. Even starting with yaml adds a level of difficulty if you aren't used to the stringent space requirements, but anyway, really interested to hear your thoughts!

tetron commented 5 years ago

The idea is to pair executables/packages/container images with a CommandLineTool wrapper which then makes it easy to plug into a scientific workflow. Right now they tend to be separate things but it would be neat if there were standard ways to introspect a container image to discover CWL descriptions usable as entry points / workflow steps.

vsoch commented 5 years ago

SCIF intends to provide internal modulaity, so that interaction with a container (and integration into any number of workflow managers is programatically predictable. So in that the CommandLineTool wrapper is such a wrapper for a workflow manager, you indeed could write a recipe that takes advantage of SCIF to interact with a container.

What format is a CWL description? You could provide the description / specification either as output for the inspect command (or heck, even help) and then have it available with that standard action. What I don't think is reasonable to do is to require CWL as a dependency for SCIF, but I think it's very reasonable to provide instructions / templates or similar for users of CWL to take advantage of the consistency that SCIF provides. Does that make sense?

vsoch commented 5 years ago

hey @tetron - your thoughts here?