Open stain opened 7 years ago
Could it be because Process.yml
and Workflow.yml
schemas uses:
- name: SchemaBase
type: record
abstract: true
fields:
- name: label
type:
- "null"
- string
jsonldPredicate: "rdfs:label"
doc: "A short, human-readable label of this object."
yet does not declare rdfs
as a namespace?
$namespaces:
cwl: "https://w3id.org/cwl/cwl#"
sld: "https://w3id.org/cwl/salad#"
I think that might be it.
Solved by common-workflow-language/common-workflow-language#461 hopefully
@MarkRobbo Yes, I'll make the PR to update the git sub-tree next
@MarkRobbo I made a new release of cwltool
: v1.0.20170622090721 -- please re-open if that doesn't work for you!
@mr-c Thanks a lot!
Although the namespace is now present, so still is the incorrect one under "ns1" and that is the one being used.
@prefix CommandLineBinding: <https://w3id.org/cwl/cwl#CommandLineBinding/> .
@prefix CommandLineTool: <https://w3id.org/cwl/cwl#CommandLineTool/> .
@prefix CommandOutputBinding: <https://w3id.org/cwl/cwl#CommandOutputBinding/> .
@prefix Dirent: <https://w3id.org/cwl/cwl#Dirent/> .
@prefix DockerRequirement: <https://w3id.org/cwl/cwl#DockerRequirement/> .
@prefix EnvVarRequirement: <https://w3id.org/cwl/cwl#EnvVarRequirement/> .
@prefix EnvironmentDef: <https://w3id.org/cwl/cwl#EnvironmentDef/> .
@prefix ExpressionTool: <https://w3id.org/cwl/cwl#ExpressionTool/> .
@prefix File: <https://w3id.org/cwl/cwl#File/> .
@prefix InlineJavascriptRequirement: <https://w3id.org/cwl/cwl#InlineJavascriptRequirement/> .
@prefix LinkMergeMethod: <https://w3id.org/cwl/cwl#LinkMergeMethod/> .
@prefix Parameter: <https://w3id.org/cwl/cwl#Parameter/> .
@prefix ResourceRequirement: <https://w3id.org/cwl/cwl#ResourceRequirement/> .
@prefix ScatterMethod: <https://w3id.org/cwl/cwl#ScatterMethod/> .
@prefix SchemaDefRequirement: <https://w3id.org/cwl/cwl#SchemaDefRequirement/> .
@prefix SoftwarePackage: <https://w3id.org/cwl/cwl#SoftwarePackage/> .
@prefix SoftwareRequirement: <https://w3id.org/cwl/cwl#SoftwareRequirement/> .
@prefix Workflow: <https://w3id.org/cwl/cwl#Workflow/> .
@prefix cwl: <https://w3id.org/cwl/cwl#> .
@prefix ns1: <rdfs:> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sld: <https://w3id.org/cwl/salad#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl> a cwl:Workflow ;
Workflow:steps <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0> ;
cwl:cwlVersion cwl:v1.0 ;
cwl:outputs <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#response> ;
ns1:comment "Outputs a message using echo" ;
ns1:label "Hello World" .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#response> cwl:outputSource <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/response> ;
sld:type cwl:File .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0> cwl:out <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/response> ;
cwl:run <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363> .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363> a cwl:CommandLineTool ;
cwl:baseCommand ( "echo" ),
( "echo" ) ;
cwl:inputs <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/message> ;
cwl:outputs <https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/response> ;
cwl:stdout "response.txt" .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/message> cwl:default "Hello World" ;
cwl:inputBinding [ CommandLineBinding:position 1 ],
[ CommandLineBinding:position 1 ] ;
sld:type xsd:string ;
ns1:comment "The message to print" .
<https://raw.githubusercontent.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/response> cwl:outputBinding [ CommandOutputBinding:glob "response.txt" ],
[ CommandOutputBinding:glob "response.txt" ] ;
sld:type cwl:File .
@MarkRobbo Ah, I thought you had tested the other fix :-P
FYI: rdfs:comment
occurs in the jsonldPredicate.id
field of DocType
of the schema_salad metaschema.yml
and likewise for the RecordField
in metaschema_base.yml
:
The jsonldPredicate.id
field is defined as
The predicate URI that this field corresponds to. Corresponds to JSON-LD
@id
directive
Does this information get us closer to a fix?
Expected Behavior
cwltool --print-rdf should use conventional valid namespaces where they exist.
Actual Behavior
Wrong prefix for the
rdfs
namespace, seems to be caused by<rdfs:comment>
being interpreted as an URI instead of a qname mapped to the rdfs namespacehttp://www.w3.org/2000/01/rdf-schema#
Workflow Code
https://rawgit.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl
Full Traceback
Your Environment