common-workflow-lab/wdl-cwl-translator

find a way to use available_inputs from the miniwdl object to handle workflow inputs

ntachukwu opened this issue · 1 comments

For getting the workflow inputs, consider looking at workflow_obj.available_inputs
https://miniwdl.readthedocs.io/en/latest/WDL.html#WDL.Tree.Workflow.available_inputs

That will probably work better for workflows with many layers of nesting and imports as MiniWDL handles all of that

for wf_input in workflow_obj.available_inputs:
  info: Any = wf_input.info  # Always None?
  name: str = wf_input.name   # like `align_and_count.reads_bam`
  value: WDL.Tree.Decl = wf_input.value  # like WDL.Tree.Decl(type=WDL.Type.File, name="reads_bam")
kinow commented

Thanks for creating the issue @Th3nn3ss ! This one is not in the milestone, so it's more a would-be-nice-to-have for later 👍 Let's focus on the milestone now :-)