You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to omit 'Unrecognized extension field' warnings for fields in RDF schema #623
Hi,
The attachment contains test files to reproduce the issue (CWL and the xml schema file) - cwl-schemas.tar.gz
When running the tool with cwltool version 1.0.20180116213856 an 'Unrecognized extension field' warning is printed out. While running with an older version (1.0.20170413194156) there was no warning. cwltool schemas-tool1.cwl -- --input foobar
Expected Behavior
After including $schemas in the CWL, cwltool should not print out a warning.
Actual Behavior
After including $schemas in the CWL, cwltool version 1.0.20180116213856 prints out a warning.
schemas-tool1.cwl:1:1: unrecognized extension field `http://sbgenomics.com/schema#appVersion`. Did you include a $schemas section?
Your Environment
cwltool version: 1.0.20180116213856
Check using cwltool --version
@tetron I can confirm that the behaviour of --skip-schemas is fixed, however cwltool is still printing a false warning: test.cwl:1:1: unrecognized extension field 'http://edamontology.org/topic_0003'. Did you include a $schemas section?
Here's what schema salad infers to be property (== RDF predicate) based on my understanding of RDFS and OWL:
Anything rdf:type rdf:Property
Anything defined as a subproperty of something else
Anything listed as having a range of values
Anything rdf:type owl:ObjectProperty
It doesn't look to me like edam:topic_0003 is any of those things. Is it mislabeled in the ontology or am I misunderstanding what should be considered a predicate in OWL?
for s, _, _ in self.graph.triples((None, RDF.type, RDF.Property)):
self._add_properties(s)
for s, _, o in self.graph.triples((None, RDFS.subPropertyOf, None)):
self._add_properties(s)
self._add_properties(o)
for s, _, _ in self.graph.triples((None, RDFS.range, None)):
self._add_properties(s)
for s, _, _ in self.graph.triples((None, RDF.type, OWL.ObjectProperty)):
self._add_properties(s)
@tetron Admittedly I just switched to EDAM as I don't have a copy of sbg-schema.xml.
Checking cwltool --validate https://raw.githubusercontent.com/common-workflow-language/workflows/master/tools/ucsc-liftOver.cwl (which uses schema.org) and I get no errors.
So I guess the issue remains that schemas-tool1.cwl:1:1: unrecognized extension field 'http://sbgenomics.com/schema#appVersion'. Did you include a $schemas section? is not a helpful error message.
Yes, the error message could be more helpful (like, if you did include $schemas section, it shouldn't lecture you about it). It could also list all the predicates it is expecting to find, although that could be long, and it's not nice to spam the user.
On EDAM, I think edam:topic_0003 is the "class of things which are topics in edam". I believe what you actually want is the predicate edam:has_topic, so see if this works:
edam:has_topic: edam:topic_3500
Which would express that the workflow was related to the topic of Zoology.
Activity
tetron commentedon Jan 24, 2018
Hmm, this looks correct, will have to investigate.
tetron commentedon Jan 24, 2018
Also, this is actually a schema-salad bug. You should get a similar result using schema-salad-tool for validation:
bogdang989 commentedon Jan 24, 2018
Cool, thanks for the quick response.
bogdang989 commentedon Jan 24, 2018
Yes, actually when running with schema-salad-tool version 2.6.20171201034858 there is no warning
tetron commentedon Jan 25, 2018
Perhaps you just need to update the version of schema salad you are using with cwltool?
anton-khodak commentedon Jan 27, 2018
Confirming with cwltool 1.0.20180116213856, using schema-salad of the latest version does not help
keiranmraine commentedon Feb 7, 2018
also #455 (discussed with mr-c on gitter 14-Dec)
tetron commentedon Feb 13, 2018
This turn out to be a really stupid bug. The default for --skip-schemas is True so it would never load the schemas as intended. See #656 has the fix.
Separately there is a schema-salad bug in that it prints warnings even when extension schemas were skipped.
mr-c commentedon Feb 15, 2018
@tetron I can confirm that the behaviour of
--skip-schemasis fixed, howevercwltoolis still printing a false warning:test.cwl:1:1: unrecognized extension field 'http://edamontology.org/topic_0003'. Did you include a $schemas section?Here's a minimal reproducible version:
tetron commentedon Feb 15, 2018
Here's what schema salad infers to be property (== RDF predicate) based on my understanding of RDFS and OWL:
It doesn't look to me like
edam:topic_0003is any of those things. Is it mislabeled in the ontology or am I misunderstanding what should be considered a predicate in OWL?mr-c commentedon Feb 15, 2018
@tetron Admittedly I just switched to EDAM as I don't have a copy of
sbg-schema.xml.Checking
cwltool --validate https://raw.githubusercontent.com/common-workflow-language/workflows/master/tools/ucsc-liftOver.cwl(which uses schema.org) and I get no errors.So I guess the issue remains that
schemas-tool1.cwl:1:1: unrecognized extension field 'http://sbgenomics.com/schema#appVersion'. Did you include a $schemas section?is not a helpful error message.tetron commentedon Feb 15, 2018
Yes, the error message could be more helpful (like, if you did include $schemas section, it shouldn't lecture you about it). It could also list all the predicates it is expecting to find, although that could be long, and it's not nice to spam the user.
On EDAM, I think
edam:topic_0003is the "class of things which are topics in edam". I believe what you actually want is the predicateedam:has_topic, so see if this works:edam:has_topic: edam:topic_3500Which would express that the workflow was related to the topic of Zoology.
Squashed 'cwltool/schemas/' changes from 0f28896..0d75172e
Squashed 'cwltool/schemas/' changes from 0f28896..721aa892