Skip to content
Snippets Groups Projects
Select Git revision
  • 1f1064205f8a58262e6741dfb685d2d6a86514af
  • main default protected
  • add-consul-to-nomad
3 results

config.hcl

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    get_targetname.cwl 1.11 KiB
    class: CommandLineTool
    cwlVersion: v1.2
    $namespaces:
      lofar: 'https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl'
    id: get_targetname
    baseCommand:
      - python3
    inputs:
        - id: msin
          type: Directory[]
          doc: MS to compare with
          inputBinding:
            position: 0
    
    arguments:
      - '-c'
      - |
        import sys
        import json
        from getTargetName import main as getTargetName
        
        mss = sys.argv[1:]
    
        output = getTargetName(mss)
    
        targetName = output['targetName'].lstrip().rstrip().replace(' ','_')
        cwl_output = {"targetName": targetName}
    
        with open('./out.json', 'w') as fp:
            json.dump(cwl_output, fp)
            
    outputs:
      - id: targetname
        type: string
        outputBinding:
            loadContents: true
            glob: 'out.json'
            outputEval: $(JSON.parse(self[0].contents).targetName)
      - id: logfile
        type: File[]
        outputBinding:
          glob: 'get_targetname*.log'
            
    requirements:
      - class: InlineJavascriptRequirement
    hints:
      - class: DockerRequirement
        dockerPull: astronrd/linc:v4.0-42-gf3198f7
    stdout: get_targetname.log
    stderr: get_targetname_err.log