Skip to content

Wrong rdfs namespace in cwltool --print-rdf #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stain opened this issue Jun 14, 2017 · 10 comments
Open

Wrong rdfs namespace in cwltool --print-rdf #427

stain opened this issue Jun 14, 2017 · 10 comments

Comments

@stain
Copy link
Member

stain commented Jun 14, 2017

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 namespace http://www.w3.org/2000/01/rdf-schema#

@prefix ns1: <rdfs:> .

Workflow Code

https://rawgit.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl

Full Traceback

 cwltool --print-rdf  https://rawgit.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl
@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#> .
..
<https://rawgit.com/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/62398b9b-8399-4f05-87e7-7abc669d9c0d/message> cwl:default "Hello World" ;
    cwl:inputBinding [ CommandLineBinding:position 1 ],
        [ CommandLineBinding:position 1 ] ;
    sld:type xsd:string ;
    ns1:comment "The message to print" .

Your Environment

  • cwltool version: 1.0.20170525215327
@stain
Copy link
Member Author

stain commented Jun 14, 2017

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#"

@tetron
Copy link
Member

tetron commented Jun 14, 2017

I think that might be it.

@MarkRobbo
Copy link
Member

Solved by common-workflow-language/common-workflow-language#461 hopefully

@mr-c
Copy link
Member

mr-c commented Jun 22, 2017

@MarkRobbo Yes, I'll make the PR to update the git sub-tree next

@mr-c mr-c mentioned this issue Jun 22, 2017
@mr-c mr-c closed this as completed in #436 Jun 22, 2017
@mr-c
Copy link
Member

mr-c commented Jun 22, 2017

@MarkRobbo I made a new release of cwltool: v1.0.20170622090721 -- please re-open if that doesn't work for you!

@MarkRobbo
Copy link
Member

@mr-c Thanks a lot!

@MarkRobbo
Copy link
Member

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://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl> a cwl:Workflow ;
    Workflow:steps <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0> ;
    cwl:cwlVersion cwl:v1.0 ;
    cwl:outputs <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#response> ;
    ns1:comment "Outputs a message using echo" ;
    ns1:label "Hello World" .

<https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#response> cwl:outputSource <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/response> ;
    sld:type cwl:File .

<https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0> cwl:out <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/response> ;
    cwl:run <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363> .

<https://github.com/raw/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://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/message> ;
    cwl:outputs <https://github.com/raw/common-workflow-language/workflows/master/workflows/hello/hello.cwl#step0/9b29e671-b1ba-4ff4-99e7-1cadf44ee363/response> ;
    cwl:stdout "response.txt" .

<https://github.com/raw/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://github.com/raw/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 .

@mr-c
Copy link
Member

mr-c commented Jun 22, 2017

@MarkRobbo Ah, I thought you had tested the other fix :-P

@mr-c mr-c reopened this Jun 22, 2017
@mr-c
Copy link
Member

mr-c commented Jun 22, 2017

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?

MarkRobbo added a commit to common-workflow-language/cwlviewer that referenced this issue Aug 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants