common-workflow-language / schema_salad

Semantic Annotations for Linked Avro Data
https://www.commonwl.org/v1.2/SchemaSalad.html
Apache License 2.0
72 stars 62 forks source link

makedoc: Field 'type' references unknown identifier 'File' #827

Open bkappes opened 4 months ago

bkappes commented 4 months ago

Summary

CWL passes as valid using cwltool --validate, but the following error occurs when schema-salad-doc gtadexp-hyperthought-daily.json is run.

System Info

Error

Traceback (most recent call last):
  File "/opt/anaconda3/envs/cwl-1.3/bin/schema-salad-doc", line 11, in <module>
    sys.exit(main())
             ^^^^^^
  File "schema_salad/makedoc.py", line 775, in main
  File "schema_salad/makedoc.py", line 813, in makedoc
  File "schema_salad/ref_resolver.py", line 556, in resolve_ref
  File "schema_salad/ref_resolver.py", line 990, in resolve_all
  File "schema_salad/ref_resolver.py", line 1196, in validate_links
schema_salad.exceptions.ValidationException: gtadexp-hyperthought-daily.json:24:3: checking field 'outputs'
gtadexp-hyperthought-daily.json:25:5:   checking item
                                          Field 'type' references unknown identifier 'File', tried
                                          file:///Users/bkappes/workspace/CWLCon2024/schema-salad/gtadexp-hyperthought-daily.json#File

CWL

[
  {
    "class": "CommandLineTool",
    "cwlVersion": "v1.2"
    },
    "baseCommand": [],
    "inputs": [
      {
        "id": "workspace",
        "type": "string?",
        "default": "Global Test Artifact Data Exchange Program"
      },
      {
        "id": "apikey",
        "type": "string?"
      },
      {
        "id": "num_tasks",
        "type": "int?",
        "default": 4
      }
    ],
    "outputs": [
      {
        "id": "output",
        "type": "File?",
        "outputBinding": {
          "glob": "*.pkl"
        }
      }
    ],
    "label": "gtadexp-hyperthought-download",
    "arguments": [
      {
        "prefix": "",
        "shellQuote": false,
        "position": 0,
        "valueFrom": "[ ! -f $(inputs.workspace.replace(/ /g, \"-\").replace(/_/g, \"-\"))-${\n    var date = new Date()\n    return date.toISOString().split('T')[0] + \".pkl\"\n} ] && \\\n[ ! -z \"$(inputs.apikey)\" ] && \\\ndriveam \\\ndownload \\\n    -w \"$(inputs.workspace)\" \\\n    -n $(inputs.num_tasks) \\\n    -k \"$(inputs.apikey)\" \\\ndump \\\n    -f $(inputs.workspace.replace(/ /g, \"-\").replace(/_/g, \"-\"))-${\n        var date = new Date()\n        return date.toISOString().split('T')[0] + \".pkl\"\n    }"
      }
    ],
    "requirements": [
      {
        "class": "ShellCommandRequirement"
      },
      {
        "class": "DockerRequirement",
        "dockerPull": "<docker repo>/hyperthought-tools:0.1.4"
      },
      {
        "class": "EnvVarRequirement",
        "envDef": [
          {
            "envName": "DEBUG",
            "envValue": "1"
          }
        ]
      },
      {
        "class": "InlineJavascriptRequirement"
      }
    ]
]