schema_salad icon indicating copy to clipboard operation
schema_salad copied to clipboard

Can the parsers avoid building full URLs

Open illusional opened this issue 4 years ago • 2 comments

Trying to parse the outputSource of a workflow:

outputs:
- id: out
  type: File
  outputSource: hello/out

But the output source gets resolved to:

'file:///Users/franklinmichael/source/janis-core/ingestion/workflow/hello_v1_0_0.cwl#hello/out/hello/out'

I don't know how to work that back to hello/out programmatically as I don't really understand how it's getting that #hello/out/hello/out section. Is it possible to disable this URI building?

illusional avatar Dec 09 '20 21:12 illusional

Thanks @illusional for this report. In general, to fix issues with the parsers, we need to make changes over in schema-salad, so I'm moving this issue there

mr-c avatar Dec 10 '20 08:12 mr-c

@illusional these are links to identifiers within the document which are expanded according to the rules described here:

https://www.commonwl.org/v1.2/SchemaSalad.html#Link_resolution

To get the short form you basically need to know the namespaces and base URL and apply those rules in reverse.

tetron avatar Dec 10 '20 16:12 tetron